Refactor
Use when refactoring code to improve structure, reduce duplication, and apply SRP/DRY principles without changing behavior.From its SKILL.md
npx -y skills add whchoi98/aws-skills-for-claude-code --skill refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 20 stars20 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.0 KB, as published. Nobody here has run it
Refactor Skill
Refactor existing code to improve quality without changing behavior.
Principles
- Improve structure without changing behavior
- Single Responsibility Principle (SRP)
- Remove duplicate code (DRY)
- Small, incremental steps with verification
Process
1. Analysis
- Identify the target code and its tests
- Map all callers and dependencies
- Confirm test coverage exists (suggest adding tests first if not)
2. Plan
Present the refactoring plan to the user:
- What will change
- What will NOT change (behavior preservation)
- Risk assessment (low/medium/high)
3. Execute
- Make changes in small, verifiable steps
- Run tests after each step if possible
- Keep commits atomic
4. Verify
- Confirm all existing tests pass
- Verify no behavior changes
- Check that the refactoring achieved its goal
Usage
Run with /refactor command