improve-codebase-architecture

Identifies shallow modules and proposes deepening refactors rendered as an HTML architecture report.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/ttphats/project-detedxs26 --skill improve-codebase-architecture-ttphats
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/ttphats/project-detedxs26/tree/main/.augment/skills/custom/mattpocock/improve-codebase-architecture
Command: npx skills add https://github.com/ttphats/project-detedxs26 --skill improve-codebase-architecture-ttphats

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, scattering logic across many small files and making the code hard to test and navigate. This Skill surfaces that architectural friction and proposes concrete deepening refactors grounded in the project's own domain language and ADRs. ## Core Features & Use Cases - Architecture exploration: Walks the codebase with CodeGraph tools to find shallow modules, leaking seams, and tightly-coupled clusters, applying the deletion test to each candidate. - HTML review report: Renders candidates as a self-contained HTML file with Tailwind and Mermaid before/after diagrams, recommendation-strength badges, and a top recommendation. - Grilling loop and interface design: After the user picks a candidate, runs a design conversation that updates CONTEXT.md, offers ADRs for rejected candidates, and spawns parallel sub-agents to propose radically different interfaces. - Use Case: Ask for an architecture review of a ticketing backend; receive an HTML report showing, for example, how an order intake pipeline of six shallow wrappers could collapse into one deep module with a single testable interface. ## Quick Start Ask the assistant to review this repository's architecture and produce a report of deepening opportunities.

Frequently Asked Questions about improve-codebase-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find refactoring opportunities in a large codebase?▼

Run an architecture review that explores the codebase with CodeGraph tools, looking for shallow modules whose interfaces match their implementation complexity. Each candidate is presented with a before/after diagram, problem statement, and recommendation strength.

What is a deep module versus a shallow module?▼

A deep module hides a large amount of behaviour behind a small interface, giving callers leverage and maintainers locality. A shallow module has an interface nearly as complex as its implementation, so deleting it would just move complexity elsewhere.

How does the architecture review report get generated?▼

The review is written as a single self-contained HTML file in the OS temp directory, using Tailwind and Mermaid from CDNs. It opens automatically in the browser and nothing is written into the repository.

Does the review respect existing architecture decision records?▼

Yes, ADRs in docs/adr/ are read before proposing candidates. A candidate that contradicts an ADR is only surfaced when the friction justifies reopening it, and it is marked with a warning callout referencing the ADR.

When should I not introduce a seam or port between modules?▼

Avoid a seam when only one adapter would ever exist, since a single-adapter seam is just indirection. Introduce a port only when at least two adapters are justified, typically a production adapter and an in-memory test adapter.