dag-map — скилл для Claude Code: визуализация графа агентов
Скилл dag-map рисует граф многоагентной оркестрации сессии: кто родитель, кто дети, на какой глубине и сколько веток. Нужен, чтобы понять, как устроена структура агентов в текущей сессии.
MIT ★ 1 198 обновлён 2026-10-23
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-workflows@claude-code-agent-monitor-pluginsЧто делает dag-map
dag-map берёт данные из API мониторинга агентов — граф с рёбрами parent→child, глубинами и fan-out (сколько детей у каждого родителя) — и выдаёт итоговый отчёт. В отчёте топология (корень, кол-во агентов, макс. глубина), список всех рёбер по слоям, таблица глубин с fan-out и ASCII-дерево структуры.
Скилл проверяет согласованность данных: сравнивает граф оркестрации с сырыми записями агентов и деталями сессии. Если агент указан в parent-child паре, но его нет в наборе узлов, скилл отметит это. Для однопроцессной сессии (без субагентов) просто скажет, что это сессия без ветвления, а не выдумает агентов.
Если dashboard недоступна, скилл подскажет запустить его через npm start из корня репозитория.
Какие задачи решает
- увидеть иерархию субагентов в сессии Claude Code
- проверить глубину оркестрации и максимальный fan-out
- найти orphan-узлы — агентов в parent-child паре без записей
- сравнить данные оркестрации с сырыми записями API
- экспортировать ASCII-граф структуры для отчёта
Примеры запросов агенту
- Покажи граф агентов для сессии
550e8400-e29b-41d4-a716-446655440000 - Визуализируй dag для последней сессии
- Проверь структуру оркестрации и count узлов
Как установить dag-map
1Через маркетплейс плагинов
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor/plugin install ccam-workflows@claude-code-agent-monitor-pluginsКоманда ставит плагин ccam-workflows целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a claude-code3Вручную: положить файлы
~/.claude/skills/dag-map/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/dag-map/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a codex2Вручную: положить файлы
.agents/skills/dag-map/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a cursor2Вручную: положить файлы
.cursor/skills/dag-map/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor plugins/ccam-workflows/skills/dag-map2Вручную: положить файлы
.github/skills/dag-map/SKILL.md1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a gemini-cli2Командой платформы
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-workflows/skills/dag-mapВручную: положить файлы
.devin/skills/dag-map/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о dag-map
Как установить dag-map в Claude Code?
Выполни по порядку: /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, затем /plugin install ccam-workflows@claude-code-agent-monitor-plugins. После этого запусти npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a claude-code и найди скилл в ~/.claude/skills/dag-map/SKILL.md.
Что показывает dag-map?
Граф многоагентной оркестрации: какой агент root, сколько всего агентов, максимальная глубина вложенности, рёбра parent→child и fan-out (сколько детей у каждого родителя). Плюс ASCII-дерево для быстрого просмотра.
Что делать, если dashboard недоступна?
Запусти npm start из корня репозитория Claude-Code-Agent-Monitor. dag-map получает данные из API мониторинга, поэтому dashboard должна быть в сети.
Исходный текст
SKILL.md · MIT
---
name: dag-map
description: >
Render the multi-agent orchestration DAG for a session — parent→child
subagent edges, tree depth, and fan-out — from the Agent Monitor workflow
intelligence API. Cross-checks the orchestration dataset against the raw
agent records and session detail. Use when visualizing how a session's agent
structure was organized.
---
# DAG Map
Render the subagent orchestration graph for one Claude Code session as a depth-ordered DAG.
## Input
The user provides: **$ARGUMENTS**
A session ID. If empty, fetch `GET /api/sessions?limit=1` and use the most recent session, stating which one you picked.
## Data Sources
| Endpoint | Returns |
|----------|---------|
| `GET /api/workflows/{sessionId}` | The `orchestration` dataset: DAG nodes (agent id, type, model, status, depth) and parent→child edges |
| `GET /api/agents` | Raw subagent records (`status`, `type`, `depth`, `parent`) to cross-check node/edge counts |
| `GET /api/sessions/{sessionId}` | Full session detail with nested `agents[]` to confirm the root and total agent count |
## Report Sections
### 1. Topology Summary
From `orchestration`: the root agent, total agent count, max depth, and max fan-out (most children under any one parent). Confirm the agent count against `/api/agents` filtered to this session.
### 2. Edge List
Every parent→child edge, grouped by depth, formatted as:
`depth d: parent[model] → child[type, status]`
Mark leaf agents (no children) and any orphan nodes (a `parent` that is not present in the node set).
### 3. Depth & Fan-out Table
| Depth | Agents at depth | Children spawned | Avg fan-out |
|-------|-----------------|------------------|-------------|
### 4. ASCII Tree
A simple indented tree rendering of the DAG, e.g.:
```
root [opus, completed]
├─ explore [sonnet, completed]
└─ code-review [sonnet, error]
└─ debugger [sonnet, completed]
```
## Output
- Render as Markdown tables plus one fenced ASCII tree block.
- Cite real node and edge counts from the API — never invent agents or edges.
- If a session has no subagents, say so plainly (single-agent session, depth 0) instead of fabricating a tree.
- If the dashboard is unreachable, tell the user to start it with `npm start` from the repo root.
© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor