init-deep

init-deep is a skill for Claude Code from TechDufus/oh-my-claude. It costs 84 tokens per session (5,149 once invoked), scanned A, original, MIT.

A skill that creates or reorganizes nested CLAUDE.md instruction files throughout a repository. These files give Claude guidance specific to the directories and code it is working with.

In plain words
What is it for?
It helps initialize, migrate, or restructure repository guidance, including creating nested files and limiting how deeply they are placed.
Why use it?
It keeps instructions close to the relevant code, so large projects do not depend on one oversized set of general rules.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the oh-my-claude plugin — 12 skills, 1 command, 8 hooks, 2 MCP servers 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/techdufus/oh-my-claude/init-deep
Any agent
npx skills add TechDufus/oh-my-claude --skill init-deep
Clone the repo
git clone --depth 1 https://github.com/TechDufus/oh-my-claude

Made for: Claude Code.

Or install oh-my-claude, the plugin that ships this one along with the rest of its 12 skills, 1 command, 8 hooks, 2 MCP servers.

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 init-deep

README.md
[![agentmods](https://agentmods.dev/badge/skills/techdufus/oh-my-claude/init-deep.svg)](https://agentmods.dev/skills/techdufus/oh-my-claude/init-deep)
Your own site
<a href="https://agentmods.dev/skills/techdufus/oh-my-claude/init-deep"><img src="https://agentmods.dev/badge/skills/techdufus/oh-my-claude/init-deep.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,149 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.1 $0.00084 $0.05149
Opus 5 $0.00042 $0.02575
Sonnet 5 $0.00017 $0.01030
Haiku 4.5 $0.00008 $0.00515

Measured 7d ago against content hash b47d06e30b59, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

init-deep 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 7d 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.

plugins/oh-my-claude/skills/init-deep/SKILL.md · 856 lines

How it starts

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

Init Deep Skill

Create a minimal root CLAUDE.md with nested CLAUDE.md files throughout the repository for true progressive disclosure.

Key Insight

Claude automatically loads CLAUDE.md from any directory it reads. Instead of centralizing documentation in .claude/docs/, place CLAUDE.md files directly in relevant directories. When Claude reads src/api/users.ts, it also loads src/api/CLAUDE.md - contextual guidance exactly when needed.

Closest Wins: When multiple CLAUDE.md files apply, the one closest to the file being edited takes precedence. A rule in src/api/CLAUDE.md overrides the same topic in root CLAUDE.md.

When This Skill Activates

Category Trigger Phrases
Initialize /init-deep, deep init, initialize deeply, setup claude deeply
Migrate refactor claude.md, migrate claude.md, restructure claude
Structure nested claude, progressive disclosure, contextual claude

CLI Variants

/init-deep              # Update: modify existing + create new where needed
/init-deep --fresh      # Delete all CLAUDE.md files, regenerate from scratch
/init-deep --max-depth=2 # Limit nesting depth (default: unlimited)
Flag Behavior
(none) Additive - creates missing, preserves existing
--fresh Destructive - deletes all CLAUDE.md, starts clean
--max-depth=N Limits nested CLAUDE.md to N levels deep

Philosophy: Instruction Budget

Claude has ~150-200 instruction capacity before diminishing returns. A bloated root CLAUDE.md means wasted context on every interaction.

Solution: Minimal root + nested CLAUDE.md files that load only when relevant directories are accessed.

Size Limits (Strict)

File Lines Status
Root CLAUDE.md 50-150 Optimal range
Root CLAUDE.md 150+ Needs refactoring
Nested CLAUDE.md 30-80 Optimal range
Nested CLAUDE.md 80+ Too verbose

Read the full file on GitHub · 856 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. 7d ago First seen · 856 lines · 84 tokens per session scan A b47d06e30b59

Subscribe to this mod's changes

init-deep is a skill published in the GitHub repository TechDufus/oh-my-claude (176 stars, last pushed 1mo ago), licensed MIT. It adds 84 tokens to every session and 5,149 once invoked, about $0.0004 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.