refactor
From davila7
Refactor $ARGUMENTS following modern JavaScript/TypeScript best practices.
Install
/refactorFacts
- Repository
- davila7/claude-code-templates
- Status
- Actively maintained
- Last commit
Source preview
The instructions Claude Code reads when this command runs.
# Code Refactoring Assistant
Refactor $ARGUMENTS following modern JavaScript/TypeScript best practices.
## Task
I'll help you refactor code by:
1. Analyzing the current implementation
2. Identifying improvement opportunities
3. Applying modern patterns and practices
4. Maintaining existing functionality
5. Ensuring type safety and test coverage
6. Documenting the changes made
## Process
I'll follow these steps:
1. Examine the code to understand its purpose and structure
2. Identify code smells, anti-patterns, or outdated approaches
3. Plan the refactoring strategy with clear goals
4. Implement changes incrementally while maintaining behavior
5. Verify refactored code with tests
6. Document improvements and benefits
## Refactoring Techniques
I can apply various refactoring techniques:
- Converting to modern JavaScript/TypeScript features
- Improving type definitions and type safety
- Extracting reusable functions and components
- Applying design patterns appropriately
- Converting callbacks to Promises or async/await
- Simplifying complex conditionals and loops
- Removing duplicate code
- Improving naming and readability
- Optimizing performance
- Enhancing error handling
## Modern Practices I Can Apply
- ES modules and import/export syntax
- Optional chaining and nullish coalescing
- Array and object destructuring
- Spread and rest operators
- Template literals
- ArView full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 15d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 15d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 15d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 14d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 14d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 14d ago