improve-codebase-architecturecommit 7739eaeSKILL.md · Architecture Tuning
Improve Codebase Architecture
Finds refactors that turn shallow modules into deep ones, shows them in a visual HTML report, then grills through the one you pick.
npx skills add mattpocock/skills --skill improve-codebase-architectureCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Copilot, Gemini CLI
- GitHub
- 308.7k
- Source
- Community · Matt Pocock
- Status
- Scan passed
- License
- MIT
- Category
- Architecture Tuning
Core rule
Scope before you scan: weight the parts of the codebase that have recently changed instead of refactoring everything.
Execution Phases
Phase 01Scope the search
Take the user's direction if given; otherwise use git log to find hot spots. Read GLOSSARY.md and relevant ADRs first.
Phase 02Explore for friction
A sub-agent walks the code looking for shallow modules, missing locality and leaky seams, applying the deletion test.
Phase 03Write the HTML report
Writes a self-contained HTML file to the OS temp dir, with before/after diagrams and a strength badge per candidate plus a top pick.
Phase 04Grill the chosen one
Walks constraints, dependencies and the deepened module's shape with the user, updating GLOSSARY.md and offering an ADR when warranted.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Limited | Only the HTML report in the temp directory, GLOSSARY.md and ADRs under docs/adr/; it does not edit code. |
| Command execution | Limited | Runs git log to read commit history and open, xdg-open or start to open the report. |
| Network outbound | Not required | The skill makes no network calls; the generated report loads Tailwind and Mermaid from CDNs when opened in a browser. |
SKILL.md frontmatter (YAML)
---
name: improve-codebase-architecture
description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
disable-model-invocation: true
---