improve-codebase-architecture

Identify shallow modules and generate HTML architecture reviews with before/after diagrams.

Updated May 26, 2026
One-click install
npx skills add https://github.com/XWIlluDelu/agent-share --skill improve-codebase-architecture-xwilludelu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/XWIlluDelu/agent-share/tree/main/lib/improve-codebase-architecture
Command: npx skills add https://github.com/XWIlluDelu/agent-share --skill improve-codebase-architecture-xwilludelu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codebases often accumulate shallow modules whose interfaces mirror their implementations, causing architectural friction, weak test coverage through seams, and duplicated understanding across callers.

Core Features & Use Cases

  • Deepening candidate discovery: identifies where modules are shallow, where seams leak, and where the deletion test suggests complexity should concentrate.
  • Dependency-aware refactoring guidance: classifies dependencies to determine how a deepened module should be tested (in-process, local-substitutable, ports & adapters, mock).
  • Architecture review output: produces a self-contained HTML report with before/after diagrams, a clear problem/solution, and recommendation strength.
  • Interactive grilling for design: once a candidate is chosen, guides the user through constraints, dependency category, seam placement, and what tests survive.
  • Optional interface exploration: when requested, proposes alternative interface shapes for the deepened module using a parallel “design it twice” pattern.

Quick Start

Use the improve-codebase-architecture skill to generate an architecture review report for your codebase and ask which deepening candidate you want to explore next.

Frequently Asked Questions about improve-codebase-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify shallow modules in my codebase for refactoring?

To identify shallow modules for refactoring, analyze where module interfaces mirror their implementations and where seams leak complexity to callers. The architecture review discovers deepening candidates by applying a deletion test to determine where complexity should concentrate.

What is the best way to categorize dependencies for reliable testing?

Categorize dependencies for reliable testing by classifying them across in-process, local-substitutable, ports and adapters, and mock scenarios. This categorization determines how a deepened module should be tested and where to place seams for maximum leverage.

How does a ports and adapters architecture improve testability?

Ports and adapters architecture improves testability by isolating external dependencies behind boundaries that allow reliable local substitution. This pattern classifies dependencies so deepened modules can be tested without leaking implementation details through seams.

Can I generate an architecture review report with before and after diagrams?

Yes, you can generate a self-contained HTML architecture review report with before and after diagrams. The report includes a clear problem and solution statement, visual diagrams, and recommendation strength for each deepening candidate.

When should I use module deepening instead of adding more tests?

Use module deepening instead of adding more tests when shallow modules cause duplicated understanding across callers and weak test coverage through seams. Deepening concentrates complexity at the interface, creating leverage that makes testing more effective.

How do I explore alternative interface designs for a refactored module?

Explore alternative interface designs for a refactored module through an interactive grilling loop that proposes parallel design options. This design it twice pattern examines constraints, seam placement, and which tests survive to crystallize the testing strategy.