cost-openrouter
What it does
This skill checks your OpenRouter account for spending, key limits and the bill for a single request. It is for people who use OpenRouter and want to see what they were charged.
When to use it
- ✓When you want to know what OpenRouter charged you today, this week or this month.
- ✓When a key may be close to its spending limit.
- ✓When you want the billed cost of one specific request.
Skill link
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-openrouter/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“How close is my OpenRouter key to its limit, and what did I spend this month?”
5 new skills a week. 1 minute to read.
How it works
The skill calls OpenRouter with your own key, but only after you say yes. It shows the figures OpenRouter returns and treats them as the official amounts. It never prints or stores the key.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Cost OpenRouter
Network skill. Ask the user before running it, and run it only with their yes.
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs key --yes
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs generation gen-abc123 --yes
node ${CLAUDE_PLUGIN_ROOT}/scripts/openrouter.mjs credits --yes
Rules
- Without
--yesthe script prints the call it would make and sends nothing. - The key comes from
OPENROUTER_API_KEY(credits:OPENROUTER_MANAGEMENT_KEY). A key the user stored as the plugin optionopenrouterApiKeyarrives asOPENROUTER_API_KEYtoo: the plugin's SessionStart hook puts it there for this session's commands when the variable is not already set (ADR-506). Never ask the user to paste a key, never print, log or write one. - OpenRouter's
usage.cost/total_costis authoritative; do not recompute it from list prices. creditsneeds a management key (a normal key returns 403). A fresh generation can 404 briefly: retry.- BYOK rows carry the 5% OpenRouter fee in
usage, the provider's charge inupstream_inference_cost: show both, labelled. - Fallback and
openrouter/autocan change the billed model: reportmodelandprovider_nameas returned.
FAQ
Will it make a network call without asking?
No. Without the yes flag it only shows the call it would make and sends nothing.
Where does the key come from?
From an environment variable on your computer. The skill never asks you to paste the key into the chat.
Why does the credits check fail?
The credits check needs a management key. A normal key is refused for that check.
Details
Original description by the author
OpenRouter real spend — key limit and usage today/week/month, one request's billed cost by generation id, account credits. Use when asked what OpenRouter charged or whether a key is near its limit. Network and API key: asks first.
repo: ruvnet/ruflo
Popularity
- GitHub stars
- 81k
- Ranking position
- #1605
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
blucli
394kHelps your agent find, play, pause, group, and adjust the volume of Bluesound and NAD speakers through the blu command.
camsnap
394kHelps your agent grab snapshots, short clips, or motion events from network cameras and local webcams that you have set up.
eightctl
394kHelps your agent check and control an Eight Sleep pod, including its temperature, alarms, and sleep schedules.