ainb-fleetcostlisted
Install: claude install-skill stevengonsalvez/agents-in-a-box
# ainb fleet:cost
Fleet-shaped spend rollups. ainb already tracks `cost_usd` per provider call
(the burndown plugin aggregates it); this verb reshapes that data into
per-session / per-model / per-day / per-group USD totals joined to the live
fleet, and evaluates configured budget caps.
## Run
```bash
ainb fleet cost # text tables (default)
ainb --format json fleet cost # JSON for piping
ainb --format json fleet cost --period week # window: today|week|30days|month|all
```
`--format` is a **global** flag — it goes before `fleet`, not after `cost`.
The `--period` window scopes the data (default `month`): burndown date-bounds
its call set and re-aggregates, so a narrower period returns less spend; `all`
reports lifetime totals.
## Output fields (JSON)
| field | meaning |
|---|---|
| `totals` | fleet-wide `{cost_usd, bucket, session_count, model_count}` |
| `sessions[]` | per-session `{session_id, provider, project, cwd?, group?, cost_usd, bucket}`, sorted by descending cost |
| `models[]` | per-model `{model, cost_usd, bucket}`, sorted by descending cost |
| `daily[]` | per-day `{date, cost_usd, bucket}` |
| `groups[]` | per-workspace `{group, cost_usd, session_count, bucket}` (only sessions that match a live fleet cwd) |
| `budget_breaches[]` | `{scope, subject, cwd?, cost_usd, limit_usd}` — caps crossed this run (also delivered to notifyd) |
`bucket` is the token breakdown: `input_tokens`, `cache_creation_tokens`,