refactor-plan

Creates a phased, verified plan for multi-file code refactors before any edits.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill refactor-plan-hoonsubin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor-plan
Source: https://github.com/hoonsubin/scrum-master-mcp-server/tree/main/.roo/skills/refactor-plan
Command: npx skills add https://github.com/hoonsubin/scrum-master-mcp-server --skill refactor-plan-hoonsubin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Multi-file refactors often fail because changes are made ad hoc without understanding dependencies, leading to broken builds and risky rollbacks. This Skill enforces an investigate-first workflow that produces a concrete, sequenced plan and waits for your confirmation before touching any code. ## Core Features & Use Cases - Investigation Before Editing: Searches the codebase, reads implementations, tests, and configs to ground the plan in the actual repository state. - Structured Phased Plan: Outputs affected files with dependency mapping, ordered phases (types first, then implementations, callers, tests, cleanup), per-phase verification steps, and rollback procedures. - Confirmation Gate: Stops after presenting the plan and asks for approval before implementing, preventing unreviewed large-scale changes. - Use Case: You need to rename a core service interface used across 30 files. The Skill maps every caller, sequences the change safely, defines verification commands per phase, and only proceeds after you approve. ## Quick Start Ask the AI to plan a refactor of the authentication module across the codebase and wait for the proposed plan before approving implementation.

Frequently Asked Questions about refactor-plan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plan a large refactor across multiple files?▼

Start by investigating the codebase to map affected files, dependencies, and hidden coupling. Then sequence changes in phases—contracts and types first, then implementations, callers, tests, and cleanup—with verification steps between phases and a rollback plan for risky stages.

What is the safest order to apply refactoring changes?▼

Apply changes in dependency order: update contracts and type definitions first, then implementations, then callers, then tests, and finally cleanup. Verify each phase compiles and passes tests before moving to the next one.

Does the refactor plan skill edit code automatically?▼

No. It investigates the repository and outputs a complete plan, then stops and asks for confirmation before making any code changes. Implementation only begins after you explicitly approve the plan.

What should a refactoring plan include to reduce risk?▼

A safe plan includes current and target state descriptions, an affected-files table with dependencies, phased execution steps with verification commands, rollback procedures for the riskiest phases, and a documented risk list with mitigations.

When should I not use a formal refactor planning workflow?▼

Skip formal planning for single-file changes, trivial renames handled by IDE tooling, or small edits with no cross-file dependencies. The overhead of phased planning only pays off when changes span multiple files or ownership boundaries.