Route ledger
Skill runsagents/route-ledger
Uses cost-aware LLM routing based on total cost, including corrections and review.
npx -y skills add runsagents/route-ledgerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 24 days oldThe repository was created 24 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Log model-run economics and produce honest, quality-gated routing recommendations. Use when asked to "route models", compare model cost and quality, calculate "model P&L", choose a model tier, audit inference economics, or create a weekly routing report.
SKILL.md
2.9 KB, 570 tokens by cl100k_base, as published. Nobody here has run it
route-ledger
Use this skill to turn local run outcomes into a model-routing P&L report. Never infer a production recommendation from the bundled fixture: it is synthetic demonstration data.
Log the agent's own run
After the outcome is known, append exactly one JSON object to a local JSONL ledger. Prefer $HOME/.local/share/route-ledger/runs.jsonl or another user-approved private path. Do not log prompts, outputs, customer data, credentials, or secrets.
Record:
- a unique opaque
run_idand ISO 8601timestamp; data_source: "production"for a real operational run;- a stable
task_class, exact model identifier, andmodel_tier; - input/output tokens and the unit prices in effect for that run;
- end-to-end wall-clock milliseconds;
- ordinary human-review minutes and the reviewer's loaded hourly rate;
- correction count/minutes and rerun count/all-in cost;
- final
acceptedorrolled_backstatus and the worst observed defect severity.
Use schemas/run-event.schema.json as the contract. Create the parent directory if needed, serialize the object as one compact JSON line, and append it without replacing existing lines. Log failures and rollbacks too; success-only data is not a ledger.
Before appending, ask the user if the ledger path or production-data policy is unknown. Never silently write operational data into the repository.
Validate and report weekly
From the route-ledger directory:
node src/ingest.mjs "$HOME/.local/share/route-ledger/runs.jsonl"
node src/report.mjs "$HOME/.local/share/route-ledger/runs.jsonl" \
--min-sample 20 \
--quality-threshold 0.95 \
--out "$HOME/.local/share/route-ledger/weekly-report.md"
Use thresholds supplied by the user or their operating policy. If none exist, state that the repository defaults are 5 runs and 80% acceptance, that these are demonstration-friendly rather than production-safe defaults, and ask for approval before presenting them as a production policy.
Interpret the result
- Recommend only the cheapest risk-adjusted cost per accepted run among models marked
eligible. - Repeat the report's confidence and sample size; never upgrade the confidence in prose.
- When the report says
NO RECOMMENDATION, say exactly that and identify whether the cause is insufficient sample or no qualifying model. - Treat severity loss values as assumptions. For consequential decisions, rerun low/base/high loss scenarios and report whether the recommendation changes.
- Call out selection bias, judge bias, and rare-incident uncertainty before a production routing change.
Nothing in the reporting runtime sends data off-device.