request-refactor-plan

Creates detailed refactor plans with tiny commits and files them as GitHub issues.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/santoshkal/chezmoi --skill request-refactor-plan-santoshkal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: request-refactor-plan
Source: https://github.com/santoshkal/chezmoi/tree/main/private_dot_config/opencode/skills/request-refactor-plan
Command: npx skills add https://github.com/santoshkal/chezmoi --skill request-refactor-plan-santoshkal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large refactors often fail because they lack a clear, incremental plan. 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 scope definition 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 Breakdown: Applies Martin Fowler's principle of making each refactoring step as small as possible so the codebase always stays in a working state. - GitHub Issue Template: Produces a standardized issue with Problem Statement, Solution, Commits, Decision Document, Testing Decisions, and Out of Scope sections. - Use Case: A developer wants to migrate a legacy module to a new architecture. The Skill interviews them about constraints, verifies assumptions against the actual codebase, and files a step-by-step refactor plan as a GitHub issue the team can execute incrementally. ## Quick Start Ask the assistant to create a refactor plan for the module you want to change and file it as a GitHub issue.

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?▼

Break the refactor into tiny commits where each step leaves the codebase in a working state, following Martin Fowler's incremental refactoring principle. This Skill guides you through scoping, decision documentation, and filing the plan as a GitHub issue.

How to create a refactoring RFC as a GitHub issue?▼

Use a structured template covering Problem Statement, Solution, Commits, Decision Document, Testing Decisions, and Out of Scope. The Skill interviews you to fill each section, then creates the issue directly on GitHub.

Does the refactor plan include test coverage analysis?▼

Yes. The Skill inspects the codebase for existing test coverage of the affected area before planning. If coverage is insufficient, it asks you to define a testing strategy before proceeding with the implementation plan.

When should I not break a refactor into tiny commits?▼

Tiny commits are almost always appropriate for behavior-preserving refactors. They may be less suitable for one-off throwaway prototypes or changes that are inherently atomic, such as a single dependency upgrade.

What goes into the decision document of a refactor plan?▼

It records modules being built or modified, interface changes, architectural decisions, schema changes, and API contracts. It deliberately excludes specific file paths and code snippets since those become outdated quickly.