Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

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 & CodingAdvanced67,5315,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

  1. First pass: run /init-deep on a 30k-line Next.js + Python monorepo → root AGENTS.md plus child files only in apps/web and packages/api.
  2. Refresh after refactor: re-run /init-deep so the STRUCTURE and COMMANDS sections of existing docs are edited back into sync.
  3. Clean rebuild: when docs have drifted badly, use /init-deep --create-new --max-depth=2 for a leaner, from-scratch knowledge base.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal.
  2. Clone the repo to a temp folder: git clone https://github.com/code-yeongyu/oh-my-openagent.git /tmp/oh-my-openagent
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r /tmp/oh-my-openagent/packages/shared-skills/skills/init-deep ~/.claude/skills/
  5. Verify that ~/.claude/skills/init-deep/SKILL.md exists.
  6. Restart Claude Code, open your project directory, then run /init-deep or ask "build a hierarchical AGENTS.md for this repo".
  7. 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.
  8. Tip: start with --max-depth=2 to keep the number of generated files manageable, then widen it.
View source on GitHubLicense: NOASSERTION