One-click install
npx skills add https://github.com/docs-plus/docs.plus --skill improve-codebase-architecture-docs-plus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/docs-plus/docs.plus/tree/main/.agents/skills/improve-codebase-architecture
Command: npx skills add https://github.com/docs-plus/docs.plus --skill improve-codebase-architecture-docs-plus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the friction of maintaining codebases with scattered shallow modules, where logic is duplicated across many small wrappers, changes require editing multiple locations, and testing is fragmented across low-value unit tests instead of targeting core behavior.

Core Features & Use Cases

  • Shallow module detection: Automatically identifies modules where interface complexity nearly matches implementation complexity, indicating poor leverage.
  • Deepening opportunity surfacing: Proposes concrete refactors to consolidate scattered logic into deep modules with small, high-leverage interfaces.
  • Visual architecture reports: Generates self-contained HTML reports with before/after diagrams illustrating module shallowness and proposed deepening changes.
  • Interface design exploration: Supports iterative design of alternative interfaces for selected deepening candidates using a parallel sub-agent pattern.
  • Use case: For a codebase with order processing logic split across 5 small, tightly-coupled modules, this skill surfaces the opportunity to collapse them into a single deep order module with one testable interface, eliminating duplicate validation logic and reducing test maintenance overhead.

Quick Start

Use the improve-codebase-architecture skill to analyze your codebase and generate a visual report of architecture improvement opportunities.

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 a codebase for architecture refactoring?

Architecture refactoring identifies shallow modules by detecting where interface complexity nearly matches implementation complexity, indicating poor leverage. This surfaces architectural friction caused by scattered logic and duplicated wrappers, highlighting opportunities to consolidate them into deep modules with smaller, high-leverage interfaces.

What is the best way to improve code testability when logic is duplicated across small modules?

Improving code testability involves collapsing scattered, tightly-coupled modules into a single deep module with one testable interface. This eliminates duplicate validation logic and reduces fragmented low-value unit tests, directly targeting core behavior instead of maintaining wrappers.

Can I generate visual before and after diagrams for proposed module design changes?

Yes, visual architecture review reports can be generated as self-contained HTML files. These reports include before and after diagrams illustrating module shallowness alongside proposed deepening changes, providing a clear visual representation of the refactoring impact.

How do I explore alternative interface designs for deepening candidates?

Interface design exploration supports iteratively designing alternatives for selected deepening candidates. It uses a parallel sub-agent pattern to evaluate different interface structures, helping you choose the optimal high-leverage design for your refactored modules.

When do I need to deepen shallow modules in software architecture?

Deepening shallow modules is needed when changes require editing multiple locations and testing is fragmented across low-value unit tests. This architectural friction indicates that scattered wrappers lack leverage and should be consolidated into deeper, unified implementations.