Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tdimino/claude-code-minoan --skill openrouter-usagegit clone --depth 1 https://github.com/tdimino/claude-code-minoanWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tdimino/claude-code-minoan/openrouter-usage)<a href="https://agentmods.dev/skills/tdimino/claude-code-minoan/openrouter-usage"><img src="https://agentmods.dev/badge/skills/tdimino/claude-code-minoan/openrouter-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tdimino/claude-code-minoan/openrouter-usage"><img src="https://agentmods.dev/badge/skills/tdimino/claude-code-minoan/openrouter-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 20 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.00532 |
| Opus 5 | $0.00024 | $0.00266 |
| Sonnet 5 | $0.00010 | $0.00106 |
| Haiku 4.5 | $0.00005 | $0.00053 |
Grade A, and why
openrouter-usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
OpenRouter Usage
Query OpenRouter API costs and generate usage reports via the command line.
When to Use
- Checking OpenRouter spend over the last 30 days
- Breaking down costs by model, provider, or date
- Exporting usage data as CSV or JSON for accounting
- Auditing which models and API keys consume the most credits
Prerequisites
OPENROUTER_API_KEYenvironment variable (or in a project.envfile)- The key must be a Management key — create one at https://openrouter.ai/settings/management-keys
- Regular provisioning keys return 401/403 on analytics endpoints
Usage
# Full 30-day summary with credits balance
python3 ~/.claude/skills/openrouter-usage/scripts/openrouter_usage.py
# Filter to a single date
python3 ~/.claude/skills/openrouter-usage/scripts/openrouter_usage.py --date 2026-02-01
# Export as CSV (for spreadsheets)
python3 ~/.claude/skills/openrouter-usage/scripts/openrouter_usage.py --csv
# Raw JSON output (for piping to jq)
python3 ~/.claude/skills/openrouter-usage/scripts/openrouter_usage.py --json
# Skip credits lookup (activity only)
python3 ~/.claude/skills/openrouter-usage/scripts/openrouter_usage.py --no-credits
Output
The default report includes:
- Credits balance: total purchased, used, remaining
- Spend by model: per-model cost with token counts (prompt, completion, reasoning)
- Spend by provider: aggregated by provider (OpenAI, Anthropic, Google, etc.)
- Spend by date: daily spend with visual bar chart
API Endpoints
Both endpoints are read-only GETs authenticated via Bearer token:
| Endpoint | Purpose |
|---|---|
GET /api/v1/credits |
Total credits purchased and used |
GET /api/v1/activity |
Last 30 days of usage grouped by model/endpoint/provider |
The activity endpoint returns per-row: date, model, provider_name, usage, byok_usage_inference, requests, prompt_tokens, completion_tokens, reasoning_tokens.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 60 lines · 49 tokens per session scan A 132d86c44e10
openrouter-usage is a skill published in the GitHub repository tdimino/claude-code-minoan (41 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 532 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
etsy-pricing-strategy
Etsy pricing — cost calculation, competitor pricing, perceived value, shipping cost integration, sales and coupons.
floe-guard
Know what every AI call really costs — floe-guard meters STT + TTS + LLM + telephony per call (Pipecat, LiveKit — Python & TypeScript), keeps a live ledger of real spend, and hard-stops the next turn before it crosses a USD ceiling. Free Coverage Score + 7-day history on connect. Use when an agent's spend must be seen…
pm-brainstorm
A structured brainstorming session for exploring a specific product problem or opportunity and narrowing the results to ideas worth pursuing.
weekly-planning
A planning workflow that turns a completed weekly review and existing backlog into prioritized outcomes for one ISO calendar week.
gh-issues
Use when creating, searching, updating, or managing GitHub issues via CLI. Triggers: "issue", "create issue", "gh issue", "task tracking", "context", "handoff", "resume task", "session context", "save progress", "active tasks", "in-progress", "my tasks", "open issues". Covers: gh commands, bulk operations, JSON/jq…
tg-bot-ops
A guide for operating and troubleshooting Telegram bots and systems that connect Telegram to an AI agent. It covers how messages arrive, get processed, and produce replies.