improve-codebase-architecture

Scan a codebase for shallow modules and present deepening refactors as an HTML report.

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

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 those architectural friction points and turns them into concrete, visualized refactoring candidates. ## Core Features & Use Cases - Hot-spot-driven exploration: Scopes the scan using git history and user direction, then explores the codebase for shallow modules, leaky seams, and poor locality. - Visual HTML report: Generates a self-contained Tailwind/Mermaid report in the OS temp directory with before/after diagrams, recommendation-strength badges, and a top recommendation. - Guided decision loop: After the user picks a candidate, runs a grilling workflow that updates the domain glossary (CONTEXT.md) and offers ADRs for load-bearing rejections. - Use Case: A team notices their order-processing code is hard to test. Run this Skill to get a visual report of deepening opportunities, pick one, and walk through the refactor decisions interactively. ## Quick Start Ask the assistant to review this codebase for architecture improvement opportunities and show the results as a visual report.

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 my codebase?▼

Run this Skill to scan your codebase for shallow modules, leaky seams, and poor locality. It weights recently changed files from git history, then presents each candidate as a card in a visual HTML report with before/after diagrams.

What is a shallow module and how do I detect one?▼

A shallow module has an interface nearly as complex as its implementation, adding indirection without hiding complexity. The Skill applies the deletion test: if deleting the module would concentrate complexity rather than just move it, it is a deepening candidate.

Where does the architecture review report get saved?▼

The report is written as a self-contained HTML file to the OS temp directory ($TMPDIR, /tmp, or %TEMP%) named architecture-review-<timestamp>.html, so nothing lands in your repository. It is opened automatically in your browser.

Does the architecture review respect existing ADRs?▼

Yes, the Skill reads ADRs in docs/adr/ before suggesting changes and avoids re-litigating recorded decisions. It only surfaces a candidate that contradicts an ADR when the friction is real enough to warrant reopening it, marked with a warning callout.

What happens after I pick a refactoring candidate?▼

The Skill runs a grilling loop that walks the decision tree with you: constraints, dependencies, the deepened module's shape, and test impact. It updates CONTEXT.md with new domain terms and offers to record load-bearing rejections as ADRs.