What problem does it solve?
Teams running LLM workloads need to know whether a specific pull request increased API spend, but raw cost summaries alone cannot answer "what changed between these two snapshots?". This Skill computes the delta between two known-good cost-summary JSON outputs and fails CI when configurable thresholds are breached.
Core Features & Use Cases
- Snapshot Delta Analysis: Compares baseline and current cost-summary JSON files per tier (haiku/sonnet/opus) and per model, tagging entries as added, removed, or changed, sorted by absolute delta.
- PR-Gate Alerting: Exits non-zero when total spend grows beyond --alert-on-pct or --alert-on-usd thresholds, or when a token class (input, output, cache_write, cache_read) grows beyond --alert-on-class-pct limits.
- Use Case: In CI, capture a cost summary on main as baseline.json, capture one on the PR branch as current.json, then run the diff with percent, dollar, and cache_write thresholds so any one signal failing blocks the merge.
Quick Start
Compare baseline.json and current.json cost snapshots and fail the PR if total spend grew more than 10 percent or 5 dollars.