← ClaudeAtlas

reflectcostlisted

Report reflect drain spend over a time window — tokens split by cached (cache_read), uncached writes (cache_creation), and io (input+output), with a $ estimate, grouped by day / outcome / model / transcript. Reads the drainer's cost log and surfaces outlier runs and cache-reuse health (the 41.5M-token failure mode = low cache reuse + high cache writes). Use to answer "what is reflection costing me" for the last day / week.
stevengonsalvez/agents-in-a-box · ★ 14 · AI & Automation · score 77
Install: claude install-skill stevengonsalvez/agents-in-a-box
# /reflect:cost — Drain spend report Shows what the reflect background drainer is spending: token volume split into **cached** (cheap reuse), **uncached writes** (expensive cache_creation), and **io** (input+output), plus a ballpark `$est`, grouped by day, outcome, model, or transcript. This is the observability the 2026-05-31 incident lacked — one drain run burned 41.5M tokens / ~$713 for zero net-new learnings and nothing surfaced it until a manual backfill. ## When to Use - "What did reflection cost me today / this week?" - Spot an outlier run (a single transcript that blew up the spend). - Check **cache reuse**: a healthy drain is cache_read-heavy; a low cache-reuse % with high cache_creation is the costly failure mode. - Confirm the drain is running on the cheap model (should be `sonnet`, not `opus`) after a deploy. ## Window argument Parse the window from the user's request and pass it as `--since`: | User says | `--since` | |-----------|-----------| | "1 day", "today", "last 24h", (default) | `1d` | | "this week", "last 7 days" | `7d` | | "last hour" | `1h` | | "last month", "30 days" | `30d` | Default to `1d` when unspecified. ## Run it Locate the cost reporter (prefer the running plugin, else the newest cached version), then render. The script is `reflect_cost.py`, shipped in the reflect plugin's `scripts/`. ```bash WINDOW="1d" # ← substitute from the table above # Resolve reflect_cost.py robustly across deploy layouts. COST_PY="" for cand in \ "${