deepen

deepen is a skill for Claude Code, Codex from JuliusBrussee/cavekit. It costs 137 tokens per session (975 once invoked), scanned A, original, MIT.

A design-review pass for improving a codebase's deepest structural weakness while keeping its behavior unchanged. It studies the shallowest module touched by the specification and proposes smaller interfaces and clearer boundaries.

In plain words
What is it for?
Use it to diagnose a shallow module, research a better design, and propose specification and code changes that hide decisions while preserving behavior and keeping tests green.
Why use it?
It addresses code where the interface is nearly as complicated as the implementation or where one change requires edits in many places. It is intended for spare time after tests already pass.

Skill for Claude CodeCodex

Part of the ck plugin — 8 skills, 7 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/juliusbrussee/cavekit/deepen
Any agent
npx skills add JuliusBrussee/cavekit --skill deepen
Clone the repo
git clone --depth 1 https://github.com/JuliusBrussee/cavekit

Made for: Claude Code, Codex.

Or install ck, the plugin that ships this one along with the rest of its 8 skills, 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deepen

README.md
[![agentmods](https://agentmods.dev/badge/skills/juliusbrussee/cavekit/deepen.svg)](https://agentmods.dev/skills/juliusbrussee/cavekit/deepen)
Your own site
<a href="https://agentmods.dev/skills/juliusbrussee/cavekit/deepen"><img src="https://agentmods.dev/badge/skills/juliusbrussee/cavekit/deepen.svg" alt="Measured on agentmods" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 975 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00137 $0.00975
Opus 5 $0.00068 $0.00487
Sonnet 5 $0.00027 $0.00195
Haiku 4.5 $0.00014 $0.00097

Measured 4d ago against content hash 5b8c9a74f0b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deepen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/deepen/SKILL.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

deepen — make modules deep

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.

WHEN TO DEEPEN

  • Build is green, tests pass, & you have token budget spare.
  • A module's interface feels as complex as its implementation (shallow smell).
  • The same change keeps touching many files (change amplification).
  • User explicitly asks to improve design quality.

⊥ run mid-feature or under pressure. Deepen is the deliberate pass, not the reflex.

FIVE STEPS

1. PICK THE SHALLOW

Scan the modules the spec touches. Rank by shallowness — interface surface vs work done. Pick the one worst offender. Tells:

  • Pass-through method that only forwards to one other (shallow layer).
  • Caller must set 5 flags right to use it (config leakage).
  • Same abstraction repeated at two layers (no information hiding).
  • A ? or §B that traces back to a confusing interface.

One module per pass. Deepening is surgical, ⊥ a codebase sweep.

2. DIAGNOSE

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).

3. RESEARCH THE DEEPENING

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:

  • Pull complexity down — hide the hard part inside, give callers the simple path.
  • Define errors out of existence — design the interface so the edge can't occur.
  • Information hiding — one decision, one module; callers don't learn it.
  • General-purpose interface over a pile of special-case methods.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 85 lines · 137 tokens per session scan A 5b8c9a74f0b6

Subscribe to this mod's changes

deepen is a skill published in the GitHub repository JuliusBrussee/cavekit (1,142 stars, last pushed 20d ago), licensed MIT. It adds 137 tokens to every session and 975 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

build-executor

Govern implementation from an approved execution contract. Invoke when execution-contract.md is approved and the user wants disciplined build work, TDD execution, or guarded batch-by-batch implementation.

MageByte-Zero/spec-superflow · 39 tokens

workflow-start

Primary entry point for the spec-superflow state-machine workflow. Invoke when the user is inside an active spec-superflow change directory (look for .spec-superflow.yaml, changes/ /, proposal.md, specs/, design.md, tasks.md, or execution-contract.md) and asks to start, continue, resume, implement, plan, or figure out…

MageByte-Zero/spec-superflow · 125 tokens

release-archivist

Close out a spec-superflow change with verification, summary, and archive readiness. Invoke when implementation is complete, verification is underway, or the user asks for a final wrap-up.

MageByte-Zero/spec-superflow · 42 tokens

bug-investigator

Use when encountering any bug, test failure, or unexpected behavior during spec-superflow execution, before proposing fixes. Invoked automatically when build-executor hits a blockage.

MageByte-Zero/spec-superflow · 37 tokens

spec-writer

Create or refine spec-superflow planning artifacts. Invoke when the change is understood well enough to write proposal.md, specs/, design.md, and tasks.md.

MageByte-Zero/spec-superflow · 35 tokens

contract-builder

Convert approved planning artifacts into an execution contract. Invoke when the user wants to start building, asks to move from planning to implementation, or when execution-contract.md is missing or stale.

MageByte-Zero/spec-superflow · 39 tokens