init-deep — Hierarchical AGENTS.md Knowledge Base Generator
Scans and scores your repository, then auto-generates AGENTS.md files at the root and in the subdirectories that actually deserve one.
Dev & CodingIntermediate★ 67,531⑂ 5,507AI score 7/10Last updated: Aug 9, 2026
What it does
One /init-deep command explores the whole codebase and builds a hierarchical AGENTS.md knowledge base for AI agents.
- Discovery: fires parallel background
exploreagents to map structure, locate entry points, collect config-driven conventions (.eslintrc, pyproject.toml), harvest forbidden patterns (DO NOT / NEVER comments), and inspect build/CI and test setups. - Analysis: bash counts directory depth and file distribution while LSP (
lsp_symbols,lsp_find_references) and ast-grep structural search measure symbol density, export count and reference centrality. - Scoring: a weighted matrix (files 3x, subdirs 2x, reference centrality 3x, …) decides placement — score >15 creates an AGENTS.md, 8–15 only for a distinct domain, <8 is skipped so the parent covers it.
- Generate & review: the root file follows a full template (OVERVIEW, STRUCTURE, CODE MAP, CONVENTIONS, ANTI-PATTERNS; 50–150 lines), child files stay at 30–80 lines, and duplicated or generic content is stripped in a final review pass.
Flags: --create-new (read existing, then regenerate from scratch) and --max-depth=N.
Who it's for
- Developers bootstrapping AI-agent context on a large or legacy repo with little documentation.
- Monorepo teams that need per-package conventions surfaced to agents.
- Maintainers refreshing stale CLAUDE.md / AGENTS.md files.
Examples
- Ramp up on an unfamiliar repo: run
/init-deepon a freshly cloned 500-file project and get a root AGENTS.md with stack summary, directory map and a table of high-reference symbols — an instant onboarding draft. - Document a monorepo: each
packages/*gets scored, so only genuinely complex packages receive their own AGENTS.md and child files never repeat the parent. - Reset drifted docs:
/init-deep --create-newreads existing guidance for context, deletes it, and regenerates a consistent hierarchy.
· · · 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-senpi/skills/init-deep folder from the GitHub repo code-yeongyu/oh-my-openagent into my ~/.claude/skills/code-yeongyu-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/oh-my-openagent && mkdir -p ~/.claude/skills && cp -r /tmp/oh-my-openagent/packages/omo-senpi/skills/init-deep ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repository:
git clone https://github.com/code-yeongyu/oh-my-openagent.git - Make sure the skills folder exists:
mkdir -p ~/.claude/skills - Copy the skill into place:
cp -r oh-my-openagent/packages/omo-senpi/skills/init-deep ~/.claude/skills/ - Verify with
ls ~/.claude/skills/init-deep/SKILL.md. - Start Claude Code from inside the project you want documented.
- Type
/init-deep, or simply ask: "build a hierarchical AGENTS.md knowledge base for this repo". - (Recommended) Install ast-grep (
brew install ast-grep) and enable LSP/MCP tooling for a far more accurate code map; without them some phases are skipped. - Review the generated AGENTS.md files before committing — verify claims that the agent inferred rather than measured.
View source on GitHub ↗License: NOASSERTION