Ruflo Cost Tracker
Ruflo Cost Tracker from gabrielmoreira/agent-skills-mirror.
Skills in this plugin
20- ▌ Cost Burn · gabrielmoreiraBurn-rate trend over time with optional drift-alert exit code. Bins session spend into buckets, surfaces window-over-window delta, and can exit 1 when latest bucket exceeds prior mean by a configurable %. Distinct from `cost-trend` (benchmark drift); this tracks PRODUCTION spend trajectory.
- ▌ Cost Diff · gabrielmoreiraSnapshot delta between two cost-summary JSON outputs. PR-level cost regression detection — answers "what changed between these two specific snapshots?". Pairs with cost-summary's stable JSON contract.
- ▌ Cost Track · gabrielmoreiraAuto-capture per-session token usage from the Claude Code session jsonl and persist to the cost-tracking namespace
- ▌ Cost Trend · gabrielmoreiraRead every docs/benchmarks/runs/*.json and surface drift in win rate, latency, escalation rate, and LLM-baseline cost over time
- ▌ Cost Export · gabrielmoreiraExport cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)
- ▌ Cost Health · gabrielmoreiraComposite CI gate — runs cost-budget-check + cost-burn + cost-anomaly + cost-projection in parallel and surfaces a single combined health status with max exit code. The operationally-useful entry point — one shell-out covers all four alert ladders.
- ▌ Cost Report · gabrielmoreiraGenerate a cost report showing token usage and USD costs by agent and model
- ▌ Cost Anomaly · gabrielmoreiraMAD-based outlier detection on session spend. Robust to the very outliers it hunts (unlike mean+sigma). Surfaces specific anomalous sessions with modified-z scores; optional --alert-on-outliers exit code for CI gates. Distinct from cost-burn (aggregate trend) — this answers "which INDIVIDUAL session is the outlier?".
- ▌ Cost Session · gabrielmoreiraPer-message cost breakdown within a single session. The drill-down companion to cost-anomaly — when an outlier session is flagged, this surfaces the specific expensive messages so operators can see whether the cost came from output tokens, cache writes, or model escalations.
- ▌ Cost Summary · gabrielmoreiraSingle-shot programmatic dump of all cost data — total spend, per-tier, top session, budget status, federation aggregate. JSON or markdown.
- ▌ Cost Optimize · gabrielmoreiraAnalyze token usage patterns and recommend cost optimizations with estimated savings
- ▌ Cost Benchmark · gabrielmoreiraRun the corpus benchmark — booster locally, optional Gemini/Sonnet/Opus baselines — and persist a verifiable measured-vs-claimed table
- ▌ Cost Federation · gabrielmoreiraConsumer-side wiring for ADR-097 Phase 3 federation_spend events — per-peer rolling windows + suspension-threshold check
- ▌ Cost Projection · gabrielmoreiraForward-looking spend extrapolation. Computes a USD-per-day rate from the recent measurement window, projects to 7d/30d/90d/365d horizons, and surfaces "days until budget exhausted" when a budget is configured. Predictive counterpart to `cost-budget-check` (reactive).
- ▌ Cost Booster Edit · gabrielmoreiraApply a simple code transform via agent-booster's WASM engine — sub-millisecond, deterministic, $0 (no LLM call). Companion to cost-booster-route.
- ▌ Cost Budget Check · gabrielmoreiraRead accumulated cost-tracking spend + budget config, compute utilization, emit 50/75/90/100% alert ladder
- ▌ Cost Conversation · gabrielmoreiraPer-conversation cost view — list every session in cost-tracking with started-at, message count, top model, and total cost
- ▌ Cost Booster Route · gabrielmoreiraRoute tasks through hooks_route, partition by Agent Booster availability, and report Tier 1 bypass utilization with $0 cost
- ▌ Cost Counterfactual · gabrielmoreiraMulti-baseline counterfactual cost analysis. Compares actual session spend to hypothetical always-haiku / always-sonnet / always-opus routing baselines. Answers "is the routing earning its keep?" Negative savings flag over-escalation; positive savings quantify the router's win.
- ▌ Cost Compact Context · gabrielmoreiraWrap getTokenOptimizer().getCompactContext() to retrieve compacted ReasoningBank context for cost-analysis queries; report bridge-reported tokensSaved