improve-codebase-architecture

Identifies shallow modules and proposes deepening refactors to improve codebase testability and navigability.

Updated May 7, 2026
One-click install
npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill improve-codebase-architecture-pieter-1337
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/Pieter-1337/Euricom-tsz/tree/main/.claude/skills/matt-improve-codebase-architecture
Command: npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill improve-codebase-architecture-pieter-1337

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, scattering logic across tightly-coupled files and making testing and navigation difficult. This Skill surfaces that architectural friction and proposes concrete deepening refactors grounded in your project's domain language and existing ADRs. ## Core Features & Use Cases - Architecture Exploration: Uses an Explore sub-agent to walk the codebase and detect shallow modules, pass-through abstractions, and tightly-coupled seams, applying the deletion test to validate candidates. - Deepening Proposals: Presents a numbered list of refactoring opportunities with files, problems, solutions, and benefits framed in terms of leverage and locality, while respecting existing ADRs. - Guided Design Conversation: Runs a grilling loop on the chosen candidate, updates CONTEXT.md with new domain terms, offers ADRs for rejected candidates, and can spawn parallel sub-agents to design alternative interfaces. - Use Case: Ask the Skill to review a service layer where logic is split across many small handlers; it identifies consolidation candidates, then helps you design a deep module with a small interface and testable seam. ## Quick Start Ask the assistant to review this codebase for architecture improvements and propose deepening opportunities for the most tightly-coupled modules.

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 refactoring opportunities in a codebase?

Use this Skill to explore the codebase with an Explore sub-agent that notes shallow modules, pass-through abstractions, and tightly-coupled seams. It applies the deletion test to each suspect module and presents a numbered list of deepening candidates with files, problems, and benefits.

What is a deep module versus a shallow module?

A deep module hides a large amount of behaviour behind a small interface, giving callers high leverage. A shallow module has an interface nearly as complex as its implementation, so it adds indirection without hiding complexity.

Does this Skill respect existing architecture decision records?

Yes, it reads ADRs in docs/adr before proposing changes and avoids re-litigating recorded decisions. It only surfaces a candidate that contradicts an ADR when the friction is real enough to warrant reopening it, and marks the conflict clearly.

How does the Skill handle external dependencies when deepening modules?

It classifies dependencies as in-process, local-substitutable, remote but owned, or true external. For network or third-party dependencies it recommends ports and adapters, with in-memory or mock adapters for tests and HTTP or queue adapters for production.

When should I not introduce a new interface or seam?

Avoid introducing a seam when only one adapter would ever satisfy it, since a single-adapter seam is just indirection. The Skill follows the rule that one adapter means a hypothetical seam and two adapters mean a real one.