
Cost Trend
FreeMonitor performance drift in AI model benchmarks.
Free · Opens the source repo
What Cost Trend does
Cost Trend is a specialized skill designed to track and analyze the performance of AI models over time by examining benchmark results. It reads JSON files generated from previous runs, specifically located in docs/benchmarks/runs/*.json, and provides insights into key metrics such as win rate, latency, escalation rate, and cost against a baseline. This analysis helps identify any performance degradation that may not be immediately apparent through standard pass/fail metrics. For instance, a model might still pass a smoke test with a win rate above 80%, but subtle declines in performance can be detected through the trend analysis.
The skill generates a comprehensive drift summary that highlights the differences between the first and last benchmark runs, allowing developers to spot regressions in performance. It also provides a detailed per-run series, which includes historical data on win rates and latencies, making it easier to understand how changes in the model or corpus affect overall performance. Regression flags are automatically emitted when significant drops in win rate or increases in latency are detected, ensuring that developers are alerted to potential issues.
Cost Trend is particularly useful before releasing new versions of models, after corpus expansions, or following upgrades to related components like agent-booster. By using this skill, developers can ensure that their models maintain the expected performance levels and quickly identify any regressions that may arise due to changes in the underlying data or model architecture.
When to use it
Use this skill before a model release, after expanding the corpus, or after upgrading related components to ensure performance consistency.
When not to use it
This skill may not be necessary for simple models or when performance tracking is not a priority.
What you can build with it
Pre-release Performance Check
Before releasing a new version of your AI model, use Cost Trend to ensure that performance metrics have not degraded.
Corpus Expansion Verification
After expanding the training corpus, verify that older runs still maintain the expected win rates with the new data.
Post-upgrade Analysis
Following an upgrade to components like `agent-booster`, analyze the impact on latency and overall strategy.
How to install Cost Trend
View source1. Install with the skills CLI
npx skills add ruvnet/ruflo/cost-trend --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by ruvnetCost Trend
The smoke gate is binary (winRate ≥ 0.80 → pass/fail). The corpus benchmarks captured over time form a curve — and curves catch regressions the gate misses (win rate slowly creeping from 100% to 85% is "still passing" by smoke but a real degradation).
This skill reads every persisted run in docs/benchmarks/runs/*.json and reports first→last deltas plus a per-run series, flagging regressions in win rate or latency.
When to use
- Before a release — check that the speedup hasn't drifted.
- After expanding the corpus — verify older runs still hit the same win rate on the new corpus they reflected.
- After upgrading
agent-booster— surface latency / strategy changes.
Steps
-
Run the trend script from the project root:
node plugins/ruflo-cost-tracker/scripts/trend.mjsOptional env:
TREND_FORMAT=json— emit JSON instead of markdownTREND_LIMIT=10— consider only the most recent N runs
-
Inspect the drift summary — first vs last on win rate, avg latency, p99, escalation rate, speedup vs Gemini.
-
Inspect the per-run series — one row per run, including Sonnet 4.6 + Opus 4.7 baseline latencies if those were enabled (
BENCH_ANTHROPIC=1at run time). -
Regression flags — the script emits
> ⚠ Regressioncallouts when:- Win rate dropped between first and last run
- Avg latency rose ≥ 1.5× from first run
Cross-references
cost-benchmark— the producer of the run JSONs this skill consumesbench/booster-corpus.json— the corpus version is recorded in each run, so trends across corpus versions remain interpretabledocs/benchmarks/runs/latest.json— the most-recent run; smoke step 23 gates onwinRate ≥ 0.80from this file
Frequently asked questions about Cost Trend
Similar skills
OpenClaw Test Heap Leaks
Diagnose memory issues in OpenClaw tests with precision.
OpenClaw Test Performance
Benchmark and optimize OpenClaw test runtime effectively.
Content Hash File Cache Pattern
Efficiently cache file processing results using content hashes.
Swift Concurrency 6.2
Simplify concurrent programming in Swift 6.2.
TensorRT-LLM
Optimize LLM inference for NVIDIA GPUs.
HuggingFace Accelerate
Simplify distributed PyTorch training with minimal code changes.
