improve-codebase-architecture

Identify shallow modules and propose deepening refactors for codebase architecture.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces architectural friction by identifying where code is shallow—where interfaces expose too much implementation detail or where tests can’t reliably verify behavior through a stable seam.

Core Features & Use Cases

  • Explore architectural friction by scanning the codebase and noting shallow modules, missing seams, and weak locality.
  • Surface deepening opportunities with clear candidates, including the involved files/modules, the problem, the proposed change, and benefits framed as locality and leverage.
  • Grill a chosen candidate to converge on safe refactoring decisions, deep module boundaries, and (when needed) alternative interface designs via parallel sub-agent exploration.

Quick Start

Use the improve-codebase-architecture skill to walk through your selected area of the codebase, identify deepening candidates, and choose one to refine into a refactoring plan that improves testability through the interface seam.

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 refactoring?

To identify shallow modules, scan the codebase for interfaces that expose too much implementation detail or lack stable seams. This reveals architectural friction where understanding behavior requires bouncing across many modules.

What is the best way to improve codebase architecture and testability?

Improve codebase architecture by finding shallow modules and proposing deepening refactors that increase leverage at module interfaces. This approach enhances testability by ensuring tests verify behavior through stable seams.

How do I fix leaky seams and weak locality in my software architecture?

Fix leaky seams by surfacing deepening opportunities with clear candidates that frame benefits as locality and leverage. You then grill a chosen candidate to converge on safe refactoring decisions and deep module boundaries.

When do I need to redesign module interfaces during a refactoring?

Redesign module interfaces when deepening a shallow module requires alternative designs. A grilling loop crystallizes the design and uses parallel sub-agent exploration to propose optional interface redesigns.

Does architectural refactoring require an exploration phase before listing candidates?

Yes, architectural refactoring requires an exploration phase to scan the codebase and note missing seams. This precedes a candidate-listing phase that defines the problem, proposed change, and locality benefits.