code-refactor
Installation
SKILL.md
Execute safe, targeted refactoring by analyzing code and providing actionable steps.
Process
-
Identify context:
- If code changes are involved: run
jj diff -sfirst to see changed files; then usejj diff -- pathto restrict to specific files/directories - If $ARGUMENTS provided, focus on those specific files/paths
- Understand the refactoring goal (extract function, rename, simplify, etc.)
- If code changes are involved: run
-
Spawn all three agents in parallel using the Task tool:
- Use
code-architectagent: Identify safe refactoring transformations and structural changes - Use
simplicity-revieweragent: Identify over-engineered areas to simplify, dead code to remove - Use
code-researcheragent: Research idiomatic refactoring patterns for the language
- Use
-
Synthesize findings into concrete refactoring steps