request-refactor-plan

Creates a detailed refactor plan with tiny commits and files it as a GitHub issue.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/pd-phuc/laravel-template --skill request-refactor-plan-pd-phuc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: request-refactor-plan
Source: https://github.com/pd-phuc/laravel-template/tree/main/.claude/skills/request-refactor-plan
Command: npx skills add https://github.com/pd-phuc/laravel-template --skill request-refactor-plan-pd-phuc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large refactors often fail because they are attempted in one giant change without a clear plan, test strategy, or incremental safety. This Skill turns a vague refactoring idea into a structured, interview-driven plan broken into tiny, safe commits and published as a GitHub issue. ## Core Features & Use Cases - Structured Interview Process: Gathers the problem statement, explores the codebase to verify assumptions, and challenges the user with alternative approaches before committing to a solution. - Tiny Commit Planning: Breaks the refactor into the smallest possible commits following Martin Fowler's principle, so the codebase stays in a working state after every step. - GitHub Issue Generation: Produces a complete issue using a fixed template covering problem statement, solution, commit plan, decision document, testing decisions, and out-of-scope items. - Use Case: A developer wants to split a monolithic service into modules. The Skill interviews them about scope and constraints, checks existing test coverage, then files a GitHub issue with a step-by-step commit plan the team can execute and review. ## Quick Start Ask the assistant to create a refactor plan for the module you want to restructure and answer its interview questions.

Frequently Asked Questions about request-refactor-plan

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

FAQPage Schema
How do I plan a large code refactor safely?▼

Plan a large refactor by interviewing stakeholders on the problem and scope, verifying assumptions against the actual codebase, and breaking the work into tiny commits. Each commit should leave the codebase in a working state, following Martin Fowler's incremental refactoring advice.

How to break a refactor into small commits?▼

Break a refactor into small commits by identifying the smallest behavior-preserving change possible at each step, such as extracting one method or renaming one concept at a time. The plan should ensure the test suite passes after every individual commit.

What should a refactoring RFC or plan document include?▼

A refactoring plan should include a problem statement, the proposed solution, a detailed commit-by-commit implementation plan, a decision document covering modules and architectural choices, testing decisions, and an explicit out-of-scope section. Avoid embedding file paths or code snippets that quickly become outdated.

Does the refactor plan include test coverage checks?▼

Yes, the process inspects the codebase for existing test coverage of the affected area before planning. If coverage is insufficient, it asks the user to define their testing strategy before finalizing the commit plan.

When should I not use an interview-based refactor planning process?▼

Skip the full interview process for trivially small changes like renaming a single variable or fixing a localized bug. The multi-step planning workflow is designed for refactors with meaningful scope, architectural decisions, and risk that justify a documented plan.