request-refactor-plan
This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.
-
Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions. The user may also provide links to Linear issues, Figma designs, or Notion documents.
-
Gather external context. If the user provided references to external tools, use the available MCP tools to pull in context:
- Linear: The user may provide a ticket code (e.g.,
EO-1234) or a URL. Fetch issue details, comments, and project context to understand the motivation, constraints, and prior discussion around the refactor. - Figma: The user may provide a Figma URL. Fetch design context if the refactor involves UI changes, to understand the target design.
- Notion: The user may provide a page title or a URL. Search Notion by title if no URL is given. Fetch documents for architectural decision records, tech debt inventories, or related specs.
Use this context to inform your understanding of the refactor scope. If no external references are provided, skip this step.
- Linear: The user may provide a ticket code (e.g.,
-
Explore the repo to verify their assertions and understand the current state of the codebase.
-
Ask whether they have considered other options, and present other options to them.
-
Interview the user about the implementation. Be extremely detailed and thorough. Refer back to any external context gathered in step 2 to avoid re-asking questions already answered in external sources.
-
Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.
-
Look in the codebase to check for test coverage of this area of the codebase. If there is insufficient test coverage, ask the user what their plans for testing are.
-
Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice to "make each refactoring step as small as possible, so that you can always see the program working."
-
Ask the user where they'd like to save this RFC — for example a local file path, a GitHub wiki page, a Notion or Confluence doc. Use the following template, then save or deliver it appropriately for the chosen destination.
Problem Statement
The problem that the developer is facing, from the developer's perspective.
Solution
The solution to the problem, from the developer's perspective.
Commits
A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.
Decision Document
A list of implementation decisions that were made. This can include:
- The modules that will be built/modified
- The interfaces of those modules that will be modified
- Technical clarifications from the developer
- Architectural decisions
- Schema changes
- API contracts
- Specific interactions
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
Testing Decisions
A list of testing decisions that were made. Include:
- A description of what makes a good test (only test external behavior, not implementation details)
- Which modules will be tested
- Prior art for the tests (i.e. similar types of tests in the codebase)
Out of Scope
A description of the things that are out of scope for this refactor.
Further Notes (optional)
Any further notes about the refactor.
More from evans-sam/skills
grill-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
15prd-to-issues
Turn a PRD into independent ticket artifacts — GitHub issues, Linear tickets, local files, or Notion pages — with HITL/AFK tags and dependency links. Each ticket is a tracer-bullet vertical slice. Use when user wants to produce standalone work items from a PRD. Not for a live feature-building workflow.
12write-a-prd
Create a PRD through user interview, codebase exploration, and module design, then save as a local markdown document. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.
12git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git and gh CLI commands before they execute. Use when user wants to prevent destructive git operations, block dangerous GitHub CLI actions (repo delete, pr merge, secret management, API mutations), or add git/gh safety hooks to Claude Code.
11tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
10prd-to-plan
Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
10