Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable. Surfaces shallow modules and hypothetical seams using a precise vocabulary (Module / Interface / Implementation / Depth / Seam / Adapter / Leverage / Locality from LANGUAGE.md).
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-04 | ✓→✗ | ▼ Worse | -24% | 0% |
| case-05 | ✓→✗ | ▼ Worse | 14% | 0% |
Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in LANGUAGE.md.
Key principles (see LANGUAGE.md for the full list):
This skill is _informed_ by the project's domain model — CONTEXT.md and any docs/adr/. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate. See CONTEXT-FORMAT.md and ADR-FORMAT.md.
Read existing documentation first:
CONTEXT.md (or CONTEXT-MAP.md + each CONTEXT.md in a multi-context repo)docs/adr/ (and any context-scoped docs/adr/ directories)If any of these files don't exist, proceed silently — don't flag their absence or suggest creating them upfront.
Optional pre-pass — export inventory injection (mapper-supported projects only):
Before dispatching the Explore subagent, call extractSemanticSlices(filePath, { type: 'exports' }) from scripts/lib/language-mappers/index.mjs on known entry-point files (e.g., index.ts, src/index.ts, main export barrel). If the mapper returns a non-empty result, format the export list as structured context and inject it into the Explore subagent prompt. This gives the subagent an immediate map of the codebase's public surface without requiring it to grep manually.
## Export inventory (auto-generated)
- src/lib/foo.ts: exports `createFoo`, `FooConfig`, `FooError`
- src/lib/bar.ts: exports `processBar`This pre-pass is OPTIONAL — only activate when the entry-point file is mapper-supported (TypeScript/JavaScript). For unsupported file types, extractSemanticSlices returns an empty array and the pre-pass is silently skipped. Never block Explore dispatch on a mapper failure.
Then use the Agent tool with subagent_type=Explore to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
Present a numbered list of deepening opportunities. For each candidate:
Use CONTEXT.md vocabulary for the domain, and LANGUAGE.md vocabulary for the architecture. If CONTEXT.md defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
ADR conflicts: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly (e.g. _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize:
CONTEXT.md? Add the term to CONTEXT.md — same discipline as /domain-model (see CONTEXT-FORMAT.md). Create the file lazily if it doesn't exist.CONTEXT.md right there.Other measured skills in the registry, with their headline benchmark lift.