AutomationNewFreeWorks in Claude Code · Claude app · Codex
Refactoring
Improve code structure safely with named refactorings. (For developers.)
Part of Book skills by @wondelai ↗Applies Martin Fowler's named refactorings to improve structure without changing behavior.
What it does
- Applies named refactorings to clean code.
- Improves structure while preserving behavior.
When it kicks in
Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", "technical debt", "move method", "inline variable", "decompose conditional", or "clean up this messy code".
Topics the skill covers
- Core Principle
- Code Smells as Triggers
- Composing Methods
- Moving Features Between Objects
- Organizing Data
- Simplifying Conditional Logic
- Safe Refactoring Workflow
- Common Mistakes
What's inside the download
7 files in the .zip:
- Skill InstructionsSKILL.md15.6 KB
- Composing Methodsreferences/composing-methods.md11.6 KB
- Moving Featuresreferences/moving-features.md12 KB
- Organizing Datareferences/organizing-data.md12.7 KB
- Refactoring Workflowreferences/refactoring-workflow.md14 KB
- Simplifying Conditionalsreferences/simplifying-conditionals.md12.8 KB
- Smell Catalogreferences/smell-catalog.md13.2 KB
How to install (2 minutes)
Same download for Claude Code, Claude app, Codex — follow the step for the tool you use.
- 1Download the .zip and unzip it — you’ll get a folder called refactoring-patterns.
- 2In the Claude app: open Settings → Capabilities → Skills, choose Add / Upload, and select the folder (or the .zip).
- 3In Claude Code: drop the folder into your project’s .claude/skills/ directory, then type /skills to confirm it loaded.
- 4In Codex: drop the folder into ~/.agents/skills/ (or your project’s .agents/skills/), then type /skills — or call it directly with $refactoring-patterns.
- 5That’s it — the skill activates on its own when it fits what you’re doing.
New to skills? Our Claude Cowork beginner's guide shows how they work inside Claude.
Want to get the most out of your new skill?
Inside Hands-On AI Club we show you exactly how to use skills like this in real work — with step-by-step courses that show every move.
