claude-usage

claude-usage is a skill for Claude Code, Codex from tdimino/claude-code-minoan. It costs 63 tokens per session (1,965 once invoked), scanned A, original, MIT.

A reporting tool that reads Claude Code session records directly to calculate token use and estimated cost by project, session, model, or time period.

In plain words
What is it for?
Use it to generate daily, weekly, or monthly reports, inspect spending by project or model, and investigate differences between usage totals.
Why use it?
It helps audit actual usage, including records from subagents that some usage-reporting tools omit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Good fit Use it to generate daily, weekly, or monthly reports, inspect spending by project or model, and investigate differences between usage totals.

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

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 claude-usage

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tdimino/claude-code-minoan/claude-usage"><img src="https://agentmods.dev/badge/skills/tdimino/claude-code-minoan/claude-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,965 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 121
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00063 $0.01965
Opus 5 $0.00032 $0.00983
Sonnet 5 $0.00013 $0.00393
Haiku 4.5 $0.00006 $0.00197

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

Security

Grade A, and why

claude-usage 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/claude_usage_report.py, scripts/claude_usage.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/core-development/claude-usage/SKILL.md · 160 lines

How it starts

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

Claude Usage

Ground-truth token usage and cost reporting for Claude Code sessions. Parses JSONL files directly—parent sessions and subagent sidechains—to produce accurate numbers.

Why This Exists

ccusage (v18+, the standard community tool with 10.6k stars) undercounts output tokens by 77-94% for heavy users:

Source Output Tokens Notes
Raw JSONL (all files) 1,076,691 Ground truth
Raw JSONL (date-filtered) 412,987 Properly filtered
ccusage --timezone UTC 93,960 77% undercount
ccusage default 62,375 94% undercount

Three compounding bugs:

  1. Ignores subagent files at {session-uuid}/subagents/{agent-id}.jsonl—132 files missed on a typical day with Agent Teams
  2. Timezone confusion between UTC entry timestamps and local time filtering
  3. Drops entries in parent files—even at UTC, reports only 23% of actual tokens

This script reads every JSONL file to produce correct totals.


Usage

# Today's usage (default)
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py

# Last 7 days, broken down by day
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --since 7d

# Weekly breakdown for the past month
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --by week --since 30d

# Per-model breakdown
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --by model --since 7d

# Per-session with human-readable summaries
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --by session --since 1d

# Per-project breakdown
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --by project --since 7d

# Filter to one project
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --project Thera --since 30d

# Custom date range
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --since 2026-02-01 --until 2026-02-28

# JSON output (pipe to jq)
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --since 7d --json | jq '.grand_total'

# CSV output
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --since 7d --csv

# Compare against ccusage (shows delta)
python3 ~/.claude/skills/claude-usage/scripts/claude_usage.py --compare

# PDF report (dark editorial, CTO-ready)
python3 ~/.claude/skills/claude-usage/scripts/claude_usage_report.py --since 30d

# PDF with custom output path
python3 ~/.claude/skills/claude-usage/scripts/claude_usage_report.py --since 30d -o ~/Desktop/feb-usage.pdf

# HTML only (no Playwright needed)
python3 ~/.claude/skills/claude-usage/scripts/claude_usage_report.py --since 7d --html

Read the full file on GitHub · 160 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 160 lines · 63 tokens per session scan A 3ce7b1fff0d4

Subscribe to this mod's changes

claude-usage is a skill published in the GitHub repository tdimino/claude-code-minoan (41 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 1,965 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

manager

A session-to-GitHub tracker that creates, updates, and reads issues across repositories, including their labels, parent epics, and project-board placement.

serejaris/personal-corp-os · 63 tokens

weekly-retro

A structured weekly retrospective for a one-person business run with AI agents. It gathers evidence from code, project tools, and canonical business files, then records findings and outcomes.

serejaris/personal-corp-os · 49 tokens

art-director

Orchestrate iterative visual style searches with branch prompts, decision graphs, feedback loops, and final direction selection.

serejaris/personal-corp-os · 26 tokens

html-draft

Use when user wants a standalone HTML diagram in flat engineering blueprint style — architecture diagrams, system flows, technical spec sheets, component maps. Generates one HTML file using Tailwind v4 (browser CDN) for layout and D3 v7 (CDN) for SVG diagrams. User-invoked only — do NOT auto-trigger. Triggers on…

serejaris/personal-corp-os · 130 tokens

pm-metrics

A product-metrics review aid that examines trends, unusual changes, possible causes, and recommended actions. It can organize a main product metric into lower-level measures, inspect retention and funnels, read A/B tests, and compare results with goals.

serejaris/personal-corp-os · 160 tokens

corp-doctor

A guided maintenance and setup tool for a Personal Corp system, meaning a business workflow built from AI agents, department repositories, and shared rules. It checks what exists before making changes.

serejaris/personal-corp-os · 102 tokens