本文へスキップ
Skillpedia
その他81k · #1605

cost-openrouter

できること

このスキルは、OpenRouter のアカウントで、支出、キーの上限、1件のリクエストの請求額を確認します。OpenRouter を使っていて、請求された金額を知りたい人向けです。

使う場面

  • ✓今日、今週、今月にOpenRouter から請求された額を知りたいとき。
  • ✓キーが支出の上限に近いかもしれないとき。
  • ✓特定の1件のリクエストに対して請求された費用を知りたいとき。

スキルのリンク

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-openrouter/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-openrouter/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“OpenRouter のキーは上限にどれくらい近いですか。今月はいくら使いましたか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、あなたのキーを使って OpenRouter を呼び出しますが、あなたが同意した後にのみ行います。OpenRouter が返した数値をそのまま表示し、それを公式の金額として扱います。キーを表示したり保存したりすることはありません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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.
よくある質問

許可なしにネットワーク呼び出しをしますか?

いいえ。同意のフラグがない場合は、行う予定の呼び出しを表示するだけで、何も送信しません。

キーはどこから取得されますか?

あなたのコンピューターの環境変数からです。スキルがチャットにキーを貼り付けるよう求めることはありません。

クレジットの確認が失敗するのはなぜですか?

クレジットの確認には管理キーが必要です。通常のキーはその確認で拒否されます。

詳細

作者による元の説明

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

人気

GitHubのスター
81k
ランキング
#1605
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル