Agent skill · Audited from source
Cost Tracking
skill · affaan-m/ECCMIT licenceAudited 19 Sep 2026 · source e9ca581a4f44
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit e9ca581a4f44 and found no filesystem, network or shell access and no hard-coded secrets. What it does: ローカルのコスト追跡データベースからClaude Codeのトークン使用量、支出、予算を追跡・レポートします。コスト、支出、使用量、トークン、予算、またはプロジェクト、ツール、セッション、日付によるコスト内訳について質問する場合に使用します。
Cite
Cite this page
ModelsAtlas. “Cost Tracking (affaan-m/ECC)”. Retrieved 19 Sep 2026. https://modelsatlas.com/skills/affaan-m/cost-tracking
Trust audit
Audit 0.4.1 · source read 19 Sep 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha e9ca581a4f44 · 19 Sep 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisheraffaan-m GitHub userOwner of the repository this skill is read from
- Source folderaffaan-m/ECC/docs/ja-JP/skills/cost-trackingThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdicte9ca581a4f44A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: ローカルのコスト追跡データベースからClaude Codeのトークン使用量、支出、予算を追跡・レポートします。コスト、支出、使用量、トークン、予算、またはプロジェクト、ツール、セッション、日付によるコスト内訳について質問する場合に使用します。
---
name: cost-tracking
description: ローカルのコスト追跡データベースからClaude Codeのトークン使用量、支出、予算を追跡・レポートします。コスト、支出、使用量、トークン、予算、またはプロジェクト、ツール、セッション、日付によるコスト内訳について質問する場合に使用します。
origin: community
---
# コスト追跡
このスキルを使用して、ローカルSQLiteデータベースからClaude Codeのコストと使用履歴を分析します。これは、`~/.claude-cost-tracker/usage.db`に使用行を書き込むコスト追跡フックまたはプラグインをすでに持っているユーザーを対象としています。
出典: `MayurBhavsar`によるコミュニティのPR #1304から救済されました。
## 使用時期
- ユーザーが「いくら使いましたか?」「このセッションのコストは?」「トークン使用量は?」と尋ねる場合
- ユーザーが予算、支出制限、超過、またはコスト管理について言及する場合
- ユーザーがプロジェクト、ツール、セッション、モデル、または日付ごとのコスト内訳を求める場合
- ユーザーが今日と昨日を比較したい、または最近のトレンドを確認したい場合
- ユーザーが最近の使用記録のCSVエクスポートを求める場合
## 動作方法
まず前提条件を確認します:
```bash
command -v sqlite3 >/dev/null && echo "sqlite3 available" || echo "sqlite3 missing"
test -f ~/.claude-cost-tracker/usage.db && echo "Database found" || echo "Database not found"
```
データベースが見つからない場合、使用データを作成しません。ユーザーにコスト追跡が設定されていないことを伝え、信頼できるローカルコスト追跡フック/プラグインのインストールまたは有効化を提案します。
期待される`usage`テーブルには通常、ツール呼び出しまたはモデルインタラクションごとに1行が含まれます。列名はトラッカーによって異なりますが、以下の例では次のように仮定します:
| 列 | 意味 |
| --- | --- |
| `timestamp` | 使用イベントのISOタイムスタンプ |
| `project` | プロジェクトまたはリポジトリ名 |
| `tool_name` | ツールまたはイベント名 |
| `input_tokens` | 記録された場合の入力トークン数 |
| `output_tokens` | 記録された場合の出力トークン数 |
| `cost_usd` | USDで事前計算されたコスト |
| `session_id` | Claude Codeセッション識別子 |
| `model` | イベントに使用されたモデル |
`cost_usd`を使用して手動で価格計算するよりも優先します。モデルの価格とキャッシュ価格は時間とともに変化し、トラッカーが各行の価格設定の信頼できる情報源であるべきです。
## 例
### クイックサマリー
```bash
sqlite3 ~/.claude-cost-tracker/usage.db "
SELECT
'Today: $' || ROUND(COALESCE(SUM(CASE WHEN date(timestamp) = date('now') THEN cost_usd END), 0), 4) ||
' | Total: $' || ROUND(COALESCE(SUM(cost_usd), 0), 4) ||
' | Calls: ' || COUNT(*) ||
' | Sessions: ' || COUNT(DISTINCT session_id)
FROM usage;
"
```
### プロジェクト別コスト
```bash
sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
GROUP BY project
ORDER BY cost DESC;
"
```
### ツール別コスト
```bash
sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
SELECT tool_name, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
GROUP BY tool_name
ORDER BY cost DESC;
"
```
### 過去7日間
```bash
sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
SELECT date(timestamp) AS date, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
GROUP BY date(timestamp)
ORDER BY date DESC
LIMIT 7;
"
```
### セッション詳細
```bash
sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
SELECT session_id,
MIN(timestamp) AS started,
MAX(timestamp) AS ended,
ROUND(SUM(cost_usd), 4) AS cost,
COUNT(*) AS calls
FROM usage
GROUP BY session_id
ORDER BY started DESC
LIMIT 10;
"
```
## レポートガイダンス
コストデータを表示する場合、以下を含めます:
1. 今日の支出と昨日の比較。
2. 追跡されたデータベース全体の合計支出。
3. コスト順にランク付けされた上位プロジェクト。
4. コスト順にランク付けされた上位ツール。
5. 十分なデータがある場合のセッション数とセッションごとの平均コスト。
少額の場合、通貨を小数点4桁でフォーマットします。大きな金額には2桁で十分です。
## アンチパターン
- `cost_usd`が存在する場合に生のトークン数からコストを推定しないこと。
- 確認せずにデータベースが存在すると仮定しないこと。
- 大規模なデータベースで無制限の`SELECT *`エクスポートを実行しないこと。
- ユーザー向けの回答で現在のモデル価格をハードコードしないこと。
- 任意のコードを実行する未審査のフックやプラグインのインストールを推奨しないこと。
## 関連
- `/cost-report` - 同じデータベースを使用するコマンド形式のレポート。
- `cost-aware-llm-pipeline` - モデルルーティングと予算設計のパターン。
- `token-budget-advisor` - コンテキストとトークン予算の計画。
- `strategic-compact` - 繰り返しのトークン支出を削減するためのコンテキスト圧縮。Excerpt, first 3,314 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit e9ca581
git clone https://github.com/affaan-m/ECC git -C ECC checkout e9ca581a4f44
The author documents no install command, so this uses the repository directly. Our verdict covers commit e9ca581a4f44 only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
e9ca581a4f44
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/affaan-m/cost-tracking/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
affaan-m/everything-claude-code
Eval-driven development (EDD) framework for AI coding sessions — define capability and regression evals before coding, grade with code-based, model-based, rule, or human graders, and track pass@k and pass^k reliability.…
affaan-m/everything-claude-code
Map a described workflow to the right ECC command group with run-order and stop condition, or browse all command-group recipe families read live from the commands directory. Advisory only — never executes. Use when…
affaan-m/everything-claude-code
Design task-local harnesses, eval gates, and reusable skill extraction for Claude dynamic workflow mode and other adaptive agent harnesses. Use when building a task-local harness, adding eval gates, or extracting a…
affaan-m/everything-claude-code
Run the full Django verification loop — environment check, mypy/ruff/black linting, migration safety, pytest with coverage targets, pip-audit and bandit security scans, settings and logging review, and diff review —…
affaan-m/everything-claude-code
Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps. Use when building or reviewing Django apps, DRF APIs, ORM queries, or caching.
affaan-m/everything-claude-code
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations. Use when reviewing Django authentication, authorization,…
Add this badge to your README
[](https://modelsatlas.com/skills/affaan-m/cost-tracking/)
<a href="https://modelsatlas.com/skills/affaan-m/cost-tracking/"><img src="https://modelsatlas.com/skills/affaan-m/cost-tracking/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Cost Tracking
What does the Cost Tracking skill do?
Is Cost Tracking safe to install?
What can Cost Tracking access on my machine?
Which assistants does Cost Tracking work with?
How current is this page?
Sources
- github.com/affaan-m/ECC/tree/main/docs/ja-JP/skills/cost-trackin — the audited source at commit e9ca581a4f44 and every finding aboveObserved · 19 Sep 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Cost Tracking skill do?
- Is Cost Tracking safe to install?
- What can Cost Tracking access on my machine?