refactor-planner
SolidCreates a safe, step-by-step plan to refactor messy code without breaking existing behavior.
Code & Development 9 stars
0 forks Updated 3 weeks ago MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 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...
Details
- Author
- Notysoty
- Repository
- Notysoty/openagentskills
- Created
- 6 months ago
- Last Updated
- 3 weeks ago
- Language
- JavaScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
refactor-planner
Use before a non-trivial refactor. Produces a safe, staged plan that preserves behavior — plan first, edit second.
9 Updated today
babarmuhammad AI & Automation Solid
code-refactoring
When the user says 'refactor this', 'rename class', or 'move method'. Safely refactors code in any language — finds all callers, updates downstream dependencies, verifies via quality tools.
10 Updated today
event4u-app