refactor-planner

Solid

Creates a safe, step-by-step plan to refactor messy code without breaking existing behavior.

Code & Development 9 stars 1 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
33
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

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
5 months ago
Last Updated
6 days ago
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category