improve-codebase-architecture

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

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill improve-codebase-architecture-kunj-sharma03
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/Kunj-Sharma03/agent-contextify/tree/main/skills-main/skills/engineering/improve-codebase-architecture
Command: npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill improve-codebase-architecture-kunj-sharma03

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 instead of leaving the analysis as vague intuition. ## Core Features & Use Cases - Hot-spot-driven exploration: Scopes the scan using git history and user direction, then applies the deletion test to identify shallow modules, seam leakage, and poor locality. - Visual HTML report: Renders each candidate refactor as a self-contained HTML file with Tailwind and Mermaid diagrams, before/after visualizations, recommendation-strength badges, and ADR conflict callouts. - Interactive grilling loop: After the user picks a candidate, walks the decision tree via the /grilling skill and keeps CONTEXT.md and ADRs current through /domain-modeling. - Use Case: A team notices their order intake flow is spread across six thin wrappers. Run this Skill to get a report showing the call-graph collapse, then grill through the chosen deepening to define one deep module with a single testable interface. ## Quick Start Ask the agent to review this codebase for architecture improvements and show the deepening 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 scan your codebase for shallow modules, seam leakage, and poor locality. It scopes the search using recent git history hot spots, applies the deletion test, and presents each candidate refactor in a visual 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, adding indirection without hiding complexity. The Skill detects them by exploring the codebase and applying the deletion test: if deleting the module would concentrate complexity rather than move it, it is a deepening candidate.

Does the architecture review write files into my repository?

No. The HTML report is written to the OS temp directory as architecture-review-<timestamp>.html and opened in your browser, so nothing lands in the repo. CONTEXT.md and ADRs are only updated later, during the grilling loop, as decisions crystallize.

How does the review handle existing ADRs that conflict with a suggestion?

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.

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

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