
Refactoring Specialist
Guided refactoring for ten named code smells, with before-and-after examples and a step-by-step checklist.
- skills.sh installs
- 663
- GitHub stars
- 89
- last updated
- Jul 14, 2026
What it does
- Covers the refactoring workflow: identify the smell, pick a technique, confirm tests pass, apply the change, rerun tests, and commit
- Includes 10 smell-to-technique patterns such as Long Method, Duplicate Code, Large Class, Feature Envy, and Switch Statements, each with TypeScript examples
- Enforces small, atomic commits and a before-and-after checklist requiring passing tests and a rollback plan
- Activates on requests to refactor, clean up, or mention technical debt or code smells, and logs activity via session-logger
Install
$ npx -y skills add zhaono1/agent-playbook --skill refactoring-specialist -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/zhaono1/agent-playbook
- Categories
- Code Review & Quality, Testing & QA
- First seen
- May 16, 2026
More from zhaono1/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 Agent35.8K
- 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
Similar to Refactoring Specialist
More Code Review & Quality
refactor-advisorlaolaoshiren/claude-code-skills-zh117 installsSystematic code refactoring advisor that scans for smells, ranks issues by severity, and outlines fixes.
refactoring-surgeoncuriositech/some_claude_skills161 installsBehavior-preserving refactoring guide that enforces tests first and catalogs code smells with fixes.
code-refactoring-refactor-cleansickn33/agentic-awesome-skills982 installsRefactoring playbook that analyzes code smells and applies incremental, behavior-preserving changes with test verification.
refactoring-analysispedronauck/skills432 installsAudit codebases for refactoring opportunities using Fowler's code smells and techniques, with a prioritized report.