refactoring
Installation
SKILL.md
Refactoring
Refactor code in small, behavior-preserving steps so the next change becomes easier, safer, and cheaper.
When To Use
- You need to improve structure without changing externally observable behavior.
- A feature is hard to add because the current design is awkward.
- A bug fix is blocked by confusing, tangled, or duplicated code.
- You need to understand legacy code before touching it.
- You want a small, safe refactoring plan instead of a vague cleanup pass.
When Not To Use
- You are intentionally changing product behavior.
- The code is ugly, but you do not need to touch it.
- A rewrite is clearly cheaper and lower risk than incremental restructuring.
- There is no practical way to verify behavior and the risk is unacceptable.
Related skills
More from benmix/skills
advanced-engineer
Reliable end-to-end engineering workflow for debugging, root-cause analysis, minimal patching, and verification in production codebases. Use when Codex needs to investigate a failure systematically, trace execution, test hypotheses, implement a correct fix, validate the resolution, and check for regressions before declaring the task complete.
17writing-maestro
Use when drafting or revising human-facing prose such as docs, essays, prompts, UI copy, reports, commit messages, PR text, or polished long-form writing. Combines anti-AI-trope editing with clear and concise style rules for stronger, more natural prose.
16