improve-codebase-architecture

Detect shallow modules and propose deepening refactors using project glossary and ADRs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill finds architectural friction in a codebase and turns it into clear refactoring opportunities, helping you spot shallow modules, tighten seams, and improve testability and AI-navigability.

Core Features & Use Cases

  • Architecture exploration: Scans a repository for places where understanding a concept requires bouncing between many small modules.
  • Deepening recommendations: Proposes refactors that consolidate behavior into deeper modules with better leverage and locality.
  • Domain-aware guidance: Uses the project glossary and ADRs so recommendations respect existing language and decisions.
  • Review output: Produces a structured HTML architecture report with candidates, diagrams, and a top recommendation.

Quick Start

Ask the skill to review this repository and generate an architecture report with the strongest deepening 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 find shallow modules in my codebase during an architecture review?

To find shallow modules during an architecture review, scan your repository for architectural friction where understanding a concept requires bouncing between many small modules, then consolidate behavior into deeper modules with better locality and leverage.

What is the best way to refactor code to improve testability and AI-navigability?

The best way to refactor code for testability and AI-navigability is to identify shallow modules and architectural seams, then propose deepening refactors that tighten those seams and consolidate scattered behavior into cohesive, deep modules.

How do I use ADRs and a project glossary to guide architecture refactoring?

Use ADRs and a project glossary to guide architecture refactoring by reading existing domain vocabulary and architectural decisions first, ensuring proposed deepening opportunities respect established language and preserve locality within the codebase.

Can I generate an architecture report with deepening recommendations for my repository?

Yes, you can generate an architecture report by scanning the repository for architectural friction, which produces a structured HTML output containing refactoring candidates, diagrams, and a top recommendation for module deepening.

What are deep modules and why do they matter for codebase architecture?

Deep modules consolidate behavior to provide high leverage and strong locality, reducing the architectural friction caused when understanding a feature requires bouncing between many small, shallow modules across the codebase.

Does this architecture review work for codebases without existing ADRs?

Yes, but without existing ADRs or a project glossary, the architecture review lacks domain-aware guidance, meaning proposed deepening opportunities may not fully respect prior architectural decisions or established domain vocabulary.