Skip to content
Agentmart
Submit a tool
This entry duplicates init-deep, which is the one we list in search.

init-deep

Generate hierarchical AGENTS.md files throughout a project.

Skill by tainn03

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tainn03-init-deep

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate hierarchical AGENTS.md files throughout a project. Fires parallel explore agents, scores directories by complexity, and produces root + subdirectory documentation.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
init-deep
Description
Generate hierarchical AGENTS.md files throughout a project. Fires parallel explore agents, scores directories by complexity, and produces root + subdirectory documentation.
License
MIT
Instructions
195 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# /init-deep

Generate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.

## Usage

```
/init-deep                      # Update mode: modify existing + create new where warranted
/init-deep --create-new         # Read existing, remove all, regenerate from scratch
/init-deep --max-depth=2        # Limit directory depth (default: 3)
```

---

## Workflow (High-Level)

1. **Discovery + Analysis** (concurrent)
   - Fire background explore agents immediately
   - Main session: bash structure + 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

**Create todos for ALL phases. Mark in_progress then completed in real-time.**

---

## Phase 1: Discovery + Analysis (Concurrent)

### Fire Background Explore Agents IMMEDIATELY

Don't wait - these run async while main session works.

```
// Fire all at once, collect results later
explore: "Project structure: PREDICT standard patterns for detected language, REPORT deviations only"
explore: "Entry points: FIND main files, REPORT non-standard organization"
explore: "Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig), REPORT project-specific rules"
explore: "Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments, LIST forbidden patterns"
explore: "Build/CI: FIND .github/workflows, Makefile, REPORT non-standard patterns"
explore: "Test patterns: FIND test configs, test structure, REPORT unique conventions"
```

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

### Main Session: Concurrent Analysis

While background agents run, main session does:

1. **Bash Structural Analysis**
   ```bash
   # Directory depth + file counts
   find . -type d -not -path '*/\.*' -not -path '*/node_modules/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c

   # Files per directory (top 30)
   find . -type f -not -path '*/\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30

   # Code concentration by extension
   find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.go" -o -name "*.rs" \) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20

   # Existing AGENTS.md / CLAUDE.md
   find . -type f \( -name "AGENTS.md" -o -name "CLAUDE.md" \) -not -path '*/node_modules/*' 2>/dev/null
   ```

2. **Read Existing AGENTS.md** - For each existing file, extract key insights, conventions, anti-patterns.

If `--create-new`: Read all existing first (preserve context), then delete all, regenerate.

### Collect Background Results

After main session analysis done, collect all task results and merge: bash + existing + explore findings.

---

## Phase 2: Scoring & Location Decision

### Scoring Matrix

| Factor | Weight | High Threshold | Source |
|--------|--------|----------------|--------|
| File count | 3x | >20 | bash |
| Subdir count | 2x | >5 | bash |
| Code ratio | 2x | >70% | bash |
| Unique patterns | 1x | Has own config | explore |
| Module boundary | 2x | Has index.ts/__init__.py | bash |

### Decision Rules

| Score | Action |
|-------|--------|
| **Root (.)** | ALWAYS create |
| **>15** | Create AGENTS.md |
| **8-15** | Create if distinct domain |
| **<8** | Skip (parent covers) |

---

## Phase 3: Generate AGENTS.md

### Root AGENTS.md (Full Treatment)

```markdown
# PROJECT KNOWLEDGE BASE

**Generated:** {TIMESTAMP}

## OVERVIEW
{1-2 sentences: what + core stack}

From tainn03/oh-my-copilot, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
May 17, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from tainn03

Cite this page

init-deep skill. Agent Mart. https://agentmart.dev/skills/tainn03-init-deep (last updated 2026-10-24)