improve-codebase-architecture

Scan a codebase for module deepening opportunities and render findings as a visual HTML report.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/kashman001/ai-workspace-template --skill improve-codebase-architecture-kashman001
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/kashman001/ai-workspace-template/tree/main/skills/improve-codebase-architecture
Command: npx skills add https://github.com/kashman001/ai-workspace-template --skill improve-codebase-architecture-kashman001

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 git history and user direction, then spawns a sub-agent to find shallow modules, seam leakage, and poor locality. - Visual HTML report: Renders each candidate as a before/after card in a self-contained HTML file using Tailwind and Mermaid via CDN, with recommendation-strength badges and ADR conflict callouts. - Grilling loop: After the user picks a candidate, walks the decision tree with companion skills (grilling, domain-modeling, codebase-design) and keeps CONTEXT.md and ADRs current. - Use Case: Point it at a recently churned subsystem; it identifies that the Order intake pipeline is shallow, shows a before/after diagram collapsing six wrappers into one deep module, and grills you through the refactor decisions. ## Quick Start Ask the agent to review the architecture of the current codebase and present deepening opportunities as an HTML 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 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 candidates and presents each finding with a before/after diagram in an HTML report.

How to generate an architecture review report as HTML?▼

The Skill writes a self-contained HTML file to the OS temp directory using Tailwind and Mermaid from CDNs, then opens it in your browser. Each candidate gets a card with files, problem, solution, benefits, and a before/after diagram.

Does the architecture review respect existing ADRs?▼

Yes, it reads ADRs in docs/adr/ before proposing changes and avoids re-litigating recorded decisions. A candidate that contradicts an ADR is only surfaced with a clear warning callout when the friction justifies reopening it.

What happens after I pick a refactoring candidate?▼

The Skill enters a grilling loop that walks the decision tree covering constraints, dependencies, and the shape of the deepened module. It updates CONTEXT.md with new domain terms and offers to record load-bearing rejections as ADRs.

When should I not run an architecture deepening review?▼

Skip it for code areas with no recent change activity, since deepening pays off mainly where future changes are likely. The Skill scopes by git history hot spots for this reason, following YAGNI.