Files
Claude-Code-Monitor/plugins/ccam-analytics/commands/top-spenders.md
T
nntrivi2001 57dc91585d feat: Claude Code Monitor — lanes, pipelines and a merged workspace
Internal SmartGift build of a Claude Code monitoring dashboard.

Lanes: a durable unit of parallel agent work, one per working directory,
tracked across session restarts. Managed lanes are git worktrees the
dashboard provisions and can reset or remove behind a three-check destroy
guard and a counted preflight; adopted lanes are directories you already
own and are never destroyable.

Pipelines: a lane moves through pipeline stages. A stage the agent declares
with evidence renders green; a stage inferred from the tool-event stream
renders dashed amber and never counts as done. Detection is forward-only
within a 30-minute window, and never writes the declared stage.

Workspace: one page at /run with a lane grid, the selected lane's pipeline,
and a full Claude console behind a disclosure.
2026-07-30 14:39:03 +07:00

997 B

description, argument-hint
description argument-hint
List the top N most expensive Claude Code sessions by inline cost. [N]

List the most expensive Claude Code sessions from the Agent Monitor dashboard.

N = $ARGUMENTS (default 10 if empty).

Fetch the session list (each session carries an inline cost field from bulk pricing):

curl -s "http://localhost:4820/api/sessions?limit=200"

Then:

  1. Sort sessions by cost descending.
  2. Print the top N as a numbered list, one line each: <rank>. $<cost to 4dp> — <model> — <cwd basename or id> — <started_at>
  3. After the list, print the summed cost of the top N and what percent that is of the summed cost of all returned sessions.

Currency as USD to 4 decimal places. Skip sessions with no/zero cost only if it would otherwise pad the list past meaningful entries — otherwise include them. Keep it terse, no extra commentary.

If the dashboard is unreachable, tell the user to start it with npm start from the repo root.