
Deepinit
Bootstrap hierarchical AGENTS.md files so coding agents can navigate and respect each directory’s purpose.
Overview
Deep Init is an agent skill most often used in Build (also Operate) that creates hierarchical AGENTS.md files so agents understand every directory’s role and dependencies.
Install
npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill deepinitWhat is this skill?
- Generates comprehensive hierarchical AGENTS.md across the entire codebase
- Parent reference tags (<!-- Parent: ../AGENTS.md -->) link every file into a navigable tree
- Standard template covers purpose, key files table, subdirectories, and relationships
- Root AGENTS.md has no parent tag; child dirs inherit context upward
- Level-4 depth skill aimed at full-repo AI-readable documentation
- Hierarchical parent-tag pattern documented for root plus nested src and docs directories
- AGENTS.md template includes Purpose, Key Files table, and Subdirectories table
Adoption & trust: 557 installs on skills.sh; 36k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Agents wander your repo because there is no consistent, linked map of what each folder is for.
Who is it for?
Repos you will drive heavily with Claude Code or Cursor where directory intent is unclear or undocumented for agents.
Skip if: Tiny one-file scripts or repos that already maintain complete, up-to-date AGENTS.md at every level.
When should I use this skill?
Starting deep codebase initialization or when agents need full-repo AGENTS.md coverage.
What do I get? / Deliverables
You get a full AGENTS.md tree with parent tags and per-directory templates agents can follow on every task.
- Root AGENTS.md
- Nested AGENTS.md files with parent links
- Per-directory purpose and file tables
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
First payoff is when you set up or onboard to a repo so agents have a map before touching code. AGENTS.md hierarchy is agent-facing project instrumentation, not end-user product docs.
Where it fits
Run deep init right after scaffolding so the agent knows components versus utils before the first feature PR.
Regenerate child AGENTS.md when you split src into feature folders so tables stay accurate.
Point review agents at directory AGENTS.md so they check changes against stated purpose.
Refresh hierarchy after a big rename so monitoring or fix tasks land in the correct package.
How it compares
Repo-wide agent orientation docs—not a human-facing README or OpenAPI generator.
Common Questions / FAQ
Who is deepinit for?
Solo builders and small teams who want agents to self-navigate a codebase via linked AGENTS.md files at each directory level.
When should I use deepinit?
At Build onboarding after cloning a large project, before a refactor, or in Operate when refreshing agent context after major folder moves.
Is deepinit safe to install?
It writes many markdown files across the tree—review the Security Audits panel on this page and diff AGENTS.md output before merging.
SKILL.md
READMESKILL.md - Deepinit
# Deep Init Skill Creates comprehensive, hierarchical AGENTS.md documentation across the entire codebase. ## Core Concept AGENTS.md files serve as **AI-readable documentation** that helps agents understand: - What each directory contains - How components relate to each other - Special instructions for working in that area - Dependencies and relationships ## Hierarchical Tagging System Every AGENTS.md (except root) includes a parent reference tag: ```markdown <!-- Parent: ../AGENTS.md --> ``` This creates a navigable hierarchy: ``` /AGENTS.md ← Root (no parent tag) ├── src/AGENTS.md ← <!-- Parent: ../AGENTS.md --> │ ├── src/components/AGENTS.md ← <!-- Parent: ../AGENTS.md --> │ └── src/utils/AGENTS.md ← <!-- Parent: ../AGENTS.md --> └── docs/AGENTS.md ← <!-- Parent: ../AGENTS.md --> ``` ## AGENTS.md Template ```markdown <!-- Parent: {relative_path_to_parent}/AGENTS.md --> <!-- Generated: {timestamp} | Updated: {timestamp} --> # {Directory Name} ## Purpose {One-paragraph description of what this directory contains and its role} ## Key Files {List each significant file with a one-line description} | File | Description | |------|-------------| | `file.ts` | Brief description of purpose | ## Subdirectories {List each subdirectory with brief purpose} | Directory | Purpose | |-----------|---------| | `subdir/` | What it contains (see `subdir/AGENTS.md`) | ## For AI Agents ### Working In This Directory {Special instructions for AI agents modifying files here} ### Testing Requirements {How to test changes in this directory} ### Common Patterns {Code patterns or conventions used here} ## Dependencies ### Internal {References to other parts of the codebase this depends on} ### External {Key external packages/libraries used} <!-- MANUAL: Any manually added notes below this line are preserved on regeneration --> ``` ## Execution Workflow ### Step 1: Map Directory Structure ``` Task(subagent_type="explore", model="haiku", prompt="List all directories recursively. Exclude: node_modules, .git, dist, build, __pycache__, .venv, coverage, .next, .nuxt") ``` ### Step 2: Create Work Plan Generate todo items for each directory, organized by depth level: ``` Level 0: / (root) Level 1: /src, /docs, /tests Level 2: /src/components, /src/utils, /docs/api ... ``` ### Step 3: Generate Level by Level **IMPORTANT**: Generate parent levels before child levels to ensure parent references are valid. For each directory: 1. Read all files in the directory 2. Analyze purpose and relationships 3. Generate AGENTS.md content 4. Write file with proper parent reference ### Step 4: Compare and Update (if exists) When AGENTS.md already exists: 1. **Read existing content** 2. **Identify sections**: - Auto-generated sections (can be updated) - Manual sections (`<!-- MANUAL -->` preserved) 3. **Compare**: - New files added? - Files removed? - Structure changed? 4. **Merge**: - Update auto-generated content - Preserve manual annotations - Update timestamp ### Step 5: Validate Hierarchy After generation, run validation checks: | Check | How to Verify | Corrective Action | |-------|--------------|-------------------| | Parent references resolve | Read each AGENTS.md, check `<!-- Parent: -->` path exists | Fix path or remove orphan | | No orphaned AGENTS.md | Compare AGENTS.md locations to directory structure | Delete orphaned files | | Completeness | List all directories, check for AGENTS.md | Generate missing files | | Timestamps current | Check `<!-- Generated: -->` dates | Regenerate outdated files | Validation script pattern: ```bash # Find all AGENTS.md files find . -name "AGENTS.md" -type f # Check parent references grep -r "<!-- Parent:" --include="AGENTS.md" . ``` ## Smart Delegation | Task | Agent | |------|---