Skip to content
vinvcn avatar

Improve Codebase Architecture

Scans a codebase for deepening opportunities, writes a visual HTML report, then drills into chosen candidates.

CCM score
60 of 100
skills.sh installs
6.2K
GitHub stars
6.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers exploration of shallow modules, friction points, and untested areas, scoped to recent git hot spots unless a direction is given
  • Generates a self-contained HTML report with per-candidate Files, Problem, Solution, Benefits, and before/after Mermaid or SVG diagrams
  • Enforces shared architecture vocabulary (module, seam, adapter, depth) and flags any conflicts with existing ADRs before proposing changes
  • Designed for teams refactoring toward testability and AI-navigability, with follow-up grilling and domain-glossary updates

Install

$ npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill improve-codebase-architecture -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

改进代码库架构

暴露 architectural friction,并提出 deepening opportunities:把 shallow modules 变成 deep modules 的 refactors。目标是 testability 和 AI-navigability。

这个命令由项目的 domain model 提供信息,并建立在共享 design vocabulary 上:

  • 调用 Skill 工具并指定 codebase-design,获取 architecture vocabulary(module、interface、depth、seam、adapter、leverage、locality)及其 principles(deletion test、"the interface is the test surface"、"one adapter = hypothetical seam, two = real")。每条建议都准确使用这些术语,不要漂移到 "component"、"service"、"API" 或 "boundary"。
  • GLOSSARY.md 中的 domain language 会为好的 seams 命名;docs/adr/ 中的 ADRs 记录这个命令不应重新争论的 decisions。

流程

1. 探索

先划定扫描范围:YAGNI。 深化 module 的收益在于让未来修改更容易,因此要更关注最近仍在变化的 codebase 区域。开始探索前先决定去哪里看:

  • 如果用户点名了方向(module、subsystem 或 pain point),就按该方向探索,跳过下面的推断。
  • 否则,向前回看一段足够长的 commit history(git log --oneline),找出反复出现的 files 和 areas,让这些 hot spots 成为首要关注点。如果变更分散、没有明显 hot spot,再扩大范围。

先读取项目 domain glossary(GLOSSARY.md)以及你将触碰区域的 ADRs。

然后 spawn 一个使用全新 context window 的 sub-agent 来遍历 codebase。不要套死板 heuristics;自然探索,并记录你感到 friction 的地方:

Details

Repository
github.com/vinvcn/mattpocock-skills-zh-cn
Categories
Code Review & Quality, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the improve-codebase-architecture skill do?

It scans a codebase for deepening opportunities, where shallow modules can become deep modules, and writes a self-contained HTML report with before and after diagrams for each candidate. After you pick a candidate, it runs a grilling session on that option. The goal is better testability and easier AI navigation of the code.

Is improve-codebase-architecture in the Code Review & Quality category, and which skills lead it?

It sits in the Code Review & Quality category on Claude Marketplaces, where it ranks in the top 100. The category leaders listed alongside it are codebase-design, code-review, setup-ts-deep-modules and caveman-review. This skill stands out by turning architectural friction into an HTML report with visual before and after comparisons.

How do I install improve-codebase-architecture?

Run npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill improve-codebase-architecture -y inside your project. Once installed, the agent can scan the code for shallow modules, deletion-test candidates and test gaps, then write the report to a temp directory and open it for you.

What does the skill need to run?

It reads a project GLOSSARY.md and any docs/adr/ records when they exist, and it calls the codebase-design, grilling and domain-modeling skills during the session. The report uses Tailwind and Mermaid loaded from CDNs, and it opens the HTML file with xdg-open, open or start depending on your OS.

More from vinvcn/mattpocock-skills-zh-cn

All 24

Similar to Improve Codebase Architecture

More Code Review & Quality