request-refactor-plan

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

Updated Sep 20, 2024
One-click install
npx skills add https://github.com/AnasIsmai1/dotfiles --skill request-refactor-plan-anasismai1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: request-refactor-plan
Source: https://github.com/AnasIsmai1/dotfiles/tree/main/agents/.agents/skills/request-refactor-plan
Command: npx skills add https://github.com/AnasIsmai1/dotfiles --skill request-refactor-plan-anasismai1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Refactoring without a plan leads to oversized, risky changes that are hard to review and revert. This Skill turns a vague refactoring idea into a structured, interview-driven plan broken into tiny safe commits, then files it as a GitHub issue for team visibility. ## Core Features & Use Cases - Structured User Interview: Walks through problem description, alternative solutions, implementation details, and exact scope before writing anything. - Test Coverage Check: Inspects the codebase for existing test coverage of the affected area and prompts for a testing strategy if coverage is insufficient. - Tiny Commit Planning: Breaks the refactor into the smallest possible commits so the codebase stays in a working state after every step, following Martin Fowler's incremental refactoring advice. - GitHub Issue Output: Files the final plan as a GitHub issue using a fixed template covering problem statement, solution, commits, decision document, testing decisions, and out-of-scope items. - Use Case: A developer wants to split a monolithic service module. The Skill interviews them about scope and constraints, verifies the codebase state, and produces a GitHub issue with a 15-commit incremental plan the team can review and execute. ## Quick Start Ask the assistant to plan a refactor of a specific module and file it as a GitHub issue with tiny incremental commits.

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 refactor before starting to code?▼

Start by describing the problem and candidate solutions, then verify assumptions against the actual codebase. This Skill interviews you about scope and implementation details, checks test coverage, and produces a step-by-step plan of tiny commits filed as a GitHub issue.

How to break a large refactor into small safe commits?▼

Follow Martin Fowler's advice to make each refactoring step as small as possible so the program always works. The Skill generates a commit-by-commit plan where every commit leaves the codebase in a working, reviewable state.

What should a refactoring RFC or proposal include?▼

A solid refactor proposal includes a problem statement, chosen solution, a detailed commit plan, a decision document covering modules and architectural choices, testing decisions, and an explicit out-of-scope section. This Skill files exactly that structure as a GitHub issue.

Does the refactor plan include specific file paths and code snippets?▼

No. The decision document deliberately excludes specific file paths and code snippets because they become outdated quickly. It records module interfaces, architectural decisions, schema changes, and API contracts instead.

What happens if the code being refactored has no test coverage?▼

The Skill checks the codebase for existing test coverage of the affected area during planning. If coverage is insufficient, it asks you to define a testing strategy before finalizing the plan, and records testing decisions in the issue.