improve-codebase-architecture

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

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/SevWren/Daily-Motivation-Brain-Helper --skill improve-codebase-architecture-sevwren
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/SevWren/Daily-Motivation-Brain-Helper/tree/main/CLAUDE/skills/engineering/improve-codebase-architecture
Command: npx skills add https://github.com/SevWren/Daily-Motivation-Brain-Helper --skill improve-codebase-architecture-sevwren

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 instead of vague cleanup advice. ## Core Features & Use Cases - Architecture exploration: Uses an Explore subagent to find shallow modules, seam leakage, poor locality, and untestable code, applying the deletion test to validate candidates. - Visual HTML report: Renders each candidate as a self-contained HTML file (Tailwind and Mermaid via CDN) with before/after diagrams, problem/solution summaries, and a recommendation-strength badge, written to the OS temp directory. - Guided design grilling: After you pick a candidate, it runs a grilling loop to walk constraints, dependencies, and the deepened module's shape, updating CONTEXT.md and offering ADRs as decisions crystallize. - Use Case: Point it at a service where order handling is split across six thin wrappers; it produces a report showing the call-graph collapse into one deep module, then helps you design the consolidated interface. ## Quick Start Ask the assistant to review this codebase for architecture improvements and show the deepening candidates 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 and it launches an Explore subagent that walks the code looking for modules whose interface is nearly as complex as their implementation. It applies the deletion test: if deleting a module would concentrate complexity rather than move it, that module is a deepening candidate.

What is a deep module versus a shallow module?▼

A deep module has a small interface hiding a substantial implementation, while a shallow module's interface costs almost as much as it hides. The Skill uses this vocabulary from the companion codebase-design skill and flags shallow modules as refactoring candidates.

What does the architecture review report look like?▼

The report is a single self-contained HTML file written to the OS temp directory, styled with Tailwind and using Mermaid plus hand-built SVG for before/after diagrams. Each candidate card shows files, problem, solution, benefits, and a Strong, Worth exploring, or Speculative badge.

Does the architecture review modify my repository files?▼

The HTML report is written to the OS temp directory, not the repo, so nothing lands in your project. During the grilling phase it may update CONTEXT.md with new domain terms or offer to record an ADR, but only with your agreement.

What happens after I pick a refactoring candidate?▼

The Skill runs a grilling loop that walks the design tree with you: constraints, dependencies, the deepened module's shape, and what tests survive. It can also explore alternative interfaces using a design-it-twice parallel sub-agent pattern.

When should I not use this architecture review approach?▼

Skip it when an existing ADR already forbids the refactor and the friction is not severe enough to reopen that decision. The Skill deliberately suppresses theoretical refactors that contradict recorded architectural decisions unless the pain is real.