Development
Command
/refactor
Refactor code for better quality
Install
$ npx -y skills add assistant-ui/tool-ui --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/refactor
Context preview
What this command does when you run it.
Refactor code for better quality
Command definition
refactor.mddescription: Refactor code for better quality
Refactor $ARGUMENTS to improve:
1. **Readability**
- Clear variable/function names
- Reduce complexity
- Extract helper functions
- Add helpful comments
2. **Maintainability**
- DRY principle
- Single responsibility
- Loose coupling
- High cohesion
3. **Type Safety**
- Replace `any` with proper types
- Add generics where helpful
- Improve type inference
4. **Modern Patterns**
- Use modern React patterns
- Leverage TypeScript features
- Apply functional programming where appropriate
IMPORTANT: Maintain exact same functionality and API - this is refactoring, not rewriting.
Stats
766
Stars
31
Forks
Maintained
Maintenance
TypeScript
Language
MIT
License
3mo ago
Last commit
9mo ago
Created
Repo: assistant-ui/tool-ui
Other commands on tool-ui.
- /component
Create new React component
Open command - /fix
Debug and fix errors
Open command - /generate-tool-ui
Generate a complete Tool UI component with docs, presets, and quality gates
Open command - /optimize
Optimize performance
Open command - /review
Comprehensive code review
Open command - /test
Generate comprehensive tests
Open command

