improve-codebase-architecture

Scan a codebase for shallow modules and present deepening refactors as a visual HTML report.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/PVMalove/claude-agent-harness --skill improve-codebase-architecture-pvmalove
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/PVMalove/claude-agent-harness/tree/main/skills/vendor/mattpocock/engineering/improve-codebase-architecture
Command: npx skills add https://github.com/PVMalove/claude-agent-harness --skill improve-codebase-architecture-pvmalove

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, so teams can decide what to fix before writing any code. ## Core Features & Use Cases - Architecture scan: Explores the codebase (weighted toward recently changed hot spots from git history) to find shallow modules, leaking seams, and poor locality, applying the deletion test to each candidate. - Visual HTML report: Renders each candidate as a self-contained HTML file in the OS temp directory with Tailwind and Mermaid via CDN, including before/after diagrams, recommendation-strength badges, and ADR-conflict callouts. - Grilling loop: After the user picks a candidate, runs the /grilling skill to walk the decision tree, updating CONTEXT.md and offering ADRs as decisions crystallize. - Use Case: A team notices their order intake logic 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 agent to scan this repository for architecture improvements and show the candidates as 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 architecture improvement opportunities in my codebase?▼

Run this Skill to spawn a sub-agent that explores the codebase for shallow modules, leaking seams, and poor locality. It weights recently changed files from git history and applies the deletion test to each candidate before presenting them in an HTML report.

What is a shallow module and how do I detect one?▼

A shallow module has an interface nearly as complex as its implementation, so it adds indirection without hiding complexity. The Skill detects them by comparing interface surface to implementation depth and applying the deletion test: would deleting it concentrate complexity or just move it.

Does the architecture review write files into my repository?▼

No. The HTML report is written to the OS temp directory (resolved from $TMPDIR, falling back to /tmp or %TEMP%) with a timestamped filename, so nothing lands in the repo. The file is opened with the platform's default browser command.

What happens after I pick a candidate from the report?▼

The Skill runs the /grilling skill to walk the decision tree for that candidate: constraints, dependencies, the shape of the deepened module, and which tests survive. It updates CONTEXT.md with new domain terms and offers to record load-bearing rejections as ADRs.

How does the review handle conflicts with existing ADRs?▼

Candidates that contradict an existing ADR are only surfaced when the friction is real enough to warrant revisiting the decision. They are marked with a warning callout in the report rather than listed as routine suggestions.