Skip to main content
command CX Codex

workflow · hoangsonww — Claude Code command: session stats, complexity, patterns

workflow pulls one session's stats, complexity score and most frequent tool sequences from the local Agent Monitor dashboard and prints a short summary.

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 workflow does

The command takes a session id and asks the local Agent Monitor dashboard on http://localhost:4820 for a slice of how the agents worked. The argument is optional. Leave it out and the command picks the newest session through curl -s 'http://localhost:4820/api/sessions?limit=1', then tells you which id it used.

The endpoint hands back 11 datasets, and the command boils them down to a terse one-shot report. A header carries the agent count, maximum depth and total tool calls. Then come the numeric complexity score and the drivers behind it (depth, breadth, tool variety), up to five repeating sequences printed as sequence ×frequency with the most frequent first, and single lines for concurrency lanes, subagent success rate and errors with their origin depth.

It only works while the dashboard is running. If http://localhost:4820 does not answer, the command tells you to launch it with npm start from the repo root, so nothing comes back until you do. For a deeper look it points at the dag-map, delegation-audit, concurrency-report and error-propagation skills.

What it helps with

  • summarise the newest session without typing its id
  • spot which tool sequences repeat most often
  • see what pushes the session complexity score up
  • check subagent success rate and error count in one line
  • recover a lost session id

Example prompts for the agent

  • /workflow — summarise the latest session and tell me which id you picked
  • /workflow [session-id] — which sequences repeat most in this session?
  • /workflow [session-id] — give me the complexity score and the quick signals

How to install workflow

1Plugin marketplace

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

2Manually: put the files in place

.claude/commands/workflow.md

Call it with /workflow. For all projects use ~/.claude/commands/

Questions about workflow

How do I install workflow in Claude Code?

Add the marketplace with /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then run /plugin install ccam-workflows@claude-code-agent-monitor-plugins.

What does the workflow command do?

It reads one session from the local Agent Monitor dashboard and prints a short report: agents, depth, tool calls, a complexity score and the most frequent sequences.

Why does it return nothing?

The dashboard at http://localhost:4820 is probably down, so the call to http://localhost:4820/api/workflows/$ARGUMENTS has nowhere to go. Start it with npm start from the repo root.

Source text

workflow.md · MIT
---
description: Summarize the workflow intelligence for a session — stats, complexity, and top patterns.
argument-hint: "[session-id]"
---

Summarize the Agent Monitor workflow intelligence for a session from `http://localhost:4820`.

The session id is **$ARGUMENTS**. If empty, fetch `curl -s 'http://localhost:4820/api/sessions?limit=1'` and use the most recent session, stating which id you picked. If the dashboard is unreachable, tell the user to start it with `npm start` from the repo root.

Fetch the workflow intelligence:

```
curl -s http://localhost:4820/api/workflows/$ARGUMENTS
```

This returns 11 datasets: `stats`, `orchestration`, `toolFlow`, `effectiveness`, `patterns`, `modelDelegation`, `errorPropagation`, `concurrency`, `complexity`, `compaction`, `cooccurrence`.

Print, concisely:

1. **Header** — session id, total agents, max depth, and total tool calls (from `stats` / `orchestration`).
2. **Complexity** — the numeric `complexity` score and what drives it (depth, breadth, tool diversity).
3. **Top patterns** — up to 5 recurring sequences from `patterns`, each as `sequence ×frequency`, sorted by frequency descending.
4. **Quick signals** — one line each: concurrency lane count (`concurrency`), subagent success rate (`effectiveness`), and total errors with origin depth (`errorPropagation`).

Keep it terse — this is a one-shot. Cite only numbers returned by the API; for deeper analysis point the user at the `dag-map`, `delegation-audit`, `concurrency-report`, or `error-propagation` skills.

© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

workflow by other authors comes first.

From the same set155

The whole set →

Project sponsors

Companies that keep this analytics open