Command
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
781
Stars
30
Forks
Active
Maintenance
TypeScript
Language
MIT
License
14d ago
Last commit
10mo ago
Created
Repo: assistant-ui/tool-ui
Other commands on tool-ui.
Command
Command
generate-tool-ui
Generate a complete Tool UI component with docs, presets, and quality gates
Command
Command
Command

