用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mtvrkan/senior-dev-kit --skill refactor-safe命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use to generate or refresh a codebase architecture overview — directory map, data flow, key component responsibilities — so future research reuses it instead of rediscovering the codebase.
Use before implementing large, multi-file, architecture, DB, auth, payment, or unclear features. Produces a detailed plan; no code.
Use when starting a new project from scratch. Establishes contracts, design system, and architecture skeleton before any feature code. Enforces phase gates to prevent incoherence and bugs.
基于 SOC 职业分类
正在显示 SKILL.md
| name | refactor-safe |
| description | Use for safe refactors that preserve behavior. Keep diffs small and verification strong. |
| allowed-tools | Read, Grep, Glob, Bash, Edit, Write |
| when_to_use | Use automatically only when the change must leave behavior identical. |
| argument-hint | [file or module to refactor] |
Behavior must be identical before and after. If tests don't exist: write them FIRST, then refactor.
One concern per diff: rename | move | extract | restructure — never combine two.
Run tests before edit, record baseline. Apply ONE mechanical transformation only. Run same tests after — must be identical pass/fail.
Diffs >150 lines → split into sequential mini-refactors. No features/bugfixes in same diff.
Read budget: refactored file + grep for symbol importers + existing test file. Imports updated across independent files → apply in one parallel batch.
Refactor that moves a module boundary (extract, restructure): run /arch-check before and after. The point of a boundary refactor is that violations go down — unmeasured, "cleaner" is an opinion.
Deep reference: agent_docs/testing-strategy.md (baseline coverage before refactor) · agent_docs/architecture.md (module boundary rules).
CONCERN: [rename | move | extract | restructure]
· [files changed — count]
TEST BEFORE: [N passed] → TEST AFTER: [N passed — ✓ identical]
RISK: low