improve-codebase-architecture

Analyze module depth, seams, locality, and coupling to identify refactoring opportunities.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify architectural friction in a codebase and turn shallow modules into deeper ones that are easier to test, easier to understand, and easier for AI agents to navigate.

Core Features & Use Cases

  • Architectural exploration: Finds modules where understanding requires bouncing across too many files or where the interface is nearly as complex as the implementation.
  • Refactoring candidates: Surfaces consolidation opportunities, tighter seams, and places where coupling is leaking across modules.
  • Testability improvements: Highlights where better locality, clearer seams, and deeper interfaces would improve both human and automated testing.
  • Use Case: An engineer asks for help improving a tangled subsystem, and the Skill produces a visual architecture review with concrete candidates and a top recommendation.

Quick Start

Ask the Skill to review your codebase architecture and surface the best refactoring candidates.

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 architectural friction and refactoring opportunities in my codebase?

To find architectural friction, analyze module depth, seams, locality, and coupling to identify shallow modules needing deeper interfaces. This surfaces consolidation opportunities and tighter seams to improve testability, domain language clarity, and AI-navigability without re-litigating settled architecture.

What is a shallow module and how does it affect codebase testability?

A shallow module has an interface nearly as complex as its implementation, requiring bouncing across too many files to understand logic. Deepening these modules improves testability by establishing clearer seams and better locality for both human and automated testing.

How do I review my codebase architecture to surface the best refactoring candidates?

Review codebase architecture by reading project glossaries, decisions, and code structure to propose module deepening opportunities. Analyze where coupling leaks across modules to produce a visual architecture review with concrete refactoring candidates and a top recommendation.

Does this architectural refactoring approach work with existing project ADRs?

Yes, this approach reads project decisions and glossary entries to guide analysis. It proposes refactoring opportunities that respect and build upon settled architecture rather than re-litigating prior design decisions.

When should I not use architectural refactoring to deepen modules?

Avoid module deepening refactoring when prior architecture decisions have already settled the design constraints. Re-litigating settled architecture defeats the purpose; only surface refactoring candidates where coupling leaks across modules without overriding established project context.