
request-refactor-plan
通过用户访谈创建带小提交的详细重构计划,然后作为 GitHub issue 提交。适用于用户想规划重构、创建重构 RFC,或把重构拆成安全的增量步骤时。
- Installs
- 2.1K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/vinvcn/mattpocock-skills-zh-cn --skill request-refactor-plan- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads request-refactor-plan automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
当用户想创建 refactor request 时调用此 skill。按以下步骤执行。你可以跳过你认为不必要的步骤。
-
让用户详细描述他们想解决的问题,以及可能的 solution ideas。
-
探索 repo,验证他们的 assertions,并理解 codebase 当前状态。
-
询问他们是否考虑过其他 options,并向他们展示其他 options。
-
围绕 implementation 访谈用户。要非常详细、彻底。
-
敲定 implementation 的 exact scope。弄清你计划改什么,以及不改什么。
-
在 codebase 中检查该区域的 test coverage。如果 coverage 不足,询问用户的 testing plans。
-
把 implementation 拆成 tiny commits 的计划。记住 Martin Fowler 的建议:“make each refactoring step as small as possible, so that you can always see the program working.”
-
使用 refactor plan 创建 GitHub issue。issue description 使用下面模板:
Problem Statement
developer 面对的问题,从 developer 视角描述。
Solution
问题的 solution,从 developer 视角描述。
Commits
一份很长、详细的 implementation plan。用 plain English 写,把 implementation 拆到尽可能小的 commits。每个 commit 都应让 codebase 保持 working state。
Decision Document
已作出的 implementation decisions 列表。可以包括:
- 将 build/modify 的 modules
- 将 modify 的 module interfaces
- 来自 developer 的 technical clarifications
- Architectural decisions
- Schema changes
- API contracts
- Specific interactions
不要包含具体 file paths 或 code snippets。它们可能很快过时。
Testing Decisions
已作出的 testing decisions 列表。包括:
- 什么是好测试的描述(只测试 external behavior,不测试 implementation details)
- 哪些 modules 会被测试
- 测试的 prior art(即 codebase 中类似类型的 tests)
Out of Scope
本 refactor 范围外事项的描述。
Further Notes (optional)
关于 refactor 的其他 notes。
</refactor-plan-template>FAQ
What does the request-refactor-plan skill do?
通过用户访谈创建带小提交的详细重构计划,然后作为 GitHub issue 提交。适用于用户想规划重构、创建重构 RFC,或把重构拆成安全的增量步骤时。
How do I install request-refactor-plan?
Run npx skills add https://github.com/vinvcn/mattpocock-skills-zh-cn --skill request-refactor-plan in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/request-refactor-plan/ (personal) or .claude/skills/request-refactor-plan/ (project).
Which AI agents can use request-refactor-plan?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is request-refactor-plan safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains request-refactor-plan?
It is published by vinvcn in vinvcn/mattpocock-skills-zh-cn. It has 2,125 recorded installs.
More from vinvcn/mattpocock-skills-zh-cn
grill-with-docs
vinvcn/mattpocock-skills-zh-cn
一个用来打磨计划或设计的持续追问式访谈,并在过程中创建文档(ADRs 和词汇表)。
setup-matt-pocock-skills
vinvcn/mattpocock-skills-zh-cn
为此仓库配置 engineering skills:设置其 issue tracker、triage labels 词汇与 domain docs 布局。在首次使用其他 engineering skills 前运行一次。
tdd
vinvcn/mattpocock-skills-zh-cn
测试驱动开发。适用于用户想用先写测试的方式构建功能或修复缺陷、提到 “red-green-refactor”,或需要集成测试时。
improve-codebase-architecture
vinvcn/mattpocock-skills-zh-cn
扫描代码库中的深化机会,生成可视化 HTML 报告,然后围绕你选中的候选项继续追问。
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.