improve-codebase-architecture

Scans codebases for module deepening opportunities and renders findings as a visual HTML report.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making code hard to test and navigate. This Skill finds those architecture friction points and presents concrete refactoring candidates instead of vague advice. ## Core Features & Use Cases - Hotspot-guided exploration: Uses git history to find frequently changed areas, then applies the deletion test to identify shallow modules, leaking seams, and missing locality. - Visual HTML report: Renders each candidate as a card with before/after diagrams (Mermaid plus hand-built SVG), recommendation strength badges, and ADR conflict warnings, written to the OS temp directory. - Follow-up decision loop: After you pick a candidate, it drives a grilling-style conversation about constraints, seams, and tests, updating CONTEXT.md and offering ADRs along the way. - Use Case: Run it on a service that has grown messy over months of feature work; it opens an HTML report showing, for example, that your order intake pipeline is six shallow layers that should be merged into one deep module. ## Quick Start Ask the agent to review this repository's architecture and show deepening opportunities in 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 architecture refactoring opportunities in my codebase?▼

Run this Skill to scan git history for hotspots, then explore those areas for shallow modules, leaking seams, and poor locality. It presents each finding as a visual candidate card in an HTML report with a recommendation strength badge.

What is a deep module versus a shallow module?▼

A shallow module has an interface nearly as complex as its implementation, adding indirection without leverage. A deep module hides significant implementation behind a small interface. This Skill uses that vocabulary from the codebase-design skill to evaluate candidates.

Does the architecture review modify my repository files?▼

The HTML report is written to the operating system temp directory, never into the repository. During follow-up discussion it may update CONTEXT.md with new domain terms or offer to record rejected candidates as ADRs, but only with your confirmation.

How does the review handle existing ADRs that conflict with a suggestion?▼

Candidates contradicting an existing ADR are only shown when the friction is real enough to justify reopening the decision. The card is explicitly flagged with a warning referencing the ADR, and theoretical refactorings the ADR forbids are omitted.

What diagram types does the HTML report use?▼

It combines Mermaid flowcharts and sequence diagrams for dependency and call-flow structure with hand-built div and SVG visuals for quality diagrams, cross-sections, and call-tree merges. Every candidate gets a side-by-side before/after visualization.