improve-codebase-architecture

Identifies shallow coupled modules and drafts module-deepening refactors as GitHub issue RFCs.

1|1|Updated Oct 3, 2021
One-click install
npx skills add https://github.com/benjr70/Smart-Smoker-V2 --skill improve-codebase-architecture-benjr70
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/benjr70/Smart-Smoker-V2/tree/main/.claude/skills/improve-codebase-architecture
Command: npx skills add https://github.com/benjr70/Smart-Smoker-V2 --skill improve-codebase-architecture-benjr70

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Codebases accumulate shallow, tightly-coupled modules whose interfaces are nearly as complex as their implementations, making them hard to test, navigate, and refactor safely. This Skill explores a codebase to surface that architectural friction and turns it into actionable, well-designed refactoring proposals. ## Core Features & Use Cases - Friction-driven exploration: Uses an Explore sub-agent to navigate the codebase organically, flagging clusters where understanding one concept requires bouncing between many small files. - Parallel interface design: Spawns 3+ sub-agents that each produce a radically different interface for the deepened module (minimal, flexible, common-case-optimized, ports-and-adapters), then compares them with an opinionated recommendation. - Dependency classification and testing strategy: Categorizes dependencies as in-process, local-substitutable, ports-and-adapters, or external mocks, and prescribes boundary tests that replace shallow unit tests. - GitHub issue generation: Creates a refactor RFC via gh issue create using a structured template covering problem, proposed interface, dependency strategy, and testing plan. - Use Case: A team with a microservices backend notices integration bugs hiding in the seams between small service modules. Run this Skill to get a ranked list of deepening candidates, pick one, review competing interface designs, and receive a ready-to-discuss GitHub issue. ## Quick Start Ask the assistant to explore this repository and propose module-deepening refactoring opportunities as GitHub issues.

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 large codebase?

Run this Skill to explore the codebase with an Explore sub-agent that notes where understanding one concept requires bouncing between many small files. It presents a numbered list of deepening candidates with coupling reasons and test impact, then you pick which to pursue.

What is a deep module in software design?

A deep module, from John Ousterhout's A Philosophy of Software Design, has a small interface hiding a large implementation. Deep modules are more testable because you test at the boundary instead of inside, and they reduce the integration risk that hides in seams between shallow modules.

How does it handle dependencies on external services during refactoring?

Dependencies are classified into four categories: in-process, local-substitutable, remote-but-owned, and true external. Owned remote services get a ports-and-adapters design with in-memory test adapters, while third-party services like Stripe are mocked at the boundary.

Does it create the GitHub issue automatically?

Yes, after you pick an interface design it creates a refactor RFC using gh issue create without asking for further review, then shares the URL. The issue follows a template covering problem, proposed interface, dependency strategy, and testing strategy.

What happens to existing unit tests after a module is deepened?

The strategy is replace, not layer: old unit tests on shallow modules are deleted once boundary tests exist. New tests assert on observable outcomes through the public interface so they survive internal refactors.