cost-tracker

cost-tracker is a skill for Claude Code, Codex from suryast/free-ai-agent-skills. It costs 43 tokens per session (2,296 once invoked), scanned A, original, MIT.

A session cost and token-usage tracker for large language model APIs. It estimates spending across providers such as OpenAI, Anthropic, and Google, and can compare usage with a set budget.

In plain words
What is it for?
Use it to estimate a task’s cost, check token usage, track cumulative spending, set a session budget, or ask how much an AI session has cost.
Why use it?
It makes model usage easier to monitor before a long task becomes more expensive than expected. It can also show cumulative session spending and budget warnings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to estimate a task’s cost, check token usage, track cumulative spending, set a session budget, or ask how much an AI session has cost.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/suryast/free-ai-agent-skills/cost-tracker
Install

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.

Any agent
npx skills add suryast/free-ai-agent-skills --skill cost-tracker
Clone the repo
git clone --depth 1 https://github.com/suryast/free-ai-agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for cost-tracker

README.md
[![agentmods](https://agentmods.dev/badge/skills/suryast/free-ai-agent-skills/cost-tracker/github.svg)](https://agentmods.dev/skills/suryast/free-ai-agent-skills/cost-tracker)
Your own site
<a href="https://agentmods.dev/skills/suryast/free-ai-agent-skills/cost-tracker"><img src="https://agentmods.dev/badge/skills/suryast/free-ai-agent-skills/cost-tracker/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.

agentmods 80×15 button for cost-tracker

Your own site · 80×15
<a href="https://agentmods.dev/skills/suryast/free-ai-agent-skills/cost-tracker"><img src="https://agentmods.dev/badge/skills/suryast/free-ai-agent-skills/cost-tracker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,296 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02296
Opus 5.5 $0.00017 $0.00918
Sonnet 5.5 $0.00009 $0.00459
Haiku 4.5 $0.00004 $0.00230

Measured 1mo ago against content hash 3f28d8ffb921, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cost-tracker scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cost-tracker/SKILL.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

💰 Cost Tracker

Uses the Agent Skills package format. Execution depends on the host tools and permissions; consult the frontmatter compatibility requirements where provided.

Track what your AI sessions actually cost. Estimate token usage, cumulative spend, and warn you before you hit budget thresholds — across OpenAI, Anthropic, Google, and other major providers.


Triggers

Activate this skill when:

  • User asks "how much has this session cost?"
  • User asks "what's my token usage?"
  • User sets a session budget ("keep this under $2")
  • User wants a cost estimate before a large task
  • Cumulative session spend needs tracking
  • "track my costs", "budget check", "token count", "how much am I spending"

Pricing Reference (update as models change)

Use these rates to estimate costs. All prices are per 1M tokens (input / output).

Anthropic

Model Input Output
claude-opus-4 $15.00 $75.00
claude-sonnet-4 $3.00 $15.00
claude-haiku-4 $0.80 $4.00
claude-opus-3 $15.00 $75.00
claude-sonnet-3.5 $3.00 $15.00
claude-haiku-3.5 $0.80 $4.00

OpenAI

Model Input Output
gpt-4o $2.50 $10.00
gpt-4o-mini $0.15 $0.60
gpt-4-turbo $10.00 $30.00
gpt-4 $30.00 $60.00
gpt-3.5-turbo $0.50 $1.50
o1 $15.00 $60.00
o1-mini $3.00 $12.00
o3-mini $1.10 $4.40

Google

Model Input Output
gemini-2.0-flash $0.075 $0.30
gemini-2.0-pro $1.25 $5.00
gemini-1.5-pro $1.25 $5.00
gemini-1.5-flash $0.075 $0.30

Other

Model Input Output
mistral-large $3.00 $9.00
mistral-small $0.20 $0.60
llama-3.3-70b (Groq) $0.59 $0.79
deepseek-r1 $0.55 $2.19

⚠️ Prices change frequently. Always verify at the provider's pricing page before making financial decisions.


How It Works

Read the full file on GitHub · 239 lines

Changes

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.

  1. 1mo ago Changed · +16 tokens per session 3f28d8ffb921
  2. 3mo ago First seen · 239 lines · 27 tokens per session scan A 2f0ce242328a

Subscribe to this mod's changes

cost-tracker is a skill published in the GitHub repository suryast/free-ai-agent-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 2,296 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cost-tracker compared with skills from other repositories

cost-tracker next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cost-trackersuryast/free-ai-agent-skillsSkill31mo agoMITA43Claude Code, Codex
9router-web-fetchdecolua/9routerSkill33k7d agoMITA67Claude Code, Codex
9router-web-searchdecolua/9routerSkill33k7d agoMITA74Claude Code, Codex
9router-sttdecolua/9routerSkill33k7d agoMITA63Claude Code, Codex
9routerdecolua/9routerSkill33k7d agoMITA84Claude Code, Codex
exportChatCut-Inc/agent-pluginSkill1.1k12d agoApache-2.0A87Claude Code, Codex
video-genChatCut-Inc/agent-pluginSkill1.1k12d agoApache-2.0A0Claude Code, Codex