check-token-usage

Checks token usage and estimated cost from local ccusage logs via pnpm scripts.

Updated May 18, 2026
One-click install
npx skills add https://github.com/dodonki1223/vault --skill check-token-usage-dodonki1223
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: check-token-usage
Source: https://github.com/dodonki1223/vault/tree/main/.agents/skills/check-token-usage
Command: npx skills add https://github.com/dodonki1223/vault --skill check-token-usage-dodonki1223

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It answers questions about how many tokens and how much estimated cost your Codex and Claude Code CLI sessions consumed, without manually running ccusage commands or guessing the right flags. ## Core Features & Use Cases - Period-based usage lookup: Maps natural-language periods (today, yesterday, this week, this month) to the correct pnpm usage:* script with JST absolute dates. - Session comparison: Compares a session's token usage against recent sessions to flag unusually heavy sessions (roughly 2-3x baseline). - Custom date ranges: Passes --since / --until options through to ccusage for arbitrary ranges, with optional JSON output. - Use Case: Ask "how much did I spend on tokens yesterday?" and get a concise report with total tokens, input/output/cache breakdown, and estimated cost clearly labeled as an estimate. ## Quick Start Use the check-token-usage skill to show today's token usage and estimated cost for Codex and Claude Code.

Frequently Asked Questions about check-token-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check token usage for Claude Code or Codex CLI?▼

Run the repository's pnpm usage scripts such as pnpm usage:today, pnpm usage:daily, or pnpm usage:monthly, which wrap ccusage. The skill selects the right script based on the period you ask about and returns tokens plus estimated cost.

How to check token usage for a custom date range with ccusage?▼

Pass ccusage options through the daily script: pnpm usage:daily -- --since YYYY-MM-DD --until YYYY-MM-DD. Add --json only if you need machine-readable output for further formatting.

Does ccusage show actual billing amounts?▼

No, ccusage estimates cost from local usage logs and its pricing data, so the figure is an approximation. This skill does not access billing portals or external invoice data, and always labels the cost as an estimate.

Can I compare token usage across sessions?▼

Yes, pnpm usage:session lists per-session usage so you can compare a session against recent ones. A session roughly 2-3x heavier than peers is flagged as a candidate for switching to a fresh session.

Why does ccusage report no usage data found?▼

This happens when local usage logs for Codex or Claude Code are missing or in an unexpected location. The skill reports the reason and suggests what to check next rather than guessing numbers.