← ClaudeAtlas

refactor-plannerlisted

Creates a safe, step-by-step plan to refactor messy code without breaking existing behavior.
Notysoty/openagentskills · ★ 9 · Code & Development · score 80
Install: claude install-skill Notysoty/openagentskills
# Refactor Planner ## What this skill does This skill directs the agent to analyze a block of code (or an entire module) and produce an ordered, safe refactoring plan. Rather than rewriting everything at once, it breaks the work into small, reversible steps — each one leaving the tests green and the behavior unchanged. It identifies code smells, maps dependencies, flags high-risk areas, and sequences the changes so you can ship incrementally without introducing regressions. Use this when you have messy, hard-to-understand code that works but needs cleaning up before you can safely add features. ## How to use ### Claude Code / Cline Copy this file to `.agents/skills/refactor-planner/SKILL.md` in your project root. Then ask the agent: - *"Use the Refactor Planner skill on `src/utils/dataProcessor.ts`."* - *"Plan a safe refactor of this function using the Refactor Planner skill."* Paste in the code you want refactored, or point to a file path. ### Cursor Add the "Prompt / Instructions" section below to your `.cursorrules` file, or paste it directly into the Cursor AI pane before sharing the code you want refactored. ### Codex Paste the target code into the chat along with the instructions from the section below. For large files, include the full file plus any files that import from it so Codex can map dependencies. ## The Prompt / Instructions for the Agent When asked to plan a refactor, follow these steps precisely: 1. **Read the code thoroughly.** If a file path