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がスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
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
--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.
よくある質問
許可なしにネットワーク呼び出しをしますか?
いいえ。同意のフラグがない場合は、行う予定の呼び出しを表示するだけで、何も送信しません。
キーはどこから取得されますか?
あなたのコンピューターの環境変数からです。スキルがチャットにキーを貼り付けるよう求めることはありません。
クレジットの確認が失敗するのはなぜですか?
クレジットの確認には管理キーが必要です。通常のキーはその確認で拒否されます。
詳細
作者による元の説明
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
コメント
- …
このリポジトリの他のスキル
agent-adaptive-coordinator
81k作業量の変化に合わせて、エージェントのグループを分割し、再配分する手助けをします。作業に合った配置を選びます。
agent-agent
81k大きな目標を順番に並んだ行動計画にし、状況が変わったときに計画を立て直す方法をエージェントに教えます。
agent-agentic-payments
81kAIの買い物のために、支出の上限、期間、販売店のルール、署名付きの承認を含む支出の委任を管理する手助けをします。
agent-analyze-code-quality
81kコードの品質を確認し、コードの臭い、技術的負債、リファクタリングの案を見つける手助けをします。ファイルは変更しません。