fleet-stats

fleet-stats is a skill for Claude Code, Codex from chipi/agentic-ai-homelab. It costs 78 tokens per session (753 once invoked), scanned A, original, MIT.

A local report that counts coding-agent subagent calls and shows their token use, model tiers, costs, and escalations from a Claude Code session transcript.

In plain words
What is it for?
Checking which agents ran, how often they ran, how many tokens they used, how often they escalated, and whether cheaper model tiers handled most work.
Why use it?
It shows whether work and spending are actually distributed across the intended subagents and model levels.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Good fit Checking which agents ran, how often they ran, how many tokens they used, how often they escalated, and whether cheaper model tiers handled most work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/fleet-stats
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chipi/agentic-ai-homelab --skill fleet-stats
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fleet-stats

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/fleet-stats/github.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/fleet-stats)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/fleet-stats"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/fleet-stats/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fleet-stats

Your own site · 80×15
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/fleet-stats"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/fleet-stats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00753
Opus 5 $0.00039 $0.00377
Sonnet 5 $0.00016 $0.00151
Haiku 4.5 $0.00008 $0.00075

Measured 9d ago against content hash 3f5aca071c86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fleet-stats scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/fleet_stats.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workstation/claude/skills/fleet-stats/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

fleet-stats

Read the current session's transcript and report how the subagent fleet behaved — who ran, how often, tokens per agent and per model tier, and how often executors escalated to the advisor. Answers "does the cost-spread work" from real data. Local + read-only.

Run

python3 ~/.claude/skills/fleet-stats/scripts/fleet_stats.py   # latest transcript for this cwd
# or a specific transcript:
python3 ~/.claude/skills/fleet-stats/scripts/fleet_stats.py <path-to-session>.jsonl

It parses each toolUseResult with an agentType (a top-level subagent invocation) for totalTokens + resolvedModel, then walks <session>/subagents/ for nested escalations (see "How nesting is counted").

Read the report

  • invocations per agent — who ran, how many times, on which model, tokens.
  • token + cost spread by model tier — the money shot: haiku/sonnet should carry the volume; opus should be a small slice (advisor escalations only). If opus dominates, the tiering isn't paying off.
  • escalation — nested executor→advisor calls.
  • delegation diagram — mermaid; who called whom.

Cost rates in the script are approximate — update to current pricing (see the claude-api skill); tokens-per-model is the real signal.

How nesting is counted (v2)

Only top-level subagent calls (those the orchestrator spawned) appear in the main transcript. A nested call — an executor consulting the advisor — runs as a separate sub-agent, recorded in <session>/subagents/agent-<id>.jsonl, and never lands in the main transcript. v1 read only the main transcript, so nested escalations were invisible: escalation showed 0 nested and the advisor's (opus) tokens went uncounted entirely (they do not roll into the parent — a parent's totalTokens is its own final-context, disjoint from the child's).

v2 walks the subagents/ dir too:

  • Top-level rows use the authoritative totalTokens from the main transcript — identical numbers to v1.
  • Nested rows read the sub-agent's own final-context (input + cache + output of its last turn — exactly what totalTokens measures) from its transcript, and link back to the parent that spawned it via meta.toolUseId. Some escalations (e.g. a reviewer's advisor consult) are never persisted as a result in the parent, so the sub-transcript is the only source.

Read the full file on GitHub · 61 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 61 lines · 78 tokens per session scan A 3f5aca071c86

Subscribe to this mod's changes

fleet-stats is a skill published in the GitHub repository chipi/agentic-ai-homelab (2 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 753 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.