Skip to main content
skill CX Codex

benchmark: a skill that scores a session against the norm · hoangsonww

The benchmark skill takes one session or a few recent ones and compares them with the rolling average from Agent Monitor data: cost, tokens, tool count and workflow complexity. Each metric comes back as a percentile of the population.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill benchmark -a claude-code
Open on GitHub

What benchmark does

The skill reads Agent Monitor through its API. The session list builds the baseline, the pricing endpoint returns spend and the token breakdown, the workflows endpoint returns tool count and complexity, and analytics corroborates the population averages.

Input is a session ID, the word latest for the newest one, latest N for several, or nothing — then the most recent session is used. For every metric the skill computes the population mean, median and standard deviation, then the target's percentile and z-score. A |z| above 2 gets the outlier label.

The report is a Markdown table: metric, session value, population mean, percentile, z-score, label. Currency in USD to 4 decimals, tokens and tool counts as integers, complexity to 2 decimals. ▲ marks above-average, ▼ below-average. One closing line reads "Normal session" or "Outlier — driven by <metric> (pNN)". When a session stands out, the skill names the metric behind it.

The baseline comes only from the fetched population. Nothing is estimated by eye, which matters if you later lean on those numbers.

What it helps with

  • Tell whether a session was ordinary in cost and volume
  • Find the metric that pushed a session out of band
  • Compare several recent sessions against one baseline

Example prompts for the agent

  • Benchmark session a1b2c3 against the last 200 sessions
  • Run benchmark on latest and say if it is normal or an outlier
  • Benchmark latest 5 against the rolling average per metric

How to install benchmark

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/benchmark/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/benchmark/

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

Questions about benchmark

How do I install benchmark in Claude Code?

Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill benchmark -a claude-code. The skill file lands at ~/.claude/skills/benchmark/SKILL.md.

What does benchmark do?

It measures a session's cost, total tokens, tool count and complexity score, then reports where each one sits in the population and how far it deviates from the mean.

Where does the comparison baseline come from?

From Agent Monitor: the session list builds the rolling average, while the pricing and workflow endpoints supply the target session's metrics. Percentiles are computed only from the fetched population.

Source text

SKILL.md · MIT
---
name: benchmark
description: >
  Benchmark one session (or a small recent set) against the rolling average using
  Agent Monitor data — cost, total tokens, tool count, and workflow complexity
  score — and report where each metric lands as a percentile of the population.
  Tells you whether a session was normal, cheap, or an outlier. Use when judging
  whether a session was typical or out of band.
---

# Benchmark

Score a session against the rolling population average and report its percentile on
cost, tokens, tool count, and complexity using Agent Monitor data.

## Input

The user provides: **$ARGUMENTS**

This may be:
- A single session ID — benchmark that session
- "latest" — benchmark the most recent session
- "latest N" — benchmark the N most recent sessions, each vs the average
- empty — benchmark the most recent session (default)

## Data Sources

| Endpoint | Returns |
|----------|---------|
| `GET /api/sessions?limit=N` | Population of sessions with `cost`, `model`, `started_at`, `metadata` (turn_count, total_turn_duration_ms) — builds the rolling baseline |
| `GET /api/pricing/cost/{sessionId}` | `{ total_cost, breakdown:[{ input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost }] }` — the target session's cost and tokens |
| `GET /api/workflows/{sessionId}` | `complexity` (score), `stats` (tool/event counts), `toolFlow` (distinct tools used) — the target session's tool count and complexity |
| `GET /api/analytics` | `avg_events_per_session`, `tool_usage`, `daily_sessions` — corroborates population-level averages |

## Report Sections

### 1. Build the Baseline
Fetch the population with `GET /api/sessions?limit=200` (the rolling set). For each
session gather cost (`GET /api/pricing/cost/{id}` or the list `cost` field), total
tokens (sum of the 4 token types from the pricing breakdown), tool count and
complexity (`GET /api/workflows/{id}`). Compute mean, median, and standard
deviation for each metric across the population.

### 2. Measure the Target
For the requested session, pull the same four metrics:
- **Cost** — `total_cost` from `GET /api/pricing/cost/{id}`.
- **Total tokens** — `input + output + cache_read + cache_write` summed from the breakdown.
- **Tool count** — distinct/total tools from `GET /api/workflows/{id}` `stats`/`toolFlow`.
- **Complexity score** — `complexity.score` from `GET /api/workflows/{id}`.

### 3. Percentile and Deviation
For each metric report the target's percentile within the population (share of
sessions at or below it) and its z-score `(value − mean) / stddev`. Label each:
below average / typical / above average / outlier (|z| > 2).

### 4. Verdict
State whether the session was normal overall. If it is an outlier, name which
metric drove it (e.g., complexity p96, cost p91 → an unusually heavy session).

## Output

- A Markdown table: metric | session value | population mean | percentile | z-score | label.
- Currency in USD to 4 decimals; tokens and tool counts as integers; complexity to 2 decimals.
- Use ▲ for above-average and ▼ for below-average vs the mean.
- One-line verdict: "Normal session" or "Outlier — driven by <metric> (pNN)".
- When benchmarking multiple sessions, one row block per session plus a summary line.
- Read-only: percentiles come only from the fetched population; never fabricate the baseline.

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

Similar skills

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

benchmark by other authors comes first.

benchmark affaan-m This skill measures page, API, and build performance, then compares results before and after a change. Use it to check a release or investigate reports that a page feels slow. CX Codex +1 4,500installs benchmark TakaGoto Runs your RAG pipeline through a query set and shows where the time and tokens go. Useful once answers start feeling slow or expensive. CX Codex +1 ★ 24repo stars benchmark-checklist backnotprop A skill that makes the agent answer seven questions with evidence from a run before it reports a speedup or a regression. CX Codex +1 4,100installs cost-benchmark ruvnet Runs corpus benchmarks to evaluate booster performance and compare spend against Gemini or Claude baselines. Generates verifiable cost tables before releases. CX Codex +1 679installs best-ai-marketing-platform-benchmark reason-machines A skill that lays out a side-by-side benchmark of platforms tracking brand mentions in ChatGPT, Perplexity and Google AI Overviews. Useful when you are picking a tool to watch AI search visibility. CX Codex +1 903installs benchmark-model modular Drives load against a running max serve endpoint and reports tokens/sec, TTFT and TPOT. Useful when you need to know what a MAX model actually holds. CX Codex +1 887installs benchmark-vllm-model chalk-ai Works out what a self-hosted model costs per token and per request: brings it up on a GPU, loads it to saturation, then divides the hourly price by measured throughput. CX Codex +1 837installs benchmark-paper-template HKUSTDial Audits a benchmark paper against five pillars and returns a section skeleton, a six-part Introduction chain and a pre-submission checklist. CX Codex +1 684installs

From the same set20

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor