Deepinit
Automatically generates hierarchical AGENTS.md documentation across the entire codebase
Overview
Deepinit generates hierarchical AGENTS.md documentation throughout the entire codebase. AGENTS.md files are AI-readable documents that describe the contents of each directory, component relationships, and considerations when working with the code.
The goal is to help agents better understand the codebase and work more accurately.
Usage
/oh-my-claudecode:deepinit
/oh-my-claudecode:deepinit [path]Hierarchical Tagging
Every AGENTS.md (except the root) includes a parent reference tag.
/AGENTS.md (root, no parent)
├── 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 Structure
Sections included in each file:
- Purpose: Description of the directory's role
- Key Files: List of important files with descriptions
- Subdirectories: List of subdirectories
- For AI Agents: Working instructions, test requirements, code patterns
- Dependencies: Internal and external dependencies
Execution Workflow
- Map directory structure: explore agent maps the entire structure
- Generate task plan: Organized by depth level
- Generate by level: Parent-to-child order (ensures parent reference validity)
- Update existing files: Compare and merge if already present (preserves manual sections)
- Verify hierarchy: Check parent references, orphaned files, and completeness
Parallelization Rules
- Directories at the same level: processed in parallel
- Different levels: processed sequentially (parent first)
- Large directories: assigned a dedicated agent
- Small directories: multiple handled by a single agent
Update Mode
When run on a codebase with existing AGENTS.md files:
- Read and parse existing content
- Analyze current directory state
- Compare existing vs. current differences
- Update auto-generated sections, preserve manual sections below
<!-- MANUAL -->
Related Skills
Reference
| Item | Value |
|---|---|
| Invoke | /oh-my-claudecode:deepinit |
| Magic Keywords | - |
| Category | Workflow |