본문으로 건너뛰기
Skillpedia
문서화41k · #7000

deepinit

하는 일

이 스킬은 에이전트가 코드 프로젝트 전반에 문서 파일을 쓰게 합니다. AI 도우미가 처음부터 프로젝트의 구조와 규칙을 이해하기를 원하는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓낯선 코드베이스를 AI 도우미가 빨리 이해하기를 원할 때.
  • ✓각 폴더의 역할을 설명하는 메모가 없는 큰 프로젝트일 때.
  • ✓중요한 각 부분에 문서 파일을 두고 싶을 때.

스킬 링크

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/deepinit/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/deepinit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 코드베이스 전체에 AGENTS.md 메모를 설정해서, 이후 AI 도우미가 각 폴더를 이해하도록 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 프로젝트 구조를 읽고, 중요한 각 폴더에 짧은 메모를 쓰며, 그것을 상위 메모와 연결합니다. 각 메모에는 폴더가 담고 있는 것, 부분들이 연결되는 방식, 특별한 규칙이 나열됩니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Deep Init Skill

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

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 line:

**Parent context:** `../AGENTS.md`

This MUST be visible prose, never an HTML comment. Claude Code strips HTML comments before a memory file reaches the model, so <!-- Parent: ... -->, <!-- Generated: ... --> and a commented MANUAL boundary are invisible to the agent that is supposed to act on them.

This creates a navigable hierarchy:

/AGENTS.md                          ← Root (no parent line)
├── src/AGENTS.md                   ← **Parent context:** `../AGENTS.md`
│   ├── src/components/AGENTS.md    ← **Parent context:** `../AGENTS.md`
│   └── src/utils/AGENTS.md         ← **Parent context:** `../AGENTS.md`
└── docs/AGENTS.md                  ← **Parent context:** `../AGENTS.md`

Loading Model

Stock Claude Code discovers nested CLAUDE.md by basename and never loads a nested AGENTS.md; a root @AGENTS.md import does not reach subdirectories either. The nested files generated here are delivered by OMC's PostToolUse directory-context injector, which walks up from each accessed file and injects the nearest AGENTS.md/README.md once per session.

That means the hierarchy requires OMC's hooks to be active. When OMC hooks are disabled (DISABLE_OMC=1, OMC_SKIP_HOOKS=post-tool-use) or the plugin is not registered, add a root-level CLAUDE.md symlink or @AGENTS.md import for the root file and expect nested files to stay unread.

AGENTS.md Template

# {Directory Name}

**Parent context:** `{relative_path_to_parent}/AGENTS.md`
**Generated:** {timestamp} · **Updated:** {timestamp}

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

Notes under this heading are written by humans and preserved on regeneration.

Execution Workflow

Step 1: Map Directory Structure

Task(subagent_type="explore", model="haiku",
  prompt="List all directories recursively. Exclude: node_modules, .git, dist, build, __pycache__, .venv, coverage, .next, .nuxt")

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 (the ## Manual Notes heading and everything under it are preserved)
  3. Compare:
    • New files added?
    • Files removed?
    • Structure changed?
  4. Merge:
    • Update auto-generated content
    • Preserve manual annotations
    • Update timestamp

Step 5: Validate Hierarchy

After generation, run validation checks:

Check How to Verify Corrective Action
Parent references resolve Read each AGENTS.md, check the **Parent context:** path exists Fix path or remove orphan
No orphaned AGENTS.md Compare AGENTS.md locations to directory structure Delete orpha
자주 묻는 질문

메모가 숨겨진 형식으로 쓰이나요?

아니요. 숨긴 주석은 AI에게 닿지 않으므로, 상위 연결은 평범하게 보이는 텍스트입니다.

내 코드를 바꾸나요?

목적은 문서 파일 작성이므로, 메모는 코드와 함께 추가됩니다.

Claude Code가 이 파일들을 자동으로 불러오나요?

표준 Claude Code는 중첩된 AGENTS.md 파일을 자동으로 불러오지 않으므로, 이 스킬은 그 파일이 AI에 닿는 방식을 기준으로 설계되어 있습니다.

상세 정보

작성자의 원본 설명

Deep codebase initialization with hierarchical AGENTS.md documentation

repo: Yeachan-Heo/oh-my-claudecode

인기도

GitHub 스타
41k
순위
#7000
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬