Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add JunMystery/Agent-Guidance-Python --skill cost-trackinggit clone --depth 1 https://github.com/JunMystery/Agent-Guidance-PythonWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/junmystery/agent-guidance-python/cost-tracking)<a href="https://agentmods.dev/skills/junmystery/agent-guidance-python/cost-tracking"><img src="https://agentmods.dev/badge/skills/junmystery/agent-guidance-python/cost-tracking/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/junmystery/agent-guidance-python/cost-tracking"><img src="https://agentmods.dev/badge/skills/junmystery/agent-guidance-python/cost-tracking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01139 |
| Opus 5.5 | $0.00022 | $0.00456 |
| Sonnet 5.5 | $0.00011 | $0.00228 |
| Haiku 4.5 | $0.00005 | $0.00114 |
Grade B, and why
cost-tracking scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
- Do not recommend installing unreviewed hooks or plugins that execute arbitrary code. How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost Tracking
Use this skill to analyze Claude Code cost and usage history from a local SQLite
database. It is intended for users who already have a cost-tracking hook or
plugin writing usage rows to ~/.claude-cost-tracker/usage.db.
Source: salvaged from stale community PR #1304 by MayurBhavsar.
When to Use
- The user asks "how much have I spent?", "what did this session cost?", or "what is my token usage?"
- The user mentions budgets, spending limits, overruns, or cost controls.
- The user wants a cost breakdown by project, tool, session, model, or date.
- The user wants to compare today against yesterday or inspect a recent trend.
- The user asks for a CSV export of recent usage records.
How It Works
First verify prerequisites:
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"
If the database is missing, do not fabricate usage data. Tell the user that cost tracking is not configured and suggest installing or enabling a trusted local cost-tracking hook/plugin.
The expected usage table usually contains one row per tool call or model
interaction. Column names vary by tracker, but the examples below assume:
| Column | Meaning |
|---|---|
timestamp |
ISO timestamp for the usage event |
project |
Project or repository name |
tool_name |
Tool or event name |
input_tokens |
Input token count, when recorded |
output_tokens |
Output token count, when recorded |
cost_usd |
Precomputed cost in USD |
session_id |
Claude Code session identifier |
model |
Model used for the event |
Prefer cost_usd over hand-calculating pricing. Model prices and cache pricing
change over time, and the tracker should be the source of truth for how each row
was priced.
Examples
Quick Summary
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;
"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 148 lines · 54 tokens per session scan B c48d78c1af32
cost-tracking is a skill published in the GitHub repository JunMystery/Agent-Guidance-Python (2 stars, last pushed 14d ago), licensed MIT. It adds 54 tokens to every session and 1,139 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
cost-tracking compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cost-trackingJunMystery/Agent-Guidance-Python | Skill | 2 | 14d ago | MIT | B | 54 | Claude Code, Codex |
| okx-defi-portfolionirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 237 | Claude Code |
| token-discovery-guidenirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 54 | Claude Code, Codex |
| airdrop-hunting-guidenirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 54 | Claude Code, Codex |
| risk-managernirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 90 | Claude Code, Codex |
| pump-fun-strategynirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 0 | Claude Code, Codex |
| sperax-usds-guidenirholas/three.ws | Skill | 287 | 2d ago | Apache-2.0 | A | 72 | Claude Code, Codex |