Agent skill

Deepen Module Design

by JuliusBrussee in JuliusBrussee/cavekit

Scans the code a spec touches for its shallowest module, then proposes a refactor that hides more behind a smaller interface without changing behavior.

MITAuto-check passedDevelopment

Install Deepen Module Design

skills CLI
$ npx skills add JuliusBrussee/cavekit --skill deepen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JuliusBrussee/cavekit deepen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JuliusBrussee/cavekit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deepen .claude/skills/deepen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deepen
GitHub stars
1.2k
Token cost
~1k tokens
SKILL.md length
519 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Scans the code a spec touches for its shallowest module, then proposes a refactor that hides more behind a smaller interface without changing behavior.

  • Works in 5 steps: PICK THE SHALLOW → DIAGNOSE → RESEARCH THE DEEPENING → …
  • A build is green and there is spare token budget before a deadline
  • SKILL.md covers WHEN TO DEEPEN, FIVE STEPS, WHEN TO STOP and BOUNDARIES
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill runs as an optional pass inside the cavekit plugin for Claude Code, meant for moments when a build is green and you have spare budget rather than a deadline. It scans the modules a spec touches, ranks them by how shallow their interface is compared to the work they do, and settles on the single worst offender to fix in that pass.

Once a target is picked, it names the design defect with a file and line citation, then researches a deeper version of the module by pulling a known pattern or looking at other modules already built well in the codebase. The proposal comes back as edits to the project's spec sections, not a silent rewrite, and the rule is that tests stay green both before and after the change.

When your agent uses it

  • A build is green and there is spare token budget before a deadline
  • A module's interface feels as complex as writing the code yourself
  • The same kind of change keeps touching many files across the codebase
  • You want a design-improvement proposal instead of an unplanned rewrite

Example prompts

  • “Deepen the shipping-rate module now that the build is green.”
  • “This auth token constructor feels shallow, pull the complexity down.”
  • “Use spare budget to improve the design around the billing module.”

Requirements

  • The cavekit plugin's spec-driven workflow for Claude Code

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. PICK THE SHALLOW
  2. DIAGNOSE
  3. RESEARCH THE DEEPENING
  4. PROPOSE
  5. VERIFY BEHAVIOR HELD

What it can do on your machine

Read from SKILL.md and the folder at commit 7421e87. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deepen Module Design loads about 1k tokens when it runs. Until then it costs about 147 tokens; SKILL.md has 519 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~147
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JuliusBrussee/cavekit at commit 7421e87, republished under its MIT licence (© JuliusBrussee). 519 words, ~1,005 tokens.

Download SKILL.mdSave it as .claude/skills/deepen/SKILL.md (or your agent's skills folder).
name
deepen
description
Optional design-improvement pass for when you have spare usage to drain. Finds the shallowest modules in the code the spec touches, researches a deeper design, and proposes refactors that shrink interfaces and hide decisions — behavior held constant, tests green before and after. Proposes §I/§V/§T edits, never silent rewrites. Triggers when the user says "deepen this", "improve the design", "this module feels shallow", "pull complexity down", "use spare budget on the codebase", or invokes /ck:deepen. Leans on the codebase-design skill's deep-module vocabulary when present.

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.
Show full SKILL.md (186 more words)Show less
4. PROPOSE

Draft the change as spec edits, not a silent rewrite:

  • New/simpler §I shape for the module.
  • §V that locks the deepened invariant so a future build can't re-shallow it.
  • §T refactor row(s), each citing the §V/§I it serves. Hand to spec to write. Show the before/after interface so the user sees the shrink.
5. VERIFY BEHAVIOR HELD

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.

WHEN TO STOP

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.

BOUNDARIES

  • ⊥ change behavior. Green before, green after. Pure structure.
  • ⊥ write SPEC.md. Propose §I/§V/§T; spec writes.
  • ⊥ deepen more than one module per pass.
  • ⊥ run under deadline or mid-feature. This is the spare-budget pass.
  • ⊥ add abstraction for single-use code. A deep module earns its hiding; a speculative one is just more surface.

© JuliusBrussee, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/deepen of JuliusBrussee/cavekit.

Open the folder on GitHubat commit 7421e87

Compare with similar skills

Deepen Module Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deepen Module Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deepen Module Design this skillJuliusBrussee/cavekit1.2k—~1kAutomated safety check: PassMIT
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence
Brooks Audithyhmrright/brooks-lint1.5k1 repos~537Automated safety check: PassMIT
Birdview ReviewQiuner/birdview727—~580Automated safety check: PassMIT
Py Rigmudrii/hermesd118—~6.3kAutomated safety check: PassMIT
Vanity Engineering Reviewbencium/bencium-marketplace446—~2.4kAutomated safety check: PassMIT

Similar skills

  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Brooks Audit

    hyhmrright/brooks-lint

    Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books.

    1.5k GitHub starsUsed in 1 repo~537 tokens
    DevelopmentAuto-check passed
  • Birdview Review

    Qiuner/birdview

    Review and improve codebase architecture with source-backed current/proposed diagrams, tradeoffs and verification.

    727 GitHub stars~580 tokensUpdated today
    DevelopmentAuto-check passed
  • Py Rig

    mudrii/hermesd

    A skill your agent uses when building, reviewing, or refactoring Python code that requires strong maintainability discipline: SRP, DRY, OCP, explicit dependency injection, TDD/ATDD workflow, strict…

    118 GitHub stars~6.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Vanity Engineering Review

    bencium/bencium-marketplace

    Reviews codebases, architectures, PRs, and technical plans for vanity engineering — code and systems built for the developer's ego, resume, or intellectual pleasure rather than delivering user or…

    446 GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • A Philosophy of Software Design

    ciembor/agent-rules-books

    Apply John Ousterhout-inspired software design rules when reducing complexity, designing module boundaries, or reviewing APIs and abstractions.

    2.9k GitHub stars~181 tokensUpdated 28 days ago
    DevelopmentAuto-check passed

More from JuliusBrussee/cavekit

All 8 skills in this repo
  • Backprop: Bug-to-Spec Protocol

    JuliusBrussee/cavekit

    After a bug is found, traces its root cause and feeds a new testable invariant back into the project spec so the bug class can't recur.

    1.2k GitHub stars~653 tokensUpdated 1 mo ago
    Auto-check passed
  • Caveman Spec Compression

    JuliusBrussee/cavekit

    Compresses SPEC.md writes and spec-referencing prose into terse, symbol-heavy fragments that drop articles, filler and hedging while keeping facts intact.

    1.2k GitHub stars~721 tokensUpdated 1 mo ago
    Auto-check passed
  • Spec Drift Check

    JuliusBrussee/cavekit

    Read-only detector that compares SPEC.md with the code and reports invariant, interface and task drift grouped by severity, without changing anything.

    1.2k GitHub stars~666 tokensUpdated 1 mo ago
    Auto-check passed
  • Adversarial Spec Review

    JuliusBrussee/cavekit

    Builds a skeptical reviewer grounded in the codebase and research notes to try to refute a spec before any code is written, citing file:line evidence and ending in a go or no-go gate.

    1.2k GitHub stars~959 tokensUpdated 1 mo ago
    Auto-check passed
  • Grill Before Spec

    JuliusBrussee/cavekit

    Interrogates a vague idea one question at a time, recommending an answer each round and recording results as goals and constraints before a spec is written.

    1.2k GitHub stars~812 tokensUpdated 1 mo ago
    Auto-check passed
  • Research

    JuliusBrussee/cavekit

    Gather external knowledge the spec needs and distill it into §R — the durable research log — so build grounds in facts instead of hallucinating library behavior.

    1.2k GitHub stars~782 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Deepen Module Design

What does Deepen Module Design do?

Scans the code a spec touches for its shallowest module, then proposes a refactor that hides more behind a smaller interface without changing behavior. This skill runs as an optional pass inside the cavekit plugin for Claude Code, meant for moments when a build is green and you have spare budget rather than a deadline. It scans the modules a spec touches, ranks them by how shallow their interface is compared to the work they do, and settles on the single worst offender to fix in that pass.

When should I use Deepen Module Design?

Deepen Module Design fits situations like: A build is green and there is spare token budget before a deadline; A module's interface feels as complex as writing the code yourself; the same kind of change keeps touching many files across the codebase; you want a design-improvement proposal instead of an unplanned rewrite.

How do I install Deepen Module Design in Claude Code?

Run `npx skills add JuliusBrussee/cavekit --skill deepen -a claude-code`. Or copy the skill folder (skills/deepen in JuliusBrussee/cavekit) into .claude/skills/deepen in your project. Claude Code loads it when a task matches its description.

How do I install Deepen Module Design in Codex?

Run `npx skills add JuliusBrussee/cavekit --skill deepen -a codex`. Or copy the skill folder (skills/deepen in JuliusBrussee/cavekit) into .agents/skills/deepen in your project. Codex loads it when a task matches its description.

Can I use Deepen Module Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JuliusBrussee/cavekit --skill deepen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deepen, .gemini/skills/deepen, .github/skills/deepen and .opencode/skills/deepen in your project.

What does Deepen Module Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Deepen Module Design is instructions for the agent only. Our summary lists: The cavekit plugin's spec-driven workflow for Claude Code.

Does Deepen Module Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Deepen Module Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deepen Module Design use?

Deepen Module Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deepen Module Design use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deepen Module Design?

Skills that share tags, products or a category with Deepen Module Design: Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars), Brooks Audit (hyhmrright/brooks-lint, 1.5k stars), Birdview Review (Qiuner/birdview, 727 stars) and Py Rig (mudrii/hermesd, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deepen Module Design?

JuliusBrussee (a GitHub user) maintains it in JuliusBrussee/cavekit, which has 1,152 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on August 14, 2026.

Source: JuliusBrussee/cavekit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.