improve-codebase-architecture

Scan a codebase for module deepening opportunities and present them as a visual HTML report.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/The-Focus-AI/walking-thoughts --skill improve-codebase-architecture-the-focus-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/The-Focus-AI/walking-thoughts/tree/main/.agents/skills/improve-codebase-architecture
Command: npx skills add https://github.com/The-Focus-AI/walking-thoughts --skill improve-codebase-architecture-the-focus-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making them hard to test and navigate. This Skill surfaces that architectural friction and proposes concrete deepening refactors grounded in a shared design vocabulary. ## Core Features & Use Cases - Hot-spot-driven exploration: Scopes the review using commit history and user direction, then spawns a sub-agent to find shallow modules, seam leakage, and poor locality. - Visual HTML report: Renders candidates as a self-contained Tailwind/Mermaid HTML file in the OS temp directory, with before/after diagrams, recommendation badges, and a top recommendation. - Grilling loop: After the user picks a candidate, walks the decision tree, updates CONTEXT.md domain terms, and offers ADRs for load-bearing rejections. - Use Case: A team notices their order intake flow is scattered across six thin wrappers. Run this Skill to get a visual report of deepening candidates, pick one, and grill through the design of the consolidated deep module. ## Quick Start Ask the assistant to review this codebase for architecture deepening opportunities and show the candidates in an HTML report.

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?

Run this Skill to scan the codebase for modules whose interface is nearly as complex as their implementation. It applies the deletion test to candidates and presents each finding with a before/after diagram in an HTML report.

How to generate an architecture review report as HTML?

The Skill writes a self-contained HTML file to the OS temp directory using Tailwind and Mermaid from CDNs, then opens it in your browser. Each candidate gets a card with files, problem, solution, benefits, and a before/after diagram.

Does the architecture review respect existing ADRs?

Yes, it reads ADRs in docs/adr/ before proposing changes and avoids re-litigating recorded decisions. A candidate that contradicts an ADR is only surfaced with a clear warning callout when the friction justifies reopening it.

What happens after I pick a refactoring candidate?

The Skill runs a grilling loop that walks the decision tree covering constraints, dependencies, and the shape of the deepened module. It updates CONTEXT.md with new domain terms and offers to record load-bearing rejections as ADRs.

When should I not use this architecture review approach?

Skip it for greenfield code with no commit history to reveal hot spots, or when you already know the exact refactor you want. The exploration phase is designed for finding friction, not executing a predetermined change.