---
name: minirouter-audit-spend
description: Audits a local MiniRouter usage CSV or canonical JSON file and estimates model alternatives without uploading it. Use when reducing LLM spend, reviewing token costs or comparing a usage export without signup.
compatibility: Node.js 22 or newer with filesystem access. Online commands require HTTPS access to minirouter.sh and api.minirouter.sh.
---

# Audit model spend

**IS:** local usage accounting and same-token estimates. **IS NOT:** log uploading, arbitrary provider exports or proof of equivalent task quality.

Resolve paths against this installed SKILL.md directory and execute `scripts/model-advisor.mjs` rather than implementing another calculator.

1. Use the file the user selected. Read [the input contract](references/input.md) to identify MiniRouter aggregate CSV versus canonical JSON; examples are in `examples/usage.csv` and `examples/usage.json`. Convert other formats only when their field semantics are known.
2. Run `node <skill-directory>/scripts/model-advisor.mjs audit --input <file> --format minirouter-csv --out <new-output-directory>`; use `--format json` for canonical JSON. No key is needed. Add `--catalog <snapshot.json>` to run entirely offline.
3. Read both reports. Reconcile recorded spend, accepted/excluded records and comparison coverage. Explain unknown effort, unsupported charges and candidate estimates. Present savings only for comparable covered usage and retain the report/evidence paths for replay.

Reading the selected local file, fetching public evidence and writing the requested new output directory are within this task. Finish the report without asking to upload data or sign up. The runner never sends the file, rows or prompts to MiniRouter.

## Gotchas

- CSV output tokens already include reasoning; cached tokens include cache reads plus writes. Do not count them twice.
- Missing effort never becomes default. Unknown prices and charges never become zero.
- Aggregate usage cannot prove request context fit, latency, per-request floors or quality. Cache-write duration may be unknown.
- Recorded historical charges differ from repricing the same tokens today. Keep those baselines separate.

Use minirouter-optimize-usage for existing MiniRouter account history with exact settings.

## Install this release

Download the [complete skill archive](https://minirouter.sh/agent-skills/releases/83b1177c2858898aef4af631fd5d5060d3afcac0c17b4719d19370b084d57721/minirouter-audit-spend.tar.gz) and [release manifest](https://minirouter.sh/agent-skills/releases/83b1177c2858898aef4af631fd5d5060d3afcac0c17b4719d19370b084d57721/manifest.json). Verify the archive SHA-256 against the manifest before extracting into a new local directory. Keep the full extracted skill folder; SKILL.md alone does not include the executable. Run `node <skill-directory>/scripts/model-advisor.mjs --help` to verify Node 22+ installation.
