understand-chat
AIが生成した知識グラフを使って、プロジェクトの構造や特定の機能がどのように動作するかなど、コードに関する質問にインタラクティブに答えることで、コードベースの理解を深める支援をするSkill。
📜 元の英語説明(参考)
Answer questions about any codebase using an AI-generated knowledge graph. Use when: asking architecture questions about a project, understanding how specific features work, exploring codebase relationships interactively.
🇯🇵 日本人クリエイター向け解説
AIが生成した知識グラフを使って、プロジェクトの構造や特定の機能がどのように動作するかなど、コードに関する質問にインタラクティブに答えることで、コードベースの理解を深める支援をするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o understand-chat.zip https://jpskill.com/download/15511.zip && unzip -o understand-chat.zip && rm understand-chat.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15511.zip -OutFile "$d\understand-chat.zip"; Expand-Archive "$d\understand-chat.zip" -DestinationPath $d -Force; ri "$d\understand-chat.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
understand-chat.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
understand-chatフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
/understand-chat
概要
.understand-anything/knowledge-graph.json に保存された、AIが生成した知識グラフを用いて、あらゆるコードベースに関する質問に答えます。このスキルは、グラフノードを検索し、エッジをたどって接続されたコンポーネントを見つけ、実際のファイルパス、関数名、アーキテクチャレイヤーに基づいた回答を返します。
グラフ構造のリファレンス
知識グラフの JSON は、以下の構造を持ちます。
project— {name, description, languages, frameworks, analyzedAt, gitCommitHash}nodes[]— それぞれが {id, type, name, filePath, summary, tags[], complexity, languageNotes?} を持ちます。- ノードの種類: file, function, class, module, concept
- ID:
file:path,func:path:name,class:path:name
edges[]— それぞれが {source, target, type, direction, weight} を持ちます。- 主要な種類: imports, contains, calls, depends_on
layers[]— それぞれが {id, name, description, nodeIds[]} を持ちます。tour[]— それぞれが {order, title, description, nodeIds[]} を持ちます。
効率的な読み方
- JSON ファイル全体を読む前に、まず Grep を使用して関連するエントリを検索します。
- 必要なセクションのみを読みます。グラフ全体をコンテキストにダンプしないでください。
- ノード名とサマリーは、理解する上で最も役立つフィールドです。
- エッジはコンポーネントがどのように接続されているかを示します。依存関係の連鎖を調べるには、imports と calls をたどってください。
指示
-
現在のプロジェクトのルートに
.understand-anything/knowledge-graph.jsonが存在することを確認してください。存在しない場合は、最初に/understandを実行するようにユーザーに指示してください。 -
プロジェクトのメタデータのみを読み取ります — Grep または Read を使用して、行数制限を設け、ファイルの上部から
"project"セクションのみをコンテキストとして抽出します(name, description, languages, frameworks)。 -
関連するノードを検索します — Grep を使用して、ユーザーのクエリキーワード "$ARGUMENTS" で知識グラフファイルを検索します。
"name"フィールドを検索します: グラフファイル内でgrep -i "query_keyword"を実行します。"summary"フィールドを検索して、意味的に一致するものを探します。"tags"配列を検索して、トピックが一致するものを探します。- 一致するすべてのノードの
idの値をメモします。
-
接続されたエッジを見つけます — 一致した各ノード ID について、
edgesセクションでその ID を Grep 検索し、以下を見つけます。- 何をインポートまたは依存しているか(下流)
- 何がそれを呼び出すか、またはインポートするか(上流)
- これにより、クエリの周囲の 1 ホップのサブグラフが得られます。
-
レイヤーのコンテキストを読み取ります —
"layers"を Grep 検索して、一致したノードがどのアーキテクチャレイヤーに属しているかを理解します。 -
関連するサブグラフのみを使用してクエリに答えます:
- グラフから特定のファイル、関数、および関係を参照します。
- どのレイヤーが関連するか、またその理由を説明します。
- 簡潔かつ徹底的に説明します。概念を実際のコードの場所にリンクします。
- クエリがどのノードにも一致しない場合は、その旨を伝え、グラフから関連する用語を提案します。
例
例 1: 認証フローの理解
ユーザー: /understand-chat 認証はどのように機能しますか?
エージェントは、"auth"、"login"、"session"、"token" に一致するノードを知識グラフで検索します。file:src/auth/session.ts (サマリー: "リフレッシュトークンローテーションによる JWT セッション管理") および func:src/auth/middleware.ts:requireAuth (サマリー: "JWT を検証し、ユーザーをリクエストにアタッチする Express ミドルウェア") を見つけます。エッジをたどって、func:src/api/users.ts:createUser が func:src/auth/session.ts:createSession を呼び出し、auth レイヤーに 4 つのファイルが含まれていることを発見します。エージェントは、完全な認証フローを応答します: リクエストがミドルウェアに到達し、JWT が検証され、必要に応じてセッションがリフレッシュされ、ユーザーオブジェクトがリクエストコンテキストにアタッチされます。
例 2: サービスの依存関係の追跡
ユーザー: /understand-chat 支払いサービスを呼び出すものは何ですか?
エージェントは "payment" に一致するノードを検索し、file:src/services/payment.ts および func:src/services/payment.ts:processCharge を見つけます。次に、target がこれらのノード ID に一致するエッジを検索し、3 つの上流の呼び出し元を見つけます: func:src/api/checkout.ts:handleCheckout、func:src/jobs/billing.ts:runMonthlyBilling、および func:src/webhooks/stripe.ts:handleInvoicePaid。エージェントは、ファイルパスとともに 3 つの呼び出し元すべてを報告し、支払いサービスが Services レイヤーに存在し、同期 API 呼び出し元と非同期ジョブ呼び出し元の両方があることを指摘します。
ガイドライン
- コンテキストの使用量を最小限に抑えるために、ファイル全体を読む前に、常に Grep で知識グラフを検索してください。
- 一般的な回答をするのではなく、グラフから特定のファイルパスと関数名を参照してください。
- クエリがあいまいな場合は、複数の関連用語を検索し、最も関連性の高い一致を提示します。
- 応答を集中させるために、エッジのトラバーサルを 1 ホップに制限します。より深い探索のためにフォローアップクエリを提案します。
- 知識グラフが古い場合は(
analyzedAtとgitCommitHashを確認してください)、再生成するようにユーザーに警告してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
/understand-chat
Overview
Answer questions about any codebase using an AI-generated knowledge graph stored at .understand-anything/knowledge-graph.json. The skill searches graph nodes, follows edges to find connected components, and returns answers grounded in actual file paths, function names, and architectural layers.
Graph Structure Reference
The knowledge graph JSON has this structure:
project— {name, description, languages, frameworks, analyzedAt, gitCommitHash}nodes[]— each has {id, type, name, filePath, summary, tags[], complexity, languageNotes?}- Node types: file, function, class, module, concept
- IDs:
file:path,func:path:name,class:path:name
edges[]— each has {source, target, type, direction, weight}- Key types: imports, contains, calls, depends_on
layers[]— each has {id, name, description, nodeIds[]}tour[]— each has {order, title, description, nodeIds[]}
How to Read Efficiently
- Use Grep to search within the JSON for relevant entries BEFORE reading the full file
- Only read sections you need — don't dump the entire graph into context
- Node names and summaries are the most useful fields for understanding
- Edges tell you how components connect — follow imports and calls for dependency chains
Instructions
-
Check that
.understand-anything/knowledge-graph.jsonexists in the current project root. If not, tell the user to run/understandfirst. -
Read project metadata only — use Grep or Read with a line limit to extract just the
"project"section from the top of the file for context (name, description, languages, frameworks). -
Search for relevant nodes — use Grep to search the knowledge graph file for the user's query keywords: "$ARGUMENTS"
- Search
"name"fields:grep -i "query_keyword"in the graph file - Search
"summary"fields for semantic matches - Search
"tags"arrays for topic matches - Note the
idvalues of all matching nodes
- Search
-
Find connected edges — for each matched node ID, Grep for that ID in the
edgessection to find:- What it imports or depends on (downstream)
- What calls or imports it (upstream)
- This gives you the 1-hop subgraph around the query
-
Read layer context — Grep for
"layers"to understand which architectural layers the matched nodes belong to. -
Answer the query using only the relevant subgraph:
- Reference specific files, functions, and relationships from the graph
- Explain which layer(s) are relevant and why
- Be concise but thorough — link concepts to actual code locations
- If the query doesn't match any nodes, say so and suggest related terms from the graph
Examples
Example 1: Understanding authentication flow
User: /understand-chat how does authentication work?
The agent searches the knowledge graph for nodes matching "auth", "login", "session", and "token". It finds file:src/auth/session.ts (summary: "JWT session management with refresh token rotation") and func:src/auth/middleware.ts:requireAuth (summary: "Express middleware that validates JWT and attaches user to request"). It follows edges to discover that func:src/api/users.ts:createUser calls func:src/auth/session.ts:createSession, and that the auth layer contains 4 files. The agent responds with the complete authentication flow: request hits middleware, JWT is validated, session is refreshed if needed, and user object is attached to the request context.
Example 2: Tracing dependencies of a service
User: /understand-chat what calls the payment service?
The agent searches for nodes matching "payment" and finds file:src/services/payment.ts and func:src/services/payment.ts:processCharge. It then searches edges where target matches these node IDs, finding 3 upstream callers: func:src/api/checkout.ts:handleCheckout, func:src/jobs/billing.ts:runMonthlyBilling, and func:src/webhooks/stripe.ts:handleInvoicePaid. The agent reports all three callers with their file paths, explains that the payment service sits in the Services layer, and notes that it has both synchronous API callers and asynchronous job callers.
Guidelines
- Always search the knowledge graph with Grep before reading the full file to minimize context usage
- Reference specific file paths and function names from the graph rather than giving generic answers
- When a query is ambiguous, search multiple related terms and present the most relevant matches
- Limit edge traversal to 1-hop to keep responses focused; suggest follow-up queries for deeper exploration
- If the knowledge graph is outdated (check
analyzedAtandgitCommitHash), warn the user to regenerate it