In short.
Improve Codebase Architecture is a set of written instructions for an AI coding agent, aimed at developers who want help finding where a codebase is hard to understand or test, and its main catch is that it relies on three other skills (codebase-design, grilling and domain-modeling) that are not in this folder. The agent first looks for hot spots in git history, or follows a direction you name, and explores the code in a sub-agent. It then writes a self-contained HTML report of candidate refactors (each with files, problem, solution, benefits, a before/after diagram and a Strong, Worth exploring or Speculative badge) and asks which one you want to explore, before walking through the chosen one in a questioning loop. Only the instruction text was read; nothing was run, so report quality and behaviour in a real agent are not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Scope covered: the three files in skills/engineering/improve-codebase-architecture at revision 5863806dd4e15c63174bee4e7515a4256792ecfa (SKILL.md, HTML-REPORT.md and agents/openai.yaml), read in full. The repository-level LICENSE (MIT, Copyright (c) 2026 Matt Pocock) was also read as the related notice, although it sits outside the folder. Excluded: the companion skills codebase-design, grilling and domain-modeling, any GLOSSARY.md or ADR files, the rest of the repository, and the pages the files link to. Not assessed: nothing was executed, so installation in any agent, the quality of findings and generated HTML, the behaviour of the sub-agent and grilling loop, rendering of the CDN-loaded scripts, and actual running costs are all unknown.
The overview
What this resource is
This is improve-codebase-architecture, an instruction skill in the public GitHub repository mattpocock/skills, at skills/engineering/improve-codebase-architecture [https://github.com/mattpocock/skills/tree/main/skills/engineering/improve-codebase-architecture]. The review covers repository revision 5863806dd4e15c63174bee4e7515a4256792ecfa. The folder holds three files: SKILL.md (the process), HTML-REPORT.md (the format of the report the agent must produce) and agents/openai.yaml (a display name, a short description and an invocation policy).
The SKILL.md frontmatter gives the name improve-codebase-architecture and the description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick. A deepening opportunity here means a refactor that turns a shallow module into a deep one. The stated aim is testability and AI-navigability. The licence file names Matt Pocock as copyright holder (2026). The files contain no version number, changelog or release name, so a version is unknown.
Overall assessment
On the text alone, this is a focused and detailed skill rather than a sketch. It gives a clear order of work, concrete exploration questions, a named test for shallowness (the deletion test), rules for handling conflicts with recorded decisions, a precise output location and format, and a stopping point before proposing interfaces. The report format is specified in detail: scaffold, badge colours, diagram patterns, size guidance and a mandatory vocabulary.
Its weak points are dependencies and verification. The core vocabulary comes from a separate codebase-design skill, and the second half of the workflow calls two more skills (grilling and domain-modeling); none of these are in the selected folder, so their content is unknown. Nothing was executed, so how reliable the agent's findings are, how good the generated diagrams look, and how well the grilling loop works in practice are not assessed.
Who it is for
It is written for developers who work with an existing codebase and an AI coding agent, and who want a structured way to find places where the code is awkward to understand or test. The questions it asks the agent are practical: where understanding one concept means jumping between many small modules, where an interface is nearly as complex as its implementation, where pure functions were pulled out only for testing while the real bugs sit in how they are called, where tightly coupled modules leak across their seams, and which parts are untested or hard to test.
The report's legend and before/after diagrams may help readers who are new to these ideas, but how usable the report is for beginners is unknown, because nothing was run. The evidence describes a shallow module as one whose interface is nearly as complex as its implementation, and a deep module as one with a short interface in front of a large implementation. The report and the discussion use a fixed set of terms (module, interface, depth, seam, adapter, leverage, locality) exactly, so readers will meet these terms throughout. The skill reads a project's GLOSSARY.md and any ADRs in docs/adr/ for the area being touched, and can create GLOSSARY.md if it does not exist; whether teams that already keep these files get better results than others is unknown.
What it can do
According to the instructions, the agent will: choose where to look (your named module, subsystem or pain point, or else the hot spots found by walking back through git log --oneline); read GLOSSARY.md and relevant ADRs; hand the code walk to a sub-agent with a fresh context window; apply the deletion test to anything that looks shallow; write and open a self-contained HTML report; and then lead a decision-tree conversation about whichever candidate you choose.
Each candidate card in the report carries a title naming the deepening, a badge for recommendation strength (Strong, Worth exploring or Speculative) and a tag for the dependency category (in-process, local-substitutable, ports and adapters, or mock), a monospaced file list, a before/after diagram, a one-sentence problem, a one-sentence solution, short wins bullets of six words or fewer, and an optional ADR callout. The report ends with a Top recommendation card that links to the chosen candidate.
During the grilling loop the skill can update GLOSSARY.md (adding or sharpening terms), offer to record a load-bearing rejection as an ADR so later reviews do not re-suggest the idea, and, if you want alternative interfaces, hand off to the design-it-twice parallel sub-agent pattern in the codebase-design skill.
Using it
What you need
You need an AI coding agent that can load skills and call them by name, because the instructions say to call the Skill tool with codebase-design, grilling and domain-modeling. The agent must also be able to read the repository, run git log, spawn a sub-agent, write a file to the operating system temp directory and open it with xdg-open (Linux), open (macOS) or start (Windows). The agents/openai.yaml file suggests an OpenAI-style agent configuration is supported alongside the SKILL.md format, but the evidence does not name specific products or versions that work.
The three companion skills must be available under those exact names. They are not in this folder, and their content was not read, so what they require is unknown. A browser with internet access is needed to view the report properly, because Tailwind is loaded from [https://cdn.tailwindcss.com] and Mermaid from [https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs]. Optional project inputs are a GLOSSARY.md and ADRs in docs/adr/; git history is used for hot-spot detection unless you name a direction.
How it works
Step 1, explore. The skill applies a YAGNI rule to scope: deepening a module pays off when future changes to it get easier, so recently changed code gets extra weight. If you named a direction, the agent takes it. Otherwise it reads a good stretch of commit history to find files and areas that keep coming up, and widens the search if changes are scattered. It reads GLOSSARY.md and the ADRs for the area, then spawns a sub-agent with a fresh context window to explore without rigid heuristics and note friction. For suspected shallow modules it applies the deletion test: would deleting the module concentrate complexity, or just move it? A result of concentrates is the signal it wants.
Step 2, report. The agent writes architecture-review-<timestamp>.html into the temp directory (from $TMPDIR, falling back to /tmp, or %TEMP% on Windows), so nothing is written into the repository. It opens the file and tells you the absolute path. Mermaid is used for graph-shaped diagrams (call flow, dependencies, sequences) and hand-built divs or inline SVG for more editorial visuals such as mass diagrams, cross-sections and call-graph collapses. The instructions say not to propose interfaces yet; the agent ends by asking: Which of these would you like to explore?
Step 3, grilling loop. After you choose, the agent calls the grilling skill to work through constraints, dependencies, the shape of the deepened module, what sits behind the seam and which tests survive. It calls domain-modeling inline as decisions crystallize, to keep GLOSSARY.md current. If a candidate contradicts an existing ADR, the report is meant to show it only when the friction justifies reopening the decision, with a warning callout explaining why.
Setup and invocation
The evidence contains no README or install steps, so where the folder must be placed, and how a particular agent discovers it, is unknown. The files are plain text: Markdown with YAML frontmatter plus one small YAML metadata file.
The skill is set up to run only when you ask for it. SKILL.md has disable-model-invocation: true, and agents/openai.yaml sets allow_implicit_invocation: false. The openai.yaml display name is Improve Codebase Architecture and its short description is Find and grill architecture improvements. In practice you would also need the codebase-design, grilling and domain-modeling skills installed under those names, and optionally a GLOSSARY.md and docs/adr/ folder in the project you want reviewed.
Illustrative example
This example is built from the format described in the files; it is not output from a run. Suppose you invoke the skill and say you are struggling with order handling. The agent skips git-history inference because you named a direction, reads GLOSSARY.md (which might define Order) and relevant ADRs, and sends a sub-agent through the order code. It writes a file such as /tmp/architecture-review-<timestamp>.html and opens it.
A card might be titled Collapse the Order intake pipeline (the report guide itself uses this example title), with a Strong badge, an in-process tag, the involved files in monospace, a Mermaid before diagram showing a handler that calls a validator, which calls a repository with a red leakage edge to a pricing client, and an after diagram drawn as one thick-bordered deep module. The wins might read Tests hit one interface or Pricing logic stops leaking, which the guide gives as sample phrasing. The agent then asks which candidate you want to explore and, once you choose, begins the grilling conversation.
Assessment & evidence
Limitations and risks
Missing companion skills. The skill calls three companion skills, codebase-design, grilling and domain-modeling, which are outside this folder and were not read. The full content of the shared vocabulary and principles in codebase-design, its design-it-twice pattern, and the behaviour of the grilling and domain-modeling steps therefore cannot be confirmed from this evidence. Without these skills, the agent may not follow the intended vocabulary or process. The deletion test itself is stated in SKILL.md: would deleting a suspected shallow module concentrate complexity, or just move it?
Project inputs. A GLOSSARY.md and ADRs in docs/adr/ are inputs the skill reads when present, not mandatory dependencies. The instructions say to read any ADRs in the area being touched and to create GLOSSARY.md lazily if it does not exist. Git history is used for hot-spot detection unless you name a direction.
Side effects. The report goes to the temp directory, not the repository, but the grilling loop can create or edit GLOSSARY.md as decisions form, and it offers ADRs. The instructions say terms are added inline, and only the ADR step is explicitly framed as an offer, so review any changes to GLOSSARY.md before committing. The agent also runs a command to open the file, which may not work in headless or remote environments (not established by the evidence).
External scripts. The report loads Tailwind and Mermaid from CDNs, so it needs network access to render, and it runs third-party script when opened. The scaffold initialises Mermaid with securityLevel set to loose; the files do not explain that choice. Because diagram text is generated from your code and agent output, you may prefer a stricter setting.
Rigid style. The report guide demands exact vocabulary and forbids terms such as component, service, API and boundary, with very short prose. This keeps the output consistent but may feel terse or unfamiliar to teams with different conventions. The skill's recommendation strengths are the agent's judgement; no scoring method is given.
Why these conclusions
The conclusions come directly from reading the three skill files and the licence in full. The process, the output location, the report structure and the stopping rule (no interfaces until the user chooses) are all stated explicitly, so they can be reported with confidence as intended behaviour. The invocation policy appears in two places, SKILL.md frontmatter and openai.yaml, and they agree.
Statements about quality, speed, cost, usability for beginners, and suitability for particular teams, languages or codebase sizes are left unknown because the files contain no results, examples of real output, benchmarks or usage notes, and the skill was not run. The note that the diagrams may help newcomers is a possibility, not a finding. The concerns about the companion skills and the CDN scripts follow from what the text calls and loads, not from any observed failure.
Alternatives
The files name no alternatives and make no comparisons, and none were compared here. Possible approaches to the same goal include asking an agent for an architecture review with an ad hoc prompt, using static-analysis or dependency-visualisation tools, or holding a human-led design review. How these compare with this skill in structure, vocabulary, repeatability, depth of analysis, cost or effort is unknown from the evidence. What the evidence does show is that this skill fixes a process, a report format and a vocabulary, relies on the agent's judgement for recommendation strength, and depends on three companion skills.
Evidence base
Four files were read in full at revision 5863806dd4e15c63174bee4e7515a4256792ecfa: SKILL.md (6,028 bytes), HTML-REPORT.md (6,641 bytes), agents/openai.yaml (166 bytes) and the repository-level LICENSE (1,068 bytes). The first three make up the skill; the licence is the related notice. Everything in this report about behaviour comes from these texts. The report relies on no README, issue tracker, release notes, usage statistics, author commentary, or run output, and none of these were captured.
The source address is [https://github.com/mattpocock/skills/tree/main/skills/engineering/improve-codebase-architecture]. Because that address points at the main branch, it may show newer content than the pinned revision reviewed here.
Access & freshness
Costs
No price, subscription or usage fee is stated in the files. The MIT licence grants use free of charge, so the skill text itself carries no stated cost. Running it will consume whatever your agent or model provider charges: reading git history and the code, a sub-agent with its own context window, writing a diagram-heavy HTML file, and a multi-turn grilling conversation. The evidence gives no token counts, durations or cost estimates, so the running cost is unknown and will likely vary with codebase size and how many candidates are found.
The report loads Tailwind and Mermaid from public CDNs. The evidence states no fee for these, but it also does not address their terms or availability, which are unknown.
Rights and licence
The repository-level LICENSE at the same revision is the MIT License, Copyright (c) 2026 Matt Pocock. It permits using, copying, modifying, merging, publishing, distributing, sublicensing and selling copies of the software and its documentation files, free of charge, provided the copyright notice and permission notice are included in all copies or substantial portions. The software is provided as is, with no warranty and no liability for the authors.
The licence file sits at the repository root, outside the selected folder, and the skill files themselves carry no separate licence header, so the licence is read as covering the repository including this folder. Anyone redistributing the skill should keep the MIT notice with it. The licence does not specifically address the HTML reports the agent produces or the project material included in them. Rights and confidentiality requirements for generated reports are not established by the captured evidence.
Freshness
The files were read on 2026-11-12 at revision 5863806dd4e15c63174bee4e7515a4256792ecfa. The licence names 2026 as the copyright year. The files contain no release dates, version numbers or changelog, so how recently the skill was changed, and whether later revisions differ, is unknown. The CDN references use the Mermaid major version 11 and an unpinned Tailwind CDN script, so rendered output could change over time independently of the skill text. The companion skills may also change independently of this folder.
What to do next
If you want to try it, first check that your agent supports skills and that you can obtain the codebase-design, grilling and domain-modeling skills; without them the workflow is incomplete. Pin the revision (5863806dd4e15c63174bee4e7515a4256792ecfa) to preserve this version of the instruction files, and keep the MIT notice with any copy you redistribute.
Start on a bounded area by naming a module or pain point, so the agent skips history inference and the sub-agent has a small search space. Read the generated report in a browser with network access, treat the strength badges as suggestions, and check any change the agent makes to GLOSSARY.md or docs/adr/ in version control before committing. If you are cautious about third-party scripts, review the scaffold before opening reports, especially the Mermaid securityLevel setting. Measure for yourself whether the findings are useful, because this review provides no evidence of that.
