deepen

deepen is a skill for Claude Code from mehrad-dm/mastermind. It costs 108 tokens per session (1,025 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 Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the mastermind plugin — 32 skills, 4 agents, 1 hook shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mehrad-dm/mastermind/deepen
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.

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.

Or install mastermind, the plugin that ships this one along with the rest of its 32 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deepen

Your own site · 80×15
<a href="https://agentmods.dev/skills/mehrad-dm/mastermind/deepen"><img src="https://agentmods.dev/badge/skills/mehrad-dm/mastermind/deepen.svg" alt="Reviewed on agentmods" width="80" 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,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00108 $0.01025
Opus 5.5 $0.00043 $0.00410
Sonnet 5.5 $0.00022 $0.00205
Haiku 4.5 $0.00011 $0.00103

Measured 15d ago against content hash b2f022f24fe9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d 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. 15d ago Changed · +108 tokens per session b2f022f24fe9
  2. 1mo 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 (23 stars, last pushed 6d ago), licensed MIT. It adds 108 tokens to every session and 1,025 once invoked, about $0.0004 per session on Opus 5.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.