Skip to content
Skillpedia
Misc81k · #1605

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.md

Copy 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

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-openrouter/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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 --yes the 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 option openrouterApiKey arrives as OPENROUTER_API_KEY too: 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_cost is authoritative; do not recompute it from list prices.
  • credits needs 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 in upstream_inference_cost: show both, labelled.
  • Fallback and openrouter/auto can change the billed model: report model and provider_name as 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills