deepen

deepen is a skill for Claude Code, Codex from mehrad-dm/mastermind. It costs 108 tokens per session (1,020 once invoked), scanned A, original, MIT.

A survey step for finding the parts of a software design that will cost the most to change later. It ranks a small number of candidates and lets the user choose what to address.

In plain words
What is it for?
Use it to investigate a messy area of a codebase, identify costly design debt, and select a refactoring target. It does not perform the restructuring itself.
Why use it?
It helps focus cleanup on structural problems that make ordinary changes expensive, instead of spending time on code that is merely unattractive.

Skill for Claude CodeCodex

Part of the mastermind plugin — 23 skills, 4 agents, 1 hook 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/mehrad-dm/mastermind/deepen
Any agent
npx skills add mehrad-dm/mastermind --skill deepen
Clone the repo
git clone --depth 1 https://github.com/mehrad-dm/mastermind

Made for: Claude Code, Codex.

Or install mastermind, the plugin that ships this one along with the rest of its 23 skills, 4 agents, 1 hook.

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/mehrad-dm/mastermind/deepen.svg)](https://agentmods.dev/skills/mehrad-dm/mastermind/deepen)
Your own site
<a href="https://agentmods.dev/skills/mehrad-dm/mastermind/deepen"><img src="https://agentmods.dev/badge/skills/mehrad-dm/mastermind/deepen.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,020 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.00108 $0.01020
Opus 5 $0.00054 $0.00510
Sonnet 5 $0.00022 $0.00204
Haiku 4.5 $0.00011 $0.00102

Measured 5d ago against content hash 2a3ed68e9458, 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 5d 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 · 77 lines

How it starts

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

MasterMind: Deepen

Find where the design costs the most, present the candidates, let the user choose. You survey and rank. You do not restructure: the chosen one goes to the refactorer agent, which is where the edits happen and where behaviour is proven unchanged.

Load ~/.mastermind/engineering/core/principles.md and mindset.md for the vocabulary. Read the field's audit-rules.md and .mastermind/brief.md if they exist: with no field pack you still have the universal principles, and with no brief you use the codebase's own names.

Scope it before you read anything

A whole-repo survey produces a list nobody acts on. Narrow first:

  1. Take the area the user named. If they named none, use git log to find what changed most in the last few months. Design debt hurts where the code moves.
  2. Cap it. Six candidates maximum, and fewer is better.
  3. Send the reading to a subagent where you have one, so the survey does not eat this context. Where you do not, read in the same order and keep notes short: the cap is what protects the context.

What you are looking for

Not ugliness. Cost. Each of these has a named future price:

  • A shallow module: the interface costs about as much to understand as the implementation it hides. It adds a name and buys nothing.
  • A concept spread thin: understanding one idea means opening five files. The split was mechanical, not conceptual.
  • A leaked boundary: callers know the shape of what is behind the seam, so the seam cannot move.
  • A path that cannot be tested without standing up the world, because there is nowhere to substitute.
  • An invariant enforced in several places, which will drift, because one day someone edits four of five.

Apply the deletion test to anything suspected shallow: if this module disappeared and its callers did the work inline, would the code get worse? If the honest answer is no, that is the finding.

Present them as a choice, not a report

One block per candidate, ranked, in plain text. Use the forms in ~/.mastermind/engineering/core/clarity.md: a tree, a call flow, a before and after. Plain text over a rendered diagram, because it reads faster and works in every tool.

Read the full file on GitHub · 77 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 77 lines · 0 tokens per session scan A 2a3ed68e9458

Subscribe to this mod's changes

deepen is a skill published in the GitHub repository mehrad-dm/mastermind (24 stars, last pushed 5d ago), licensed MIT. It adds 108 tokens to every session and 1,020 once invoked, about $0.0005 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

docker-extend

Use when: User wants to extend Docker with custom tools, personalize the Docker environment, or set up user-specific Docker customization. Triggers: 'extend docker', 'docker-extend', 'add tools to docker', 'customize docker', 'add my tools to the container', 'personalize docker setup', 'docker user setup', 'install…

coleam00/Archon · 118 tokens

write-zot-themes

Help the user create, install, or package zot themes, including theme-only extensions.

patriceckhart/zot · 23 tokens

st-full-workflow

Use when the user asks to run the complete end-to-end Strikethroo workflow for a work order in one shot in this repository — triggers include full workflow, end-to-end, plan and execute, do everything, run the whole strikethroo workflow. Do not use when the user wants only one stage (create a plan, generate tasks, or…

e0ipso/strikethroo · 90 tokens

st-code-review

Use when the blueprint execution gate asks for an independent second-harness review of a Strikethroo plan's cumulative diff in this repository — triggers include code review gate, review the plan diff, second-model review, CODEREVIEW hook, review the cumulative diff. Do not use to review a single task, to review code…

e0ipso/strikethroo · 87 tokens

st-refine-plan

Use when the user asks to review, refine, improve, interrogate, pressure-test, or update an existing Strikethroo plan by plan ID in this repository — triggers include refine plan, improve plan, review plan, red-team the plan, update plan. Do not use to create a new plan, to generate tasks, or for generic brainstorming…

e0ipso/strikethroo · 81 tokens

tlamatini-daily-chat-test

Run the daily automated Tlamatini chat regression — drive a visible Chrome via Playwright, log into agentpage.html, ask up to 1000 curated safe questions one-by-one (Multi-Turn ON, ACPX/Ask-Execs/Exec-Report/Internet OFF), wait for and qualify each answer (heuristic + LLM judge on failures), then write a dated report…

XAIHT/Tlamatini · 125 tokens