Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
akillness avatar

Deepinit

  • 1 installs
  • 40 repo stars
  • Updated August 4, 2026
  • akillness/oh-my-skills

Deep Init is a Claude Code skill that generates hierarchical, parent-referenced AGENTS.md documentation across a codebase while preserving manual notes.

About

Deep Init creates or refreshes hierarchical AGENTS.md documentation across a codebase so agents can understand what each directory contains and how components relate. It generates parent-referenced AGENTS.md files level by level, preserves manually added notes on regeneration, and excludes runtime state directories like .omc and .codex. A developer uses it to make a repo AI-navigable and keep its documentation current.

  • Generates hierarchical AGENTS.md documentation across an entire codebase
  • Every non-root AGENTS.md carries a parent reference tag to form a navigable hierarchy
  • Preserves manual notes on regeneration and excludes runtime state and build folders

Deepinit by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,361 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

deepinit capabilities & compatibility

Capabilities
documentation generation · codebase mapping · agents md
Use cases
documentation
Runs
Runs locally
Pricing
Free
From the docs

What deepinit says it does

Creates comprehensive, hierarchical AGENTS.md documentation across the entire codebase.
SKILL.md
Any manually added notes below this line are preserved on regeneration
SKILL.md
npx skills add https://github.com/akillness/oh-my-skills --skill deepinit

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars40
Last updatedAugust 4, 2026
Repositoryakillness/oh-my-skills

What it does

Generate and refresh hierarchical AGENTS.md documentation across a codebase while preserving manual notes and excluding runtime state.

Who is it for?

Making a codebase AI-navigable with per-directory AGENTS.md files that stay current across regenerations.

Skip if: Runtime state directories and generated build folders, which it deliberately excludes.

When should I use this skill?

You want to create or refresh AGENTS.md documentation for a Claude Code, Codex, Gemini, or Antigravity project.

What you get

A navigable hierarchy of AGENTS.md files documents every directory while preserving manual annotations.

  • hierarchical AGENTS.md files with parent references

By the numbers

  • 5-step execution workflow (map, plan, generate, compare/update, validate)

Files

SKILL.mdMarkdownGitHub ↗

Deep Init Skill

Creates comprehensive, hierarchical AGENTS.md documentation across the entire codebase.

Read references/scope-and-preservation.md before running on a repository with existing AGENTS.md files or runtime directories. Validate results with scripts/validate_agents_hierarchy.py.

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:

<!-- 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

<!-- 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 runtime/build/cache directories from references/scope-and-preservation.md.")

Default excludes:

  • .git/, node_modules/, dist/, build/, coverage/, .next/, .nuxt/, __pycache__/, .venv/, venv/
  • Root runtime state: .omc/, .omx/, .survey/, .codex/, .claude/, .gemini/, .agents/, .opencode/, .ouroboros/

Keep .agent-skills/ in scope because it is repository source, not runtime state.

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
  • Keep existing instructions that are still true; flag stale instructions instead of deleting them silently

Step 5: Validate Hierarchy

After generation, run validation checks:

CheckHow to VerifyCorrective Action
Parent references resolveRead each AGENTS.md, check <!-- Parent: --> path existsFix path or remove orphan
No orphaned AGENTS.mdCompare AGENTS.md locations to directory structureDelete orphaned files
CompletenessList all directories, check for AGENTS.mdGenerate missing files
Timestamps currentCheck <!-- Generated: --> datesRegenerate outdated files

Validation script pattern:

python3 .agent-skills/deepinit/scripts/validate_agents_hierarchy.py .

Smart Delegation

TaskAgent
Directory mappingexplore
File analysisarchitect
Content generationwriter
AGENTS.md writeswriter

Empty Directory Handling

When encountering empty or near-empty directories:

ConditionAction
No files, no subdirectoriesSkip - do not create AGENTS.md
No files, has subdirectoriesCreate minimal AGENTS.md with subdirectory listing only
Has only generated files (.min.js, .map)Skip or minimal AGENTS.md
Has only config filesCreate AGENTS.md describing configuration purpose

Example minimal AGENTS.md for directory-only containers:

<!-- Parent: ../AGENTS.md -->
# {Directory Name}

## Purpose
Container directory for organizing related modules.

## Subdirectories
| Directory | Purpose |
|-----------|---------|
| `subdir/` | Description (see `subdir/AGENTS.md`) |

Parallelization Rules

1. Same-level directories: Process in parallel 2. Different levels: Sequential (parent first) 3. Large directories: Spawn dedicated agent per directory 4. Small directories: Batch multiple into one agent

Quality Standards

Must Include

  • [ ] Accurate file descriptions
  • [ ] Correct parent references
  • [ ] Subdirectory links
  • [ ] AI agent instructions

Must Avoid

  • [ ] Generic boilerplate
  • [ ] Incorrect file names
  • [ ] Broken parent references
  • [ ] Missing important files
  • [ ] Documenting ignored runtime state as source architecture
  • [ ] Replacing user-authored manual notes

Runtime-Specific Notes

RuntimeDocumentation rule
Claude Code / OMCRoot AGENTS.md may mention Claude workflow, but do not document .omc/ state as source
Codex / OMXRoot AGENTS.md should be suitable for Codex model instruction injection; do not document .omx/ state as source
Gemini / Antigravity / OMADocument .agents/ only when it is intentionally checked in as harness source; otherwise treat root .agents/ as generated/runtime state
.agent-skills/Always allowed as source; document skill folders, scripts, references, evals, and validation commands

Example Output

Root AGENTS.md

<!-- Generated: 2024-01-15 | Updated: 2024-01-15 -->

# my-project

## Purpose
A web application for managing user tasks with real-time collaboration features.

## Key Files
| File | Description |
|------|-------------|
| `package.json` | Project dependencies and scripts |
| `tsconfig.json` | TypeScript configuration |
| `.env.example` | Environment variable template |

## Subdirectories
| Directory | Purpose |
|-----------|---------|
| `src/` | Application source code (see `src/AGENTS.md`) |
| `docs/` | Documentation (see `docs/AGENTS.md`) |
| `tests/` | Test suites (see `tests/AGENTS.md`) |

## For AI Agents

### Working In This Directory
- Always install dependencies after modifying the project manifest
- Use TypeScript strict mode
- Follow ESLint rules

### Testing Requirements
- Run tests before committing
- Ensure >80% coverage

### Common Patterns
- Use barrel exports (index.ts)
- Prefer functional components

## Dependencies

### External
- React 18.x - UI framework
- TypeScript 5.x - Type safety
- Vite - Build tool

<!-- MANUAL: Custom project notes can be added below -->

Nested AGENTS.md

<!-- Parent: ../AGENTS.md -->
<!-- Generated: 2024-01-15 | Updated: 2024-01-15 -->

# components

## Purpose
Reusable React components organized by feature and complexity.

## Key Files
| File | Description |
|------|-------------|
| `index.ts` | Barrel export for all components |
| `Button.tsx` | Primary button component |
| `Modal.tsx` | Modal dialog component |

## Subdirectories
| Directory | Purpose |
|-----------|---------|
| `forms/` | Form-related components (see `forms/AGENTS.md`) |
| `layout/` | Layout components (see `layout/AGENTS.md`) |

## For AI Agents

### Working In This Directory
- Each component has its own file
- Use CSS modules for styling
- Export via index.ts

### Testing Requirements
- Unit tests in `__tests__/` subdirectory
- Use React Testing Library

### Common Patterns
- Props interfaces defined above component
- Use forwardRef for DOM-exposing components

## Dependencies

### Internal
- `src/hooks/` - Custom hooks used by components
- `src/utils/` - Utility functions

### External
- `clsx` - Conditional class names
- `lucide-react` - Icons

<!-- MANUAL: -->

Triggering Update Mode

When running on an existing codebase with AGENTS.md files:

1. Detect existing files first 2. Read and parse existing content 3. Analyze current directory state 4. Generate diff between existing and current 5. Apply updates while preserving manual sections

Performance Considerations

  • Cache directory listings - Don't re-scan same directories
  • Batch small directories - Process multiple at once
  • Skip unchanged - If directory hasn't changed, skip regeneration
  • Parallel writes - Multiple agents writing different files simultaneously

References

  • Scope and preservation
  • scripts/validate_agents_hierarchy.py

Related skills

FAQ

Does it overwrite my manual notes?

No; content under the MANUAL marker is preserved when files are regenerated.

What does it exclude?

Runtime state (.omc, .omx, .codex, .claude, etc.) and build/cache folders like node_modules and dist.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.