Agent skill · software engineering · code-yeongyu
init-deep
Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.
Why this skill is useful
Adds a complex executable script for generating hierarchical AGENTS.md files with dynamic agent spawning based on project analysis.
What it needs
Requires bash installed locally. About 6k tokens when loaded. Last updated 2026-08-07. 67,387 stars on the source repository.
What this skill does
/init-deep Generate hierarchical AGENTS.md files. Root + complexity-scored subdirectories. Usage --- Workflow (High-Level) 1. Discovery + Analysis (concurrent) Fire background explore agents immediately Main session: bash structure + LSP/ast-grep code map + read existing AGENTS.md 2. Score & Decide - Determine AGENTS.md locations from merged findings 3. Generate - Root first, then subdirs in parallel 4. Review - Deduplicate, trim, validate <critical> TodoWrite ALL phases. Mark inprogress → completed in real-time. </critical> --- Phase 1: Discovery + Analysis (Concurrent) Mark "discovery" as inprogress. Fire Background Explore Agents IMMEDIATELY Don't wait-these run async while main session works. Ground every agent in real symbol data: any task touching structure, entry points, dependencies, or hotspots MUST query lspsymbols/lspfindreferences and the ast-grep skill (sg) when present, and ground its claims in that data instead of guessing from conventions. Richer real context per agent = a more accurate project map. <dynamic-agents> DYNAMIC AGENT SPAWNING: After bash analysis, spawn ADDITIONAL explore agents based on project scale: Factor Threshold Additional Agents -------- ----------- ------------------- Total files >100 +1 per 100 files Total lines >10k +1 per 10k lines Directory depth ≥4 +2 for deep exploration Large files (>500 lines) >10 files +1 for complexity hotspots Monorepo detected +1 per package/workspace Multiple languages >1 +1 per language Example spawning: </dynamic-agents> Main Session: Concurrent Analysis While background agents run, main session does: 1. Bash Structural Analysis 2. Read Existing AGENTS.md If --create-new: Read all existing first (preserve context) → then delete all → regenerate. 3. Code Map - drive LSP AND ast-grep (do NOT skip) Highest-signal source for the CODE MAP and the Symbol/Export/Reference scoring rows. Complementary, not alternatives - run BOTH when present, alongside the explore agents. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills code-yeongyu/init-deep--e8c31d