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

cost-ledger

できること

このスキルは、AIコーディングツールがコンピューターに既に保存している利用ログを読み、プロバイダーごとの支出、トークン数、キャッシュの利用状況を示します。複数のAIツールを使っていて、1つの画面で見たい人向けです。

使う場面

  • ✓今週、AIツールにいくら支出したかを知りたいとき。
  • ✓CodexとClaude Codeのコストを比べたいとき。
  • ✓まだ価格が設定されていないモデルを確認したいとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“今週、すべてのプロバイダーを合わせて、AIコーディングツールにいくら支出しましたか?”

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

仕組み

スキルはローカルのログを読み、日付つきの価格表でその利用量の価格を計算して、合計を表示します。価格が不明なモデルは無料扱いにせず、別の項目として一覧にします。

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

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Cost Ledger

Reads the logs the agents already wrote (~/.claude/projects, $CODEX_HOME or ~/.codex) and prices them from data/prices.json (dated, editable).

Run

node ${CLAUDE_PLUGIN_ROOT}/scripts/ledger.mjs --since 7d
node ${CLAUDE_PLUGIN_ROOT}/scripts/ledger.mjs --provider codex --format json

One mission, or one project

--from and --to (ISO times) cut the window and --project <absolute path> keeps one project's rows; the console's mission page uses them for a mission's spend. An explicit --from/--to replaces the default 7-day look-back.

Read the result correctly

  • USD and Codex credits are never added. GPT-6 Codex models are priced in credits; their cached-input rate is unpublished, so the figure is an upper bound.
  • Estimates at list price, not bills. Subscriptions bill by window, not by token. /usage is authoritative for the live Claude session; the Console or provider dashboard is authoritative for invoices.
  • Unpriced models are listed, never counted as $0. Say so, and offer to add them to data/prices.json.
  • Counting rules (why numbers differ from naive sums): Claude messages are de-duplicated by message.id + requestId; Codex uses deltas of the running total_token_usage (never also last_token_usage), cached input is a subset of input, and forked rollouts are de-duplicated.
  • Claude transcript output tokens can under-count streamed output.

If the log directory is missing, say so; do not invent numbers.

よくある質問

データはどこかに送られますか?

スキルはローカルのログだけを使い、何も送信しません。費用は、請求額ではなく定価に基づく推定値です。

なぜドルとクレジットの合計は足し合わせられないのですか?

Codexのクレジットと米ドルは単位が違うため、決して足し合わせないからです。

1つのプロジェクトだけを見られますか?

はい。プロジェクトの設定で、1つのプロジェクトフォルダーに数字を限定できます。期間も設定できます。

詳細

作者による元の説明

One cost view across Claude Code, Codex and Grok on this machine — spend, tokens, cache hit ratio per provider and model, with unpriced models flagged. Use when asked "what did I spend", "how much did Codex cost", or to compare providers. Local logs only, nothing is sent.

repo: ruvnet/ruflo

人気

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

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

0

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

コメント

  • …

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

似ているスキル