Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyze the dispatch-log for per-feature spend, cache hit rate, and model routing, surfacing optimization opportunities. Use when costs look high, before a budget review, or when hunting for ways to cut LLM spend.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 150% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 91% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 172% | 0% |
Look at the dispatch-log with a finance hat on. Answer:
~70% on a stable system prompt is a smell.)
gpt-5-nano / gemini-flash could do for 1/30th the cost?
batch API (50% discount, 24h SLA)?
The output is a list of opportunities, ranked by estimated monthly savings, not a blame report. Owned by the ai-finops agent.
~/.yakos-state/dispatch-log*.ndjson (current + rotated).runtime billing snapshot to compute per-call cost.
feature_tag (set by the lead or inferred from the calling agent's domain).
system_prompt_hash.Low hit rates point at unstable prompts (date-stamped headers, shuffled examples, etc.).
model choices. Opus on a cheap-eligible agent is flagged.
latency-sensitivity (offline rubric scoring, summarization backfills, etc.) that are running on the realtime API.
optimization opportunities, and recommended next actions.
owner.
numbers to the meeting.
fingerprint before going to GA.
should be downgraded / upgraded).
yakos cost --tail does that.estimates are best-effort; the provider invoice is authoritative. This skill finds patterns the dashboard doesn't surface.
is too high to draw conclusions.
sh SINCE="${SINCE:-$(date -u -v-30d +%Y-%m-%d 2>/dev/null || date -u -d '30 days ago' +%Y-%m-%d)}" yakos cost --since "$SINCE" --json --raw > /tmp/dispatches.jsonl
feature_tag, sum cost. Top Nfeatures get listed; tail is "other." sh jq -s 'group_by(.feature_tag) | map({feature: .[0].feature_tag, cost: map(.cost_usd) | add, calls: length}) | sort_by(-.cost)' \ /tmp/dispatches.jsonl > /tmp/by-feature.json
usage.cache_read_input_tokens vs. usage.cache_creation_input_tokens vs. usage.input_tokens per system_prompt_hash. Flag prompts where cache_read / (cache_read + uncached) < 0.7.
used and the model declared in its agent file.
agent.model: cheap but actual = claude-opus-4-7 → flag"model override" (lead manually upgraded; check rationale).
agent.model: opus but task prompt is <500 tokens and output is<100 tokens → flag "best-when-cheap-would-do."
eligible if (a) volume > 100/day, (b) p99 user-facing latency tolerance > 1h (declared in agent frontmatter), (c) calls are independent (no chaining). The skill emits a candidate list.
Read ~/.yakos-state/model-routing-candidates.ndjson and surface any pending model-routing opportunities as part of the review. sh # List pending candidates, ranked by estimated monthly savings. MR_CANDS="${HOME}/.yakos-state/model-routing-candidates.ndjson" if [ -s "$MR_CANDS" ]; then echo "### Pending model-routing candidates" jq -rs ' group_by(.agent) | map(sort_by(.generated_at) | last) | sort_by(-.estimated_monthly_savings_usd) | .[] | " \(.agent): \(.current_model) -> \(.suggested_model)" + " est. savings=~$\(.estimated_monthly_savings_usd)/mo" + " n=\(.evidence.n_cases) run=\(.evidence.eval_run_id)" ' "$MR_CANDS" echo echo " Promote via: yakos model-routing promote <agent-id>" echo " Reject via: yakos model-routing reject <agent-id> [--note \"reason\"]" fi Each candidate entry includes estimated_monthly_savings_usd (from the eval run), the evidence n_cases, and the eval run id so the operator can cross-reference the eval log. List ranked by savings desc; tail roll into "and N more" for long lists (> 10).
Each item: what to change, why, est. $/mo saved, est. effort (hours). Include pending model-routing candidates from step 6 in this ranking.
declared; agents that should be downgraded.
suspected cause (volatile prefix, low call volume, etc.).
batch-equivalent.
$YAKOS_FINOPS_WEBHOOK if --post is set.sh# 1. Top features by spend yakos cost --since 2026-04-01 --by feature --json | jq 'sort_by(-.cost_usd) | .[0:10]' # 2. Cache hit rate (claude only — others lack the field as of v0.6) yakos cost --since 2026-04-01 --raw | \ jq -s 'group_by(.system_prompt_hash) | map({hash: .[0].system_prompt_hash, hit_rate: ((map(.cache_read) | add) / ((map(.cache_read) | add) + (map(.input_uncached) | add)))})' # 3. Eyeball routing yakos cost --since 2026-04-01 --by agent --by model
Skim for the obvious wins — usually one feature accounts for 60%+ of spend, and within that feature, one agent or one prompt is the hot spot.
usage fields ifpresent, otherwise from chars/4 estimates. Mixing the two in one report is misleading. The skill marks each row source = actual or estimate and reports them separately when the mix is large.
cache_read_input_tokens since v0.5; codex/gemini have different shapes (or none). The skill normalizes via the runtime adapter; agents on a runtime without cache reporting are listed as "cache-unknown" not "cache-cold."
feature_tag is only as good asthe leads who set it. If 40% of dispatches are tagged untagged, the top-features view is useless. Recommend the project enforce tagging via a pre-dispatch hook (separate skill).
doesn't mean the API supports it for that runtime + workload. Some tools / multi-turn flows aren't batch-able. The skill produces a candidate list; the human confirms eligibility per workload.
prompt, small output) misses cases where opus is genuinely needed for reasoning quality. Treat the flag as "investigate," not "downgrade now." Pair with prompt-eval to confirm haiku doesn't regress before downgrading.
Don't post the report to a shared webhook without scrubbing — same caveat as cost-summary.
finops, ship logs to a central host before running this skill.
lib/agents/ai-finops.md — owns this skill.lib/skills/cost-summary/SKILL.md — daily/weekly summary; pairwith finops-review for the deeper cut.
cli/lib/cost.sh — underlying cost command.docs/runtime-matrix.md — which runtimes report cache and realtoken counts.
docs/batch-api.md — batch-eligibility heuristics in detail.Other measured skills in the registry, with their headline benchmark lift.