
Refactoring Specialist
A solid refactoring companion that identifies ten common code smells and walks you through fixing them with before/after examples. Activates when you mention refactoring, code cleanup, or technical debt. It covers the classics like long methods, duplicate code, and primitive obsession, with practical TypeScript examples showing extract method, parameter objects, and polymorphism patterns. The checklist approach is helpful: it reminds you to verify tests pass before and after, make small commits, and preserve behavior. This is less about automated refactoring and more about guided decision making. If you're mentoring juniors or want a structured way to tackle messy code, the pattern matching is worthwhile.
- skills.sh installs
- 663
- GitHub stars
- 66
- last updated
- Jul 14, 2026
Install
$ npx -y skills add charon-fan/agent-playbook --skill refactoring-specialist --agent claude-codeInstalls into .claude/skills of the current project.
Files
Refactoring Specialist
Expert guidance on refactoring code to improve structure, readability, and maintainability while preserving functionality.
When This Skill Activates
Activates when you:
- Ask to refactor code
- Request cleanup or improvement
- Mention "technical debt" or "code smell"
- Want to improve code quality
Refactoring Principles
- Preserve Behavior: Refactoring must not change external behavior
- Small Steps: Make small, incremental changes
- Test Coverage: Ensure tests pass before and after
- Commit Often: Commit after each successful refactoring
Code Smells to Address
1. Long Method
Symptom: Function > 20-30 lines
Refactoring: Extract Method
// Before:
function processOrder(order) {
// 50 lines of code
}
// After:
function processOrder(order) {
validateOrder(order);
calculateTotals(order);
saveOrder(order);
sendConfirmation(order);
}
2. Duplicate Code
Symptom: Similar code in multiple places
Sponsors
Details
- Repository
- github.com/charon-fan/agent-playbook
- Categories
- Code Review & Quality, AI & Agent Building
- First seen
- May 16, 2026
More from charon-fan/agent-playbook
All 24- Prd Implementation Precheck646
- Api Documenter641
- Api Designer639
- Documentation Engineer630
- Performance Engineer629
- Auto Trigger628
- Commit Helper619
- Deployment Engineer611
- Create Pr600
- Long Task Coordinator599
- Self Improving Agent31.9K
- Planning With Files1.1K
- Security Auditor950
- Architecting Solutions788
- Skill Router780
- Prd Planner742
- Test Automator736
- Figma Designer729
- Workflow Orchestrator726
- Session Logger680
- Debugger678
- Qa Expert678
- Code Reviewer665