init-deep — Hierarchical AGENTS.md Generator
Analyzes your whole repo and generates a hierarchical AGENTS.md knowledge base at the root plus high-complexity subdirectories.
Dev & CodingAdvanced★ 67,531⑂ 5,507AI score 7/10Last updated: Aug 9, 2026
What it does
A single /init-deep command scans your repository and produces a hierarchical AGENTS.md knowledge base for AI agents.
- Phase 1 – Concurrent discovery: fires parallel explore agents (structure, entry points, conventions, anti-patterns, build/CI, tests) while the main session runs bash metrics on directory depth, file counts and code density. Agent count scales dynamically with project size (>100 files, >10k lines, depth ≥4, monorepo, multiple languages).
- Phase 2 – Scoring: weighted score from file count (3x), subdir count (2x), symbol density, export count and reference centrality (via LSP/codegraph). >15 → create AGENTS.md, 8–15 → only if it's a distinct domain, <8 → skip.
- Phase 3 – Generation: root file follows an OVERVIEW / STRUCTURE / WHERE TO LOOK / CODE MAP / CONVENTIONS / ANTI-PATTERNS / COMMANDS template at 50–150 lines; subdirectory files are 30–80 lines and written in parallel. Existing files are edited, never blindly overwritten.
- Phase 4 – Review: strips generic advice, removes duplication with the parent file, trims to size limits and enforces terse telegraphic style.
Flags: --create-new (read existing, wipe, regenerate) and --max-depth=N.
Who it's for
- Developers who want consistent AI context docs across a repo that has outgrown a single CLAUDE.md
- Monorepo teams needing per-package conventions documented separately
- Leads trying to cut onboarding time for both humans and agents
Examples
- First pass: run
/init-deepon a 30k-line Next.js + Python monorepo → root AGENTS.md plus child files only inapps/webandpackages/api. - Refresh after refactor: re-run
/init-deepso the STRUCTURE and COMMANDS sections of existing docs are edited back into sync. - Clean rebuild: when docs have drifted badly, use
/init-deep --create-new --max-depth=2for a leaner, from-scratch knowledge base.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the packages/shared-skills/skills/init-deep folder from the GitHub repo code-yeongyu/oh-my-openagent into my ~/.claude/skills/code-yeongyu-init-deep-2/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/code-yeongyu/oh-my-openagent.git /tmp/oh-my-openagent && mkdir -p ~/.claude/skills && cp -r /tmp/oh-my-openagent/packages/shared-skills/skills/init-deep ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo to a temp folder:
git clone https://github.com/code-yeongyu/oh-my-openagent.git /tmp/oh-my-openagent - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r /tmp/oh-my-openagent/packages/shared-skills/skills/init-deep ~/.claude/skills/ - Verify that
~/.claude/skills/init-deep/SKILL.mdexists. - Restart Claude Code, open your project directory, then run
/init-deepor ask "build a hierarchical AGENTS.md for this repo". - Note: the workflow expects
codegraph_*,lsp_*and background sub-agent tools. Without them Claude falls back to plain file exploration, so the CODE MAP will be less precise. - Tip: start with
--max-depth=2to keep the number of generated files manageable, then widen it.
View source on GitHub ↗License: NOASSERTION