cost-tracking
ローカルのコスト追跡データベースからClaude Codeのトークン使用量、支出、予算を追跡・レポートします。コスト、支出、使用量、トークン、予算、またはプロジェクト、ツール、セッション、日付によるコスト内訳について質問する場合に使用します。
Original · translation did not pass checksTarget: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Japanese text
Topics in the source
- コスト追跡
- 使用時期
- 動作方法
- 例
- クイックサマリー
- プロジェクト別コスト
- ツール別コスト
- 過去7日間
このスキルを使用して、ローカルSQLiteデータベースからClaude Codeのコストと使用履歴を分析します。これは、/.claude-cost-tracker/usage.dbに使用行を書き込むコスト追跡フックまたはプラグインをすでに持っているユーザーを対象としています。 出典: MayurBhavsarによるコミュニティのPR #1304から救済されました。 ユーザーが「いくら使いましたか?」「このセッションのコストは?」「トークン使用量は?」と尋ねる場合 ユーザーが予算、支出制限、超過、またはコスト管理について言及する場合 ユーザーがプロジェクト、ツール、セッション、モデル、または日付ごとのコスト内訳を求める場合 ユーザーが今日と昨日を比較したい、または最近のトレンドを確認したい場合 ユーザーが最近の使用記録のCSVエクスポートを求める場合 まず前提条件を確認します: データベースが見つからない場合、使用データを作成しません。ユーザーにコスト追跡が設定されていないことを伝え、信頼できるローカルコスト追跡フック/プラグインのインストールまたは有効化を提案します。 期待されるusageテーブルには通常、ツール呼び出しまたはモデルインタラクションごとに1行が含まれます。列名はトラッカーによって異なりますが、以下の例では次のように仮定します: | 列 | 意味 | | --- | --- | | timestamp | 使用イベントのISOタイムスタンプ | | project | プロジェクトまたはリポジトリ名 | | toolname | ツールまたはイベント名 | | inputtokens | 記録された場合の入力トークン数 | | outputtokens | 記録された場合の出力トークン数 | | costusd | USDで事前計算されたコスト | | sessionid | Claude Codeセッション識別子 | | model | イベントに使用されたモデル | costusdを使用して手動で価格計算するよりも優先します。モデルの価格とキャッシュ価格は時間とともに変化し、トラッカーが各行の価格設定の信頼できる情報源であるべきです。 コストデータを表示する場合、以下を含めます: 1. 今日の支出と昨日の比較。 2. 追跡されたデータベース全体の合計支出。 3. コスト順にランク付けされた上位プロジェクト。 4. コスト順にランク付けされた上位ツール。 5. 十分なデータがある場合のセッション数とセッションごとの平均コスト。 少額の場合、通貨を小数点4桁でフォーマットします。大きな金額には2桁で十分です。 costusdが存在する場合に生のトークン数からコストを推定しないこと。 確認せずにデータベースが存在すると仮定しないこと。 大規模なデ
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- affaan-m/ECC
- Source file
- docs/ja-JP/skills/cost-tracking/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.072Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.