refactor-plan

Create a repository-specific refactor plan with phases and verification steps.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/selfagency/agentsy --skill refactor-plan-selfagency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-plan
Source: https://github.com/selfagency/agentsy/tree/main/.agents/skills/refactor-plan
Command: npx skills add https://github.com/selfagency/agentsy --skill refactor-plan-selfagency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents broken refactors by forcing a careful, repository-specific plan before any edits are made.

Core Features & Use Cases

  • Investigation-first refactoring: Searches the codebase for existing implementation details, tests, configuration, and documentation to accurately scope the change.
  • Safe sequencing for changes: Breaks work into phases that typically start with types and interfaces, then implementations, then tests, then cleanup.
  • Verification and rollback baked in: Specifies verification steps between phases and includes a rollback plan for the riskiest steps.

Quick Start

Ask for a refactor plan by saying: "Create a concrete refactor plan for my requested change, covering affected files, execution phases, verification steps, and rollback guidance, and stop after the plan for my confirmation."

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 multi-file code refactor without breaking existing functionality?

To plan a multi-file code refactor safely, you need a repository-specific investigation phase that scopes affected files and dependencies before sequencing changes. This approach prohibits edits during planning and requires confirmation before implementation begins.

What is the safest way to sequence changes across file boundaries during a refactor?

Sequencing changes across boundaries safely requires breaking the refactor into phases that typically start with types and interfaces, then implementations, then tests, then cleanup, ensuring dependencies are resolved in the correct order.

How do I verify my codebase changes between refactor phases?

To verify codebase changes between refactor phases, you must specify verification steps after each phase is executed, ensuring that the implementation matches the expected behavior before moving to the next step.

How do I create a rollback plan for risky software maintenance steps?

Creating a rollback plan for risky software maintenance steps involves identifying the most hazardous phases in your refactor sequence and defining specific reversion actions to execute if verification fails.

Can I execute code edits while generating a refactor plan?

No, you cannot execute code edits while generating a refactor plan because this process prohibits edits during the planning phase to satisfy safety requirements and prevent broken implementations.