一键导入
improve-codebase-architecture
Surface architectural friction in a codebase and apply deepening improvements.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Surface architectural friction in a codebase and apply deepening improvements.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | improve-codebase-architecture |
| description | Surface architectural friction in a codebase and apply deepening improvements. |
| disable-model-invocation | true |
Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
Use this shared design vocabulary — stay on these terms, don't drift into "component," "service," "API," or "boundary":
Principles:
The domain language in docs/architecture-notes.md and docs/business-rules.md
names good seams. Create docs/glossary.md lazily when shared terminology
is needed across docs.
Read the project's architecture docs (docs/architecture-notes.md,
docs/business-rules.md) first.
Then use the Agent tool with subagent_type=Explore to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
Summarize the candidates directly in conversation. For each candidate, describe:
Strong, Worth exploring, SpeculativeEnd the summary with a Top recommendation: which candidate you'd tackle first and why.
Use the domain vocabulary from docs/architecture-notes.md,
docs/business-rules.md, and the terms defined above. If
docs/glossary.md exists, use its terms — don't drift into "component,"
"service," "API," or "boundary."
Existing decision conflicts: if a candidate contradicts a decision recorded in an existing doc, only surface it when the friction is real enough to warrant revisiting that decision. Mark it clearly. Don't list every theoretical refactor a past decision forbids.
Ask the user: "Which of these would you like me to implement?"
Once the user picks a candidate, apply the deepening improvement to the best of your ability. This means:
npm run build, npm run test:coverage). Fix any regressions. Maintain the minimum 80% coverage threshold in every reported Istanbul cell.docs/ when the change introduces a new concept, sharpens a fuzzy term, or alters a documented decision.Record durable decisions as you go:
docs/. Create docs/glossary.md lazily if a cross-cutting glossary is needed.The architecture review is complete when:
Router for 67 bundled design themes. Use whenever building or restyling UI and a visual direction is needed — it maps the desired vibe (minimal, playful, retro, enterprise, glassmorphism, etc.) to the right theme file to load. Trigger on "design style", "make it look...", "UI theme", "visual direction", or any request to build a page/app with a specific aesthetic.
Produce a new album entry for the app. Use when asked to add, analyse, or create an album entry.
Remove AI slop from every file in the repo — code, docs, config, and data.
Extremely strict maintainability review hunting code-judo restructurings — abstraction quality, the 1k-line rule, and spaghetti growth.
Quality-gate execution for repository hygiene and release readiness. Use when the user asks to run a quality gate, clean all Problems panel issues, fix lint/test/coverage failures, or verify the branch meets strict 80%+ coverage thresholds without suppression.
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.