К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

understand-explain — скилл для Claude Code: разбор кода по графу

Скилл объясняет файл, функцию или модуль по графу знаний проекта: связи, слои, поток данных. Пригодится, когда нужно разобраться в чужом коде.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add Egonex-AI/Understand-Anything --skill understand-explain -a claude-code
Открыть на GitHub

Что делает understand-explain

Скилл берёт готовый граф знаний и отвечает по нему на вопрос о конкретном компоненте. Граф — это JSON с узлами (файлы, функции, классы, модули, конфиги, таблицы, эндпоинты), рёбрами между ними и слоями архитектуры. Сначала скилл ищет нужный узел через Grep, потом собирает его окружение: что он импортирует, что вызывает его, к какому слою относится. Только после этого читает исходник и объясняет роль компонента в проекте, внутреннее устройство и поток данных от входа к выходу.

Перед разбором скилл проверяет свежесть графа. Он берёт project.gitCommitHash из метаданных, сверяет с git rev-parse HEAD и смотрит изменения в рабочем дереве. Если проект успел уйти вперёд, вы получите предупреждение, что часть изменений в объяснении не учтена. Это повод запустить /understand заново, иначе разбор будет про старую версию кода.

Работает скилл от каталога данных: сначала проверяет .understand-anything, при его отсутствии берёт .ua. Нужен файл $UA_DIR/knowledge-graph.json. Если его нет, скилл просто скажет сначала выполнить /understand. Объяснение пишется так, будто читатель не знает языка программирования, поэтому в тексте разбираются и паттерны, и идиомы.

Какие задачи решает

  • разобраться в незнакомом файле перед правкой
  • понять, кто вызывает функцию и что сломается при её изменении
  • увидеть, к какому слою архитектуры относится модуль
  • проследить путь данных от входа до выхода
  • объяснить коллеге устройство чужого компонента

Примеры запросов агенту

  • объясни `src/auth/login.ts`
  • разбери функцию `src/auth/login.ts:verifyToken`
  • что делает модуль `src/db/pool.ts` и кто его использует

Как установить understand-explain

1Через Skills CLI (Vercel)

npx skills add Egonex-AI/Understand-Anything --skill understand-explain -a claude-code

2Вручную: положить файлы

~/.claude/skills/understand-explain/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/understand-explain/

Из того же набора8

Весь набор →
understand Egonex-AI Анализирует кодовую базу и создаёт интерактивный граф знаний об архитектуре, компонентах и связях между ними. Пригодится, чтобы разобраться в существующем проекте. Claude Code CX Codex Cursor +1 5 200установок understand-dashboard Egonex-AI Запускает веб-дашборд с графом знаний кодовой базы. Нужен, когда структуру проекта удобнее изучать визуально. Claude Code CX Codex Cursor +1 3 800установок understand-onboard Egonex-AI Скилл генерирует руководство по онбордингу новых разработчиков в проект на основе графа знаний. Пригодится при подключении новичков к кодовой базе. Claude Code CX Codex Cursor +1 3 700установок understand-chat Egonex-AI Скилл отвечает на вопросы о структуре и связях в коде, используя граф знаний проекта. Нужен, если вы разбираетесь в чужом коде или ищете, где что лежит. Claude Code CX Codex Cursor +1 3 700установок understand-diff Egonex-AI Скилл сопоставляет изменения в Git с графом знаний проекта, чтобы оценить затронутые компоненты и радиус поломки. Пригодится перед ревью пуллреквестов. Claude Code CX Codex Cursor +1 3 600установок understand-domain Egonex-AI Изучает кодовую базу и строит интерактивную схему бизнес-доменов и процессов. Пригодится, чтобы увидеть, как части проекта связаны между собой. Claude Code CX Codex Cursor +1 3 500установок understand-knowledge Egonex-AI Анализирует wiki-базу знаний в стиле Karpathy и строит интерактивный граф сущностей, связей и тем. Подходит для разборки структурированных заметок. Claude Code CX Codex Cursor +1 3 400установок

Похожие

inventory-demand-planning evos Скилл помогает прогнозировать спрос, считать страховой запас и планировать пополнение для розничных сетей с несколькими локациями. Claude Code CX Codex Cursor +1 4 500установок show-me humanlayer Объясняет код и архитектуру через схемы Mermaid, деревья вызовов, diff и HTML-файлы. Пригодится, когда нужно быстро увидеть логику или структуру вместо чтения полотен текста. Claude Code CX Codex Cursor +1 32 300установок mmx-cli MiniMax-AI Скилл подключает mmx к агенту для работы с текстом, изображениями, видео, речью и расшифровкой аудио через MiniMax AI. Claude Code CX Codex Cursor +1 32 000установок install-anti-slop dmmulroy Разворачивает в репозитории вендорные плагины Oxlint против антипаттернов кода. Помогает настроить правила линтинга и зафиксировать версии зависимостей. Claude Code CX Codex Cursor +1 13 600установок setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. Claude Code 1 052 851установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. Claude Code 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. Claude Code CX Codex 282 859установок stitch-loop официальный google-labs-code Организует автономную сборку страниц через Stitch MCP. Агент берёт задачу из файла-эстафеты, создаёт экран, переносит код в проект и сразу пишет задание для следующей итерации. Claude Code CX Codex Cursor +1 56 300установок

Вопросы о understand-explain

Как установить understand-explain в Claude?

Выполните npx skills add Egonex-AI/Understand-Anything --skill understand-explain -a claude-code. Скилл встанет в ~/.claude/skills/understand-explain/SKILL.md.

Что делает understand-explain?

Даёт подробное объяснение файла, функции или модуля: его роль в архитектуре, внутренние связи, зависимости и поток данных. Данные берёт из графа знаний проекта и исходного кода.

Что нужно, чтобы скилл заработал?

Граф знаний в $UA_DIR/knowledge-graph.json. Скилл ищет каталог .understand-anything, а если его нет — .ua. Без файла графа он попросит сначала выполнить /understand.

Исходный текст

SKILL.md · MIT
---
name: understand-explain
description: Use when you need a deep-dive explanation of a specific file, function, or module in the codebase
argument-hint: "[file-path]"
---

# /understand-explain

Provide a thorough, in-depth explanation of a specific code component.

## 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?}
  - Code node types: file, function, class, module, concept
  - Non-code node types: config, document, service, table, endpoint, pipeline, schema, resource
  - Domain/knowledge node types: domain, flow, step, article, entity, topic, claim, source
  - IDs use the node type as prefix, e.g. `file:path`, `function:path:name`, `config:path`, `article:path`
- `edges[]` — each has {source, target, type, direction, weight}
  - Key types: imports, contains, calls, depends_on, configures, documents, deploys, triggers, contains_flow, flow_step, related, cites
- `layers[]` — each has {id, name, description, nodeIds[]}
- `tour[]` — each has {order, title, description, nodeIds[]}

## How to Read Efficiently

1. Use Grep to search within the JSON for relevant entries BEFORE reading the full file
2. Only read sections you need — don't dump the entire graph into context
3. Node names and summaries are the most useful fields for understanding
4. Edges tell you how components connect — follow imports and calls for dependency chains

## Instructions

1. **Resolve the data directory `$UA_DIR`.** Run `UA_DIR=$([ -d .understand-anything ] && echo .understand-anything || echo .ua)` — this is the legacy `.understand-anything/` when it already exists, otherwise the new `.ua/`. Check that `$UA_DIR/knowledge-graph.json` exists. If not, tell the user to run `/understand` first.

2. **Check graph freshness before using graph-derived context**:
   - Read `project.gitCommitHash` from the graph metadata as `GRAPH_COMMIT_RAW`. Resolve it as a commit before using it in any Git diff, then compare it with `git rev-parse HEAD` and inspect project-scoped committed and working-tree changes from the project root:
     ```bash
     GRAPH_COMMIT=$(git rev-parse --verify --end-of-options "${GRAPH_COMMIT_RAW}^{commit}" 2>/dev/null)
     git rev-parse HEAD
     git diff --name-only "$GRAPH_COMMIT" HEAD -- .
     git diff --cached --name-only -- .
     git diff --name-only -- .
     git ls-files --others --exclude-standard -- .
     ```
   - The `-- .` pathspec is required: commits that only touch a sibling monorepo project must not make this graph stale. A hash mismatch alone is not stale when the project diff is empty.
   - Ignore the selected data directory (`.ua/` or legacy `.understand-anything/`) in every command's output because it contains generated graph artifacts, not project source drift.
   - If the committed diff or any working-tree command reports project files, warn before explaining that graph-derived context may omit those changes. Suggest: Run `/understand` to refresh the graph.
   - Run the commit diff only when `GRAPH_COMMIT_RAW` resolves successfully. If the graph commit or Git metadata is missing, invalid, or unavailable, give a brief best-effort warning and continue instead of blocking.

3. **Find the target node** — use Grep to search the knowledge graph for the component: "$ARGUMENTS"
   - For file paths (e.g., `src/auth/login.ts`): search for `"filePath"` matches
   - For function notation (e.g., `src/auth/login.ts:verifyToken`): search for the function name in `"name"` fields filtered by the file path
   - Note the exact node `id`, `type`, `summary`, `tags`, and `complexity`

4. **Find all connected edges** — Grep for the target node's ID in the edges section:
   - `"source"` matches → things this node calls/imports/depends on (outgoing)
   - `"target"` matches → things that call/import/depend on this node (incoming)
   - Note the connected node IDs and edge types

5. **Read connected nodes** — for each connected node ID from step 4, Grep for those IDs in the nodes section to get their `name`, `summary`, and `type`. This builds the component's neighborhood.

6. **Identify the layer** — Grep for the target node's ID in the `"layers"` section to find which architectural layer it belongs to and that layer's description.

7. **Read the actual source file** — Read the source file at the node's `filePath` for the deep-dive analysis.

8. **Explain the component in context**:
   - Its role in the architecture (which layer, why it exists)
   - Internal structure (functions, classes it contains — from `contains` edges)
   - External connections (what it imports, what calls it, what it depends on — from edges)
   - Data flow (inputs → processing → outputs — from source code)
   - Explain clearly, assuming the reader may not know the programming language
   - Highlight any patterns, idioms, or complexity worth understanding

© Egonex-AI · MIT · Egonex-AI/Understand-Anything

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой