Skip to content
Development
Skill

/cost-openrouter

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.

BOOST
From plugin
ruvnet-claude-flow
74k197 skills164 agents196 commands3 MCP
Install
$ npx -y skills add ruvnet/ruflo --skill cost-openrouter --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cost-openrouter

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

cost-openrouter.SKILL.md
name: cost-openrouter
description: 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.
argument-hint: "key | generation <id> | credits"
allowed-tools: Bash

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`). 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.
Ships withruvnet-claude-flow

An agent meta-harness for Claude Code and Codex. 📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification.

Get the whole plugin

Other skills on ruvnet-claude-flow.