cost-audit

cost-audit is a skill for Claude Code from berkcangumusisik/claude-code-practices. It costs 25 tokens per session (645 once invoked), scanned A, original, MIT.

A code-review tool that examines how tokens were spent during the current coding session. Tokens are the text units used by an AI assistant and can affect cost and response limits.

In plain words
What is it for?
Use it to identify waste in a session and get concrete suggestions for reducing token use next time.
Why use it?
It shows where unnecessary reading, repeated research, vague requests, or other avoidable work used tokens.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it to identify waste in a session and get concrete suggestions for reducing token use next time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/berkcangumusisik/claude-code-practices/cost-audit
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 berkcangumusisik/claude-code-practices --skill cost-audit
Clone the repo
git clone --depth 1 https://github.com/berkcangumusisik/claude-code-practices

Made for: Claude Code.

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-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/cost-audit/github.svg)](https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/cost-audit)
Your own site
<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/cost-audit"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/cost-audit/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-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/cost-audit"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/cost-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 645 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.00025 $0.00645
Opus 5 $0.00013 $0.00322
Sonnet 5 $0.00005 $0.00129
Haiku 4.5 $0.00003 $0.00064

Measured 9d ago against content hash c7c793709b18, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cost-audit 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 9d 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.

skills/cost-audit/SKILL.md · 71 lines

How it starts

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

Goal

Make it visible where the tokens in this session actually went. Not guesses — evidence. Output: "do these 3 things next time and you save ~X%."

Step 1 — Capture current cost

/cost

Note the output: total tokens, input/output split, cache hit rate, total $.

Step 2 — Find the leaks

Scan the transcript for these signals:

Signal How to detect it Why it wastes tokens
Unnecessary file reads Read calls touching node_modules/, dist/, *.lock, coverage/ Missing .claudeignore
Re-reading the same file Same path appears in multiple Read calls Context lost — /compact should have happened earlier
Reading entire large files Read without limit on files >500 lines Should have used offset/limit or Grep
Bash + grep/cat/find Bash calls to grep, cat, find, ls -R Dedicated tools (Grep/Glob/Read) are cheaper and more precise
Vague prompt → many tool calls Single-word asks ("improve", "fix", "look") followed by 5+ tool calls Prompt wasn't specific
Repeated onboarding research Same concept re-discovered across sessions Belongs in CLAUDE.md

Step 3 — Report

Give the user a report in this shape:

## Session summary
- Total: <tokens> (<$>)
- Cache hit: <%>

## Top 3 leaks
1. [Evidence]: X files under src/components/ were read in full; ~Y tokens combined
   Fix: add to .claudeignore → <lines>
   Estimated savings: ~Z%

2. ...

3. ...

## Action list
- [ ] Create .claudeignore with <lines>
- [ ] Add a "<topic>" section to CLAUDE.md
- [ ] Use `/compact <hint>` earlier in long sessions

Step 4 — Optional auto-fixes

If the user approves:

  • Create .claudeignore if missing, add the detected paths
  • Create a CLAUDE.md scaffold if missing, seed it with the repeated-research topics
  • Suggest a specific /compact hint phrase for this project

Rules

  • No guessing — only report what's in the transcript
  • Always a number — not "a lot", but "12,400 tokens"
  • Action-oriented — every finding ends with a concrete command or edit
  • Keep it short — 3 top leaks is plenty; skip the long tail

Read the full file on GitHub · 71 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. 9d ago First seen · 71 lines · 25 tokens per session scan A c7c793709b18

Subscribe to this mod's changes

cost-audit is a skill published in the GitHub repository berkcangumusisik/claude-code-practices (10 stars, last pushed 4mo ago), licensed MIT. It adds 25 tokens to every session and 645 once invoked, about $0.0001 per session on Opus 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

Other skills, from other repositories

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

skill-builder

Automatically detect source types and build AI skills using Skill Seekers. Use when the user wants to create skills from documentation, repos, PDFs, videos, or other knowledge sources.

yusufkaraaslan/Skill_Seekers · 38 tokens

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

snip

You are an expert at writing declarative YAML filters for snip, a CLI proxy that reduces LLM token consumption by filtering shell output.

edouard-claude/snip · 0 tokens

goai

GoAI is a Go SDK for AI applications. One unified API across 25+ LLM providers. Inspired by the Vercel AI SDK, adapted to Go idioms (generics, interfaces, channels).

zendev-sh/goai · 0 tokens

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens