improve-codebase-architecture

Scan a codebase for module deepening opportunities and present them as a visual HTML report.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/gmackie/agent-skills --skill improve-codebase-architecture-gmackie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/gmackie/agent-skills/tree/main/skills/improve-codebase-architecture
Command: npx skills add https://github.com/gmackie/agent-skills --skill improve-codebase-architecture-gmackie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making them hard to test and navigate. This Skill surfaces that architectural friction and proposes concrete deepening refactors grounded in a shared design vocabulary. ## Core Features & Use Cases - Hot-spot-driven exploration: Scopes the review using commit history and user direction, then walks the codebase for shallow modules, seam leakage, and poor locality. - Visual HTML report: Generates a self-contained Tailwind and Mermaid report in the OS temp directory with before/after diagrams, recommendation-strength badges, and ADR conflict callouts. - Decision grilling loop: After the user picks a candidate, walks constraints and trade-offs while keeping CONTEXT.md and ADRs current. - Use Case: Point it at a subsystem where pricing logic leaks across modules; it renders a report showing the leakage and proposes collapsing the pipeline into one deep module with a single testable interface. ## Quick Start Ask the agent to review the codebase for architecture improvements and generate the HTML report of deepening candidates.

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 architecture improvement opportunities in a codebase?▼

Run this Skill to walk the codebase for shallow modules, seam leakage, and poor locality, weighted toward recently changed hot spots from git history. It presents each candidate as a before/after diagram in an HTML report with a recommendation strength badge.

What is a shallow module and how do I deepen it?▼

A shallow module has an interface nearly as complex as its implementation, so it adds indirection without hiding complexity. Deepening means collapsing wrappers and consolidating responsibility behind one small interface, which becomes the single test surface.

Does the architecture review write files into my repository?▼

No. The HTML report is written to the OS temp directory as architecture-review-<timestamp>.html and opened in your browser, so nothing lands in the repo. CONTEXT.md and ADRs are only updated during the grilling loop when decisions crystallize.

How does the review handle conflicts with existing ADRs?▼

Candidates that contradict an existing ADR are only surfaced when the friction is real enough to warrant revisiting the decision. They are marked with a warning callout explaining why the ADR is worth reopening, rather than listing every theoretical refactor.

When should I not run an architecture deepening review?▼

Skip it for code that rarely changes, since deepening pays off by easing future modifications. Also avoid re-suggesting refactors that ADRs already rejected unless new friction justifies reopening the decision.