Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.
Install
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add code-yeongyu/oh-my-openagent --skill init-deep -a cursor -y
Download packages/shared-skills/skills/init-deep/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does init-deep live?
The publisher keeps it at https://github.com/code-yeongyu/oh-my-openagent.
Which agents can use init-deep?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.
Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.
name: init-deep
description: "Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents."
Score & Decide - Determine AGENTS.md locations from merged findings
Generate - Root first, then subdirs in parallel
Review - Deduplicate, trim, validate
Phase 1: Discovery + Analysis (Concurrent)
Mark "discovery" as in_progress.
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 lsp_symbols/lsp_find_references 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.
// Fire all at once, collect results later
task(subagent_type="explore", load_skills=[], description="Explore project structure", run_in_background=true, prompt="Project structure: map real layout via glob + lsp_symbols scope=workspace → REPORT deviations from standard patterns")
task(subagent_type="explore", load_skills=[], description="Find entry points", run_in_background=true, prompt="Entry points: FIND main files, trace reach via lsp_symbols + lsp_find_references → REPORT non-standard organization")
task(subagent_type="explore", load_skills=[], description="Find conventions", run_in_background=true, prompt="Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) → REPORT project-specific rules")
task(subagent_type="explore", load_skills=[], description="Find anti-patterns", run_in_background=true, prompt="Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments → LIST forbidden patterns")
task(subagent_type="explore", load_skills=[], description="Explore build/CI", run_in_background=true, prompt="Build/CI: FIND .github/workflows, Makefile → REPORT non-standard patterns")
task(subagent_type="explore", load_skills=[], description="Find test patterns", run_in_background=true, prompt="Test patterns: FIND test configs/structure; lsp_find_references on core modules to see what is covered → REPORT unique conventions")
For each existing file found:
Read(filePath=file)
Extract: key insights, conventions, anti-patterns
Store in EXISTING_AGENTS map
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.
LSP - check lsp_status; model-facing names are lsp_status/lsp_symbols/lsp_find_references/lsp_goto_definition (some harnesses drop the lsp_ prefix):
lsp_symbols scope="document" on each entry point -> file outline.
lsp_symbols scope="workspace", query by kind (class/interface/function) -> symbol inventory.
lsp_find_references on top exports (line/character from the symbols result) -> reference centrality.
ast-grep - load the ast-grep skill; a first-class peer to LSP, NOT a last resort:
sg --pattern 'export $$$' --lang <lang> -> export inventory; sg --pattern 'import $$$ from "$MOD"' -> dependency edges between modules for the scoring matrix.
Only if LSP is unavailable: explore agents + ast-grep alone, and mark reference centrality unmeasured in the CODE MAP.
Collect Background Results
// After main session analysis done, collect all task results
for each background task ID (`bg_...`): background_output(task_id="bg_...")
Merge: bash + LSP/ast-grep + existing + explore findings. Mark "discovery" as completed.
## WHERE TO LOOK
| Task | Location | Notes |
|------|----------|-------|
## CODE MAP
{From LSP/ast-grep - skip only if neither exists or project <10 files}
| Symbol | Type | Location | Refs | Role |
|--------|------|----------|------|------|
## CONVENTIONS
{ONLY deviations from standard}
## ANTI-PATTERNS (THIS PROJECT)
{Explicitly forbidden here}
## UNIQUE STYLES
{Project-specific}
## COMMANDS
```bash
{dev/test/build}
NOTES
{Gotchas}
**Quality gates**: 50-150 lines, no generic advice, no obvious info.
### Subdirectory AGENTS.md (Parallel)
Launch writing tasks for each location:
for loc in AGENTS_LOCATIONS (except root):
task(category="writing", load_skills=[], run_in_background=false, description="Generate AGENTS.md", prompt= Generate AGENTS.md for: ${loc.path} - Reason: ${loc.reason} - 30-80 lines max - NEVER repeat parent content - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS )
**Wait for all. Mark "generate" as completed.**
---
## Phase 4: Review & Deduplicate
**Mark "review" as in_progress.**
For each generated file:
- Remove generic advice
- Remove parent duplicates
- Trim to size limits
- Verify telegraphic style
**Mark "review" as completed.**
---
## Final Report
---
## Anti-Patterns
- **Static agent count**: MUST vary agents based on project size/depth
- **Sequential execution**: MUST parallel (explore + LSP + ast-grep concurrent)
- **Ignoring existing**: ALWAYS read existing first, even with --create-new
- **Over-documenting**: Not every dir needs AGENTS.md
- **Redundancy**: Child never repeats parent
- **Generic content**: Remove anything that applies to ALL projects
- **Verbose style**: Telegraphic or die
How do I install init-deep?
Download packages/shared-skills/skills/init-deep/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
Where does init-deep live?
The publisher keeps it at https://github.com/code-yeongyu/oh-my-openagent.
Which agents can use init-deep?
Claude, Cursor, and Codex can read a SKILL.md you add from the publisher's repository.