improve-codebase-architecture

Detect shallow modules and generate HTML reports with deepening refactor diagrams.

1|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/a35506322/Lab.Todo --skill improve-codebase-architecture-a35506322
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/a35506322/Lab.Todo/tree/main/.cursor/skills/improve-codebase-architecture
Command: npx skills add https://github.com/a35506322/Lab.Todo --skill improve-codebase-architecture-a35506322

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain point of codebases with scattered, shallow modules that duplicate logic, are hard to test, and are difficult for AI tools to navigate, leading to slow development and frequent bugs when making changes.

Core Features & Use Cases

  • Shallow Module Detection: Automatically identifies modules where the interface complexity nearly matches the implementation complexity, a key sign of poor depth and duplicated logic.
  • Deepening Recommendations: Proposes concrete, domain-aligned refactors to consolidate scattered logic into deep modules with small, high-leverage interfaces, improving testability and maintainability.
  • Visual Architecture Reports: Generates self-contained HTML reports with before/after diagrams of proposed changes, respecting your project's existing ADRs and domain language to avoid re-litigating past decisions.
  • Use Case: For a codebase with 4 separate small modules each handling a piece of user authentication logic, this skill would identify that these can be deepened into a single AuthValidator module with one interface, eliminating duplication and making tests run against a single test surface.

Quick Start

Use the improve-codebase-architecture skill to scan the current repository and generate an HTML report of architecture deepening opportunities aligned with the project's domain language and existing ADRs.

Frequently Asked Questions about improve-codebase-architecture

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

FAQPage Schema
What is a shallow module in codebase architecture and why does it cause duplicated logic?

A shallow module in codebase architecture has interface complexity that nearly matches its implementation complexity, causing duplicated logic and poor testability. Identifying these modules allows you to consolidate scattered code into deep modules with small, high-leverage interfaces.

How do I find shallow modules for refactoring to improve codebase testability?

To find shallow modules for refactoring and improve codebase testability, scan your repository to identify modules where interface complexity nearly matches implementation complexity. This detection process highlights opportunities to consolidate scattered logic into deep, unified interfaces.

Can I generate visual architecture reports for proposed codebase refactoring?

Yes, you can generate visual architecture reports for proposed codebase refactoring. The process creates self-contained HTML reports featuring before and after diagrams of proposed deepening refactors, aligned with ports and adapters patterns to improve testability.

Does architecture refactoring respect existing ADRs and project domain language?

Architecture refactoring respects existing ADRs and project domain language by design. Deepening recommendations are generated to align with your project's established domain language and architecture decision records, avoiding the re-litigation of past technical decisions.

What is the best way to consolidate scattered authentication logic into a deep module?

The best way to consolidate scattered authentication logic into a deep module is to identify the separate small modules handling each piece and propose a domain-aligned refactor. This consolidates them into a single module like an AuthValidator with one interface, eliminating duplication.

Why does improving codebase architecture help with AI navigability?

Improving codebase architecture helps with AI navigability because shallow modules with duplicated logic are difficult for AI tools to navigate. Deepening modules into consolidated structures with small interfaces creates a cleaner, more navigable architecture for AI assistance.