---
name: minirouter-optimize-usage
description: Finds cheaper, higher-scoring model configurations from scoped MiniRouter usage with exact reasoning settings. Use when optimizing an existing MiniRouter account over the last 7 or 30 days.
compatibility: Node.js 22 or newer with filesystem access. Online commands require HTTPS access to minirouter.sh and api.minirouter.sh.
---

# Optimize MiniRouter usage

**IS:** an authenticated usage read and local recommendation report. **IS NOT:** automatic routing changes or a read-only credential service.

Resolve paths against this installed SKILL.md directory. Execute the bundled CLI.

1. Use an existing MINIROUTER_KEY environment variable. Do not print it or put it in command arguments. If missing, have the user set their key locally; do not create or retrieve credentials from browser storage.
2. Run `node <skill-directory>/scripts/model-advisor.mjs optimize --days 30 --out <new-output-directory>`; choose 7 when the user requests a shorter window.
3. Read report.json and report.md. State effective scope, compared/total configurations and excluded requests. Recommend only exact model/effort candidates the report identifies; include same-token estimates and the benchmark date.

Read [scope and limits](references/input.md) when access fails or coverage is low. Continue through the completed local report. Existing authorization to analyze usage permits these reads; it does not authorize inference, key changes or applying recommendations.

## Gotchas

- Personal keys read personal-account history; team keys read their member's history. This is not usage only for the calling key and is not team-wide owner access.
- The supplied key remains inference-capable even though this command only reads.
- Only five eligible configurations are compared. Restricted, guarded, aliased, preset or unsupported requests may be excluded.
- An authorization or source error is not zero usage. An exact effort and a strictly higher score plus lower estimated cost are required for an upgrade.

Use minirouter-evaluate-switch before claiming a proposed replacement preserves task quality.

## Install this release

Download the [complete skill archive](https://minirouter.sh/agent-skills/releases/83b1177c2858898aef4af631fd5d5060d3afcac0c17b4719d19370b084d57721/minirouter-optimize-usage.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.
