init-deep
하는 일
이 도구는 프로젝트 문서를 AGENTS.md라는 파일로 정리합니다. 폴더 안의 폴더처럼 계층 구조를 만들어 AI가 프로젝트를 더 잘 이해하도록 합니다.
사용하는 경우
- ✓새 프로젝트를 시작하고 AI가 구조를 이해하기를 원할 때.
- ✓프로젝트가 커져서 문서를 정리해야 할 때.
- ✓AI가 문서를 최신 상태로 유지하도록 돕게 하려는 경우.
스킬 링크
https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/init-deep/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 프로젝트 문서를 루트에서 시작해 필요하면 하위 폴더를 만들어 AGENTS.md 파일로 정리해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 먼저 프로젝트의 규모를 측정하고 나누는 방법을 정합니다. 그다음 각 부분의 정보를 모으고, 마지막으로 AGENTS.md 파일을 작성해 AI가 프로젝트를 명확하고 정돈된 시각으로 보도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
/init-deep
Generate hierarchical AGENTS.md files: root + complexity-scored subdirectories, produced by a size-formula-driven dag map-reduce (quick scanners -> unspecified-high writers) so the main session's context stays flat at any repo size.
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)
- Size & route (main session) - ONE eval cell measures the repo and computes the node formula.
- Map (dag) -
quickscanner nodes extract per-chunk facts into bounded file reports. - Reduce (dag) -
unspecified-highwriter nodes own disjoint subtrees: score, write AGENTS.md files, emit digests. - Root & verify (dag) - one node writes root AGENTS.md from digests only; one node verifies every file.
- Snapshot & mode (main session) - snapshot contract unchanged.
todo init the five phases; start/done each transition in real time.
</critical>
Phase 1: Size & Route
Measure and compute in ONE eval cell - code, not mental arithmetic:
# Measure (tracked files minus vendored/generated: node_modules, .git, dist,
# build, out, vendor, target, coverage, lockfiles, minified and binary files)
S = total source bytes after exclusions
per_dir = source bytes per directory # bin-packing input
depth = max directory depth # respect --max-depth (default 3)
existing = every AGENTS.md / CLAUDE.md path # read the ROOT one now
# Formula
CHUNK = 400 * 1024 # ~100k tokens of source; a quick worker's usable window
# is ~150k over its fallback chain - leave room for its
# prompt and report
N_quick = ceil(S / CHUNK) # bin-pack WHOLE directories into chunks; a directory
# larger than one chunk splits at its children
N_high = ceil(N_quick / 12) # one reducer absorbs ~12 reports (~60k tokens) and
# still has room to spot-check real code
Route:
- **N_quick < 4** -> inline path below; a dag costs more than it saves.
- N_quick >
task.dag.max_nodes_per_run(default 64) -> raise the knob in omo config, or run one chained dag per top-level directory (multi-run composition,mass-ulwskill). - Otherwise -> dag path: emit
CHUNKS = [{id, dirs, bytes}], assign each writer a directory SUBTREE (disjoint - no two writers own the same directory), andmkdir -p .omo/init-deep/reports .omo/init-deep/digests.
--create-new: read every existing AGENTS.md FIRST (still-true facts survive as scanner input), then delete all, then regenerate.
Inline path (N_quick < 4)
Small repo - skip the dag. Fire 2-4 parallel explore agents (structure, entry points, conventions, anti-patterns), for example:
task(subagent_type="explore", run_in_background=true, prompt="Project structure: map real layout via ast-grep structural search (sg/ast_grep MCP) + rg --files -> REPORT deviations from standard patterns")
Run the LSP/ast-grep code map yourself (lsp_symbols outlines + workspace inventory, lsp_find_references on top exports, ast-grep import/call shapes; when neither resolves, mark centrality unmeasured). Then score with the matrix below and write every file per the templates yourself. Phase 5 applies unchanged.
Phase 2: Map Wave - quick Scanners (dag)
Build and start the run in one eval JS cell with the dag SDK (OMO_DAG_SDK_ROOT); wave doctrine, the node prompt contract, and the failure playbook come from the mass-ulw skill's references/planning.md. One scanner node per chunk, category: "quick", no load_skills - scanners stay lean and their prompt is a rigid numbered extraction template. Quick workers extract; they never judge and never write AGENTS.md:
TASK: Extract knowledge-base facts for chunk <id> (<dirs>) of <repo-root>.
Steps, in order:
1. Inventory each directory in scope: file count, LOC, languages, entry files.
…
자주 묻는 질문
AGENTS.md 파일이란 무엇인가요?
AI가 프로젝트의 구조, 명령, 관례를 이해하도록 돕는 문서 파일입니다.
‘계층적’이란 무엇을 뜻하나요?
문서가 폴더와 하위 폴더처럼 단계로 정리되어 탐색하고 이해하기 쉽다는 뜻입니다.
정리의 깊이를 조절할 수 있나요?
네, 하위 폴더의 깊이 한도를 정해서 지나치게 복잡한 구조가 되지 않도록 할 수 있습니다.
상세 정보
작성자의 원본 설명
Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.
인기도
- GitHub 스타
- 70k
- 순위
- #3121
- 라이선스
- NOASSERTION
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
comment-checker
70k에이전트가 자동 댓글 검사기의 피드백을 이해하고 응답하도록 돕습니다. 자동화된 코드나 콘텐츠 검토 결과를 처리하는 데 유용합니다.
lcx-contribute-bug-fix
70k에이전트가 LazyCodex 관련 프로젝트에 버그 수정을 기여하도록 이슈나 PR을 만들어 코드 품질을 높이도록 돕습니다.
lcx-doctor
70k에이전트가 LazyCodex와 Codex CLI 설치 상태를 점검하도록 돕습니다. 업데이트나 변경 후 시스템이 이상하게 동작할 때 유용합니다.
lcx-report-bug
70k에이전트가 LazyCodex 프로젝트의 버그를 자세히 보고하도록 돕습니다. 개발자가 문제를 고칠 수 있도록 유용한 정보를 담은 이슈를 만듭니다.
비슷한 스킬
technical-documentation
394k에이전트가 명확한 기술 문서와 에이전트 지침 파일을 작성하고 검토하도록 도와, 사람과 AI 도구가 쉽게 따를 수 있게 합니다.
architecture-decision-records
280k에이전트가 프로젝트 구조에 관한 중요한 결정을 기록하도록 합니다. 선택의 이유를 이해하고 변경 이력을 명확히 유지하는 데 도움이 됩니다.
code-tour
280k에이전트가 정확한 파일과 줄 번호를 참조하는 단계별 코드 안내를 만들도록 합니다. 소개, 설명, 리뷰에 유용합니다.