deepen

Identifies shallow modules in a codebase and proposes deepening refactors rendered as an HTML report.

Updated May 3, 2026
One-click install
npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill deepen-spikelab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepen
Source: https://github.com/spikelab/multiplai-cc-mktplace/tree/main/plugins/multiplai-dev/skills/deepen
Command: npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill deepen-spikelab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jinja2, and includes scripts (resource) components.

What problem does it solve? Codebases accumulate shallow modules — thin wrappers, pass-through functions, and single-use helpers whose interfaces are nearly as complex as their implementations. This makes code hard to test, hard for AI agents to navigate, and spreads bugs across many files. This Skill audits a codebase for these friction points and proposes concrete deepening refactors that consolidate logic behind small, testable interfaces. ## Core Features & Use Cases - Architectural audit: Explores the codebase (weighted toward recently changed hot spots), applies the deletion test, and surfaces 3–8 deepening candidates classified by dependency category (in-process, local-substitutable, ports-and-adapters, mock). - HTML report generation: Renders candidates as a self-contained HTML report with Mermaid before/after diagrams via a Jinja2-based Python script, opened automatically in the browser. - Multi-language idiom packs: Ships idiom guides for Python, Swift, TypeScript, and React that map the architecture vocabulary (module, interface, seam, adapter) to native constructs like Protocol, protocol, interface, and hook seams. - Guided design loop: After the user picks a candidate, runs a grilling conversation, updates CONTEXT.md domain glossaries, offers ADRs for rejected candidates, and can spawn parallel sub-agents to design alternative interfaces. - Use Case: Before letting AI agents loose on a legacy service, run the audit to find tightly-coupled modules leaking across seams, review the HTML report, then deepen the top candidate into one interface with one test surface. ## Quick Start Ask the assistant to review this repository for shallow modules and produce an architecture report of deepening opportunities.

Frequently Asked Questions about deepen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find refactoring opportunities in a codebase?

Run the deepen audit, which explores the codebase with an Explore sub-agent weighted toward recently changed hot spots. It applies the deletion test to detect shallow modules and presents 3–8 deepening candidates in an HTML report with before/after Mermaid diagrams.

What is a deep module versus a shallow module?

A deep module hides a lot of behavior behind a small interface, giving callers leverage and maintainers locality. A shallow module has an interface nearly as complex as its implementation, such as pass-through wrappers or single-call helpers, and is a candidate for collapsing.

Does this architecture review work with Python, Swift, and React code?

Yes. The skill detects the repo's primary languages by file extension counts and loads matching idiom packs for Python, Swift, TypeScript, and React. Each pack maps the shared vocabulary to native constructs like Protocol, protocol, interface, and hook seams.

What dependencies are needed to generate the HTML report?

The report renderer runs via uv, which reads the script's inline PEP 723 header and fetches Jinja2 in an ephemeral environment. Network access is needed on first run; the codebase analysis itself needs no network.

When should I not deepen a module?

Skip deepening when the deletion test shows nothing concentrates — for example a trivially readable helper used in one place. Also avoid introducing a seam with only one adapter, since a single-adapter seam is just indirection.