From ck
Improves codebase design by identifying shallow modules and proposing refactors that shrink interfaces and hide decisions. Use when you have spare token budget and green tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ck:deepenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Behavior is sacred: tests green before AND after. Every change shrinks an interface or hides a decision — deepen, don't churn.**
Behavior is sacred: tests green before AND after. Every change shrinks an interface or hides a decision — deepen, don't churn.
A deep module hides a lot behind a small interface; a shallow one's interface costs as much to use as writing the code yourself. Complexity = dependencies + obscurity, and it compounds. Deepen spends spare usage paying that down before it becomes a §B. Run it when the build is green & you have budget to drain — not under deadline.
⊥ run mid-feature or under pressure. Deepen is the deliberate pass, not the reflex.
Scan the modules the spec touches. Rank by shallowness — interface surface vs work done. Pick the one worst offender. Tells:
? or §B that traces back to a confusing interface.One module per pass. Deepening is surgical, ⊥ a codebase sweep.
Name the design defect in caveman, citing file:line:
src/auth/token.go: 6-arg ctor leaks rotation policy to every caller. shallow. Complexity is real only if it shows: change amplification, high cognitive load, or an unknown-unknown (caller must know a hidden fact to call it right).
What does a deeper version look like? Pull a known pattern (hand to research for the external case → §R) or derive from the codebase's own better modules. Moves that deepen:
Draft the change as spec edits, not a silent rewrite:
Refactor ≠ rewrite. Full suite green before you start AND after. A deepening that
changes behavior is a feature in disguise — stop, route through /spec + /build.
New interface gets a test proving the old callers still work.
Done when the chosen module's interface is strictly smaller, its hidden decision no longer leaks, tests are green, and §I/§V record the new shape. One module deepened beats five churned. Budget left → pick the next shallowest, fresh pass.
npx claudepluginhub juliusbrussee/cavekit --plugin ckFinds deepening opportunities — refactors that transform shallow modules (complex interface, simple implementation) into deep modules (simple interface, rich implementation). Focuses on testability and AI-navigability.
Identifies and suggests codebase refactors that turn shallow, high-friction modules into deeper ones using deletion tests and seam analysis. Best for architecture improvement, testability, and agent navigation.
Provides shared vocabulary and principles for designing deep modules with small interfaces and rich implementations, improving testability and AI-navigability.