本文へスキップ
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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/deepinit/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に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

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル