init-deep — Hierarchical AGENTS.md Knowledge Base Builder
Analyzes a codebase and auto-generates a hierarchy of AGENTS.md files at the root and in the directories that actually deserve one.
Dev & CodingAdvanced★ 67,531⑂ 5,507AI score 7/10Last updated: Aug 9, 2026
What it does
Running /init-deep sweeps the repository and builds a layered AGENTS.md knowledge base.
- Phase 1 — Concurrent discovery: fires background explore agents (structure, entry points, conventions, anti-patterns, build/CI, tests) while the main session gathers bash directory statistics and an LSP/codegraph symbol map. Agent count scales dynamically with file count, line count, directory depth, monorepo detection, and language count.
- Phase 2 — Scoring: a weighted matrix (file count x3, reference centrality x3, symbol density, export count, module boundary...) decides placement: score >15 create, 8–15 create only if it's a distinct domain, <8 skip.
- Phase 3 — Generation: root file gets the full treatment (OVERVIEW, STRUCTURE, WHERE TO LOOK, CODE MAP, CONVENTIONS, ANTI-PATTERNS, COMMANDS; 50–150 lines); subdirectory files are 30–80 lines and written in parallel. Existing files are edited, never overwritten.
- Phase 4 — Review: strips parent duplication and generic advice, enforces the telegraphic style and line limits.
Flags: --create-new (read existing, wipe, regenerate) and --max-depth=N (default 3).
Who it's for
- Developers inheriting a large, poorly documented repository
- Monorepo teams that want per-package context files for AI agents
- Tech leads producing a "where to look" map for onboarding
- Users already running the OMO / Codex multi-agent harness
Examples
- Freshly inherited 50k-line monorepo: run
/init-deepand get a root AGENTS.md plus child files only in high-scoring packages likepackages/apiandpackages/web. - Refreshing stale docs: rerun
/init-deepwith no flags — existing files are read first and only changed sections are edited in. - Post-refactor rewrite:
/init-deep --create-new --max-depth=2regenerates everything from scratch but caps the hierarchy at two levels.
· · · 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/omo-codex/plugin/skills/init-deep folder from the GitHub repo code-yeongyu/oh-my-openagent into my ~/.claude/skills/init-deep/. 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/omo && mkdir -p ~/.claude/skills && cp -r /tmp/omo/packages/omo-codex/plugin/skills/init-deep ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Create the skills folder:
mkdir -p ~/.claude/skills - Clone the repo:
git clone https://github.com/code-yeongyu/oh-my-openagent.git /tmp/omo - Copy just this skill:
cp -r /tmp/omo/packages/omo-codex/plugin/skills/init-deep ~/.claude/skills/ - Verify:
ls ~/.claude/skills/init-deep/SKILL.md - Restart Claude Code, open your project root, and run
/init-deep(or ask it to "use the init-deep skill to build AGENTS.md"). - Note: without codegraph/LSP or subagent-spawning tools those phases are skipped and output quality drops. Commit your work to git before running, since the skill writes and can delete AGENTS.md files.
View source on GitHub ↗License: NOASSERTION