Skip to main content
skill CX Codex

dag-map — Claude Code skill: visualize agent orchestration graph

dag-map renders the multi-agent orchestration graph for a session: parent-child relationships, depth layers, and fan-out. Use it to understand how agents branch and nest within a session.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-workflows@claude-code-agent-monitor-plugins
Open on GitHub

What dag-map does

dag-map pulls orchestration data from the Agent Monitor workflow API—parent→child edges, agent depth, and fan-out counts—and generates a full topology report. The output includes a summary (root agent, total count, max depth, max fan-out), an edge list grouped by depth, a table of depths with fan-out metrics, and an ASCII tree rendering of the structure.

The skill cross-checks consistency: it compares the orchestration graph against raw agent records and session details to catch orphan nodes (edges pointing to missing agents). For a single-agent session with no subagents, it reports that plainly instead of fabricating a tree.

If the monitor dashboard is unreachable, the skill suggests starting it with npm start from the repo root.

What it helps with

  • see the subagent hierarchy within a Claude Code session
  • check orchestration depth and maximum fan-out per parent
  • find orphan nodes—agents in parent-child pairs without records
  • validate orchestration data against raw agent records
  • export the agent structure as an ASCII tree for reports

Example prompts for the agent

  • Show me the agent graph for session 550e8400-e29b-41d4-a716-446655440000
  • Visualize the dag for my last session
  • Check orchestration structure and verify agent node counts

How to install dag-map

1Plugin marketplace

/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-workflows@claude-code-agent-monitor-plugins

This installs the whole ccam-workflows plugin with all its skills

2Skills CLI (Vercel)

npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a claude-code

3Manually: put the files in place

~/.claude/skills/dag-map/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dag-map/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dag-map

How do I install dag-map in Claude Code?

Run /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then /plugin install ccam-workflows@claude-code-agent-monitor-plugins. Next, execute npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill dag-map -a claude-code. The skill will be available at ~/.claude/skills/dag-map/SKILL.md.

What does dag-map display?

A directed acyclic graph of agent orchestration: root agent, total agent count, maximum nesting depth, all parent→child edges grouped by layer, and fan-out metrics (children per parent). Also includes an ASCII tree for quick visual inspection.

What if the monitor dashboard is not running?

Start it by running npm start from the root of the Claude-Code-Agent-Monitor repository. dag-map fetches data from the monitoring API, so the dashboard must be accessible.

Source text

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set155

The whole set →
insights The insights command reads Agent Monitor data and reports three high-impact findings about Claude Code usage. Use it to spot activity shifts, cache patterns, or API errors. CX Codex +1 ★ 1,198repo stars audit-config audit-config counts what sits in your Claude config per surface and prints one compact table with a short verdict on where things have grown. CX Codex +1 ★ 1,198repo stars memory Lists file-based memory stores and CLAUDE.md files grouped by project via the Agent Monitor dashboard. CX Codex +1 ★ 1,198repo stars compare Compare two sessions by cost and workflow metrics. Use the command to find differences in token use, tool activity, and subagent results. CX Codex +1 ★ 1,198repo stars productivity-coach productivity-coach reviews Claude Code session patterns via Agent Monitor data to deliver actionable advice on token efficiency and costs. CX Codex ★ 1,198repo stars concurrency-report The concurrency-report skill examines agent concurrency in a session, including lane usage, peak parallel width, and work that ran in sequence. Use it to see how a multi-agent run was scheduled. CX Codex +1 ★ 1,198repo stars fleet-runs fleet-runs — a skill for Claude Code and Codex that reads Workflow fleet run journals from the Agent Monitor and displays run status with per-agent breakdown. CX Codex +1 ★ 1,198repo stars transcript-replay transcript-replay walks Claude Code session transcripts turn-by-turn from Agent Monitor data, summarizing user prompts, assistant decisions, and tool executions. CX Codex +1 ★ 1,198repo stars

Project sponsors

Companies that keep this analytics open