improve-codebase-architecture

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

Updated Aug 8, 2026
One-click install
npx skills add https://github.com/wolfstar-project/code-zero --skill improve-codebase-architecture-wolfstar-project
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/wolfstar-project/code-zero/tree/main/.agents/skills/improve-codebase-architecture
Command: npx skills add https://github.com/wolfstar-project/code-zero --skill improve-codebase-architecture-wolfstar-project

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 scan using commit history or a user-named direction, then applies the deletion test to find shallow modules, seam leakage, and poor locality. - Visual HTML report: Renders each candidate as a self-contained HTML file (Tailwind and Mermaid via CDN) with before/after diagrams, recommendation-strength badges, and ADR conflict callouts, written to the OS temp directory. - Grilling loop: After the user picks a candidate, walks the decision tree via the /grilling skill, keeps CONTEXT.md and ADRs current, and can run design-it-twice exploration via /codebase-design. - Use Case: Point it at a subsystem where pricing logic leaks across modules; it produces a report showing the shallow call chain and a deepened alternative with one interface and one place to test. ## Quick Start Ask the assistant to run the improve-codebase-architecture skill on the order intake subsystem and show the 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 shallow modules in my codebase?▼

Run this Skill to scan the codebase for modules whose interface is nearly as complex as their implementation. It applies the deletion test to each suspect: if deleting the module would concentrate complexity rather than move it, it is flagged as a deepening candidate.

How to visualize architecture refactoring candidates?▼

The Skill writes a self-contained HTML report to the OS temp directory using Tailwind and Mermaid from CDNs. Each candidate gets a card with files, problem, solution, benefits, a side-by-side before/after diagram, and a recommendation-strength badge.

Does the architecture review respect existing ADRs?▼

Yes, it reads ADRs in docs/adr/ before scanning and avoids re-litigating recorded decisions. A candidate that contradicts an ADR is only surfaced with a warning callout when the friction is real enough to warrant reopening the decision.

What vocabulary does the architecture report use?▼

The report uses the /codebase-design glossary exactly: module, interface, implementation, depth, seam, adapter, leverage, and locality. It avoids substitute terms like component, service, API, or boundary, and uses CONTEXT.md for domain naming.

When should I not use this architecture review approach?▼

Skip it for greenfield code with no commit history to reveal hot spots, or when you need immediate interface proposals rather than candidate exploration. The Skill deliberately presents candidates first and only designs interfaces after you pick one.