Skip to content
SkillModel-led1,320 tokens in use

Improve Codebase Architecture

Scans a codebase for deepening opportunities, shows them in a visual HTML report, then interviews you through the candidate you choose.

328,754 stars on the repository MIT Licensemattpocock/skills · skills/engineering/improve-codebase-architecture
claude plugin install mattpocock-skills@claude-plugins-official
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Improve Codebase Architecture costs

32tokens idle
1,320tokens in use
2,930tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts and code blocks. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Fair
  • Frontmatter8/15
  • Structure17/25
  • Examples0/15
  • Output10/15
  • Size15/15
  • Resources7/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity96
  • Maintenance100
  • Community56
  • Maturity32
  • Momentum40

Improve Codebase Architecture looks for shallow modules whose refactor into deep ones would improve testability and navigation for agents. It weights recently changed code using git history, spawns a sub-agent with a fresh context to walk the codebase, and applies the deletion test to suspect modules.

Results go into a self-contained HTML report with a before and after visual for each candidate and a Top recommendation section.

What You Get

  • An HTML report in the temp directory, built with Tailwind and Mermaid loaded from CDNs
  • A card per candidate with files, problem, solution, benefits, a before and after diagram and a Strong, Worth exploring or Speculative badge
  • ADR conflicts flagged on the card when the friction justifies reopening a decision
  • A grilling session on your chosen candidate with glossary updates and optional ADRs

Common Use Cases

  • Running a periodic architecture survey every few days
  • Pointing the survey at one module or pain point you already suspect
  • Choosing the first refactor to tackle from a ranked set of candidates

What Makes It Unique

It ties the survey to hot spots in git history, speaks the codebase-design vocabulary and the project’s own glossary, and draws a visual before and after for every candidate. It offers an ADR only when a rejection reason would stop future reviews from suggesting the same refactor again.

Under The Hood

The model runs git log, reads files, and writes one HTML file to the temp directory, then opens it with xdg-open, open or start depending on the OS. The page loads Tailwind from cdn.tailwindcss.com and Mermaid from cdn.jsdelivr.net in your browser. A sub-agent walks the code. After you choose a candidate, the skill calls grilling, domain-modeling and optionally codebase-design, which may edit GLOSSARY.md and ADRs.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers