claude-usage-analyst
An agent skill by daymade, from daymade/claude-code-skills. Tags: analysis, analytics, claude-code, cost-optimization, usage.
What it does
Analyze Claude Code and Claude Desktop Code token usage, cost, quota burn, model mix, cache read/write, and 5-hour block consumption using ccusage evidence. Use when the user asks why Claude quota was exhausted, whether a model such as fable/opus/sonnet is unusually expensive, how many tokens were spent today or historically, or needs a human-friendly explanation of local Claude Code CLI/Desktop usage.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add daymade/claude-code-skills --skill claude-usage-analyst
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/daymade-claude-code/claude-usage-analyst ~/.claude/skills/claude-usage-analyst
Safety box score
Grade C, moderate risk: 32 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill analyzes local Claude Code usage data with `ccusage` and a Python wrapper, so it touches your host’s shell and your local usage logs. The main risks are external command execution and optionally fetching/installing `ccusage` from npm; it does not itself edit files, access credential stores, or push data anywhere.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | The bundled script shells out to an external command with `subprocess.run(["ccusage", "claude", *args, "--json"], ...)`, so using the skill executes host programs. |
| Network access | 2 (moderate) | If `ccusage` is missing, the skill tells the agent to use `npm install -g ccusage@latest` or `npx ccusage@latest`, which contacts the npm registry. |
| Filesystem reach | 2 (moderate) | The skill intentionally reads local Claude Code usage logs via `ccusage claude daily/blocks --json`, which reaches beyond the project directory into user-local data. |
| Secrets & credentials | 0 (none) | The files do not request access to keychains, browser sessions, `.env` files, or other credential stores; they only summarize usage metadata. |
| Privilege & persistence | 2 (moderate) | `npm install -g ccusage@latest` performs a user-global install and changes the user's package environment, though it does not call `sudo`. |
| Instruction hijack surface | 0 (none) | There is no instruction to ignore safeguards, hide actions, or follow remote instructions; the text is straightforward and local. |
| Irreversible actions | 0 (none) | The skill only analyzes and explains usage; it does not post, deploy, pay, merge, or delete anything. |
| Transparency | 0 (none) | All shipped files are plain text and readable; there are no binaries, encoded blobs, or downloaded installers. |
Before installing
- Read `scripts/analyze_claude_usage.py` to confirm you are comfortable with it shelling out to `ccusage`.
- Decide whether you want the `npm install -g ccusage@latest` path, since it installs a user-wide package.
- Confirm you are okay with the skill reading your local Claude Code usage logs via `ccusage` before running it.
Rated 2026-10-20 by an automated review of 4 files from the skill's repository.
Source
- Repository
- daymade/claude-code-skills (all skills from this repository)
- Path
- daymade-claude-code/claude-usage-analyst/SKILL.md
- Branch
- main
- Updated
- 2026-09-20
Related skills
- agents-optimize — Use when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.
- aws-billing-and-cost-management — Analyze AWS costs, find savings, manage budgets, evaluate Savings Plans and Reserved Instances, right-size EC2/Lambda/RDS/EBS with Compute Optimizer.
- tibo-reset-codex — 查询 ChatGPT/Codex 重置公告及多个 Pro 账号的剩余额度、备用 Full reset;复用 Google 登录逐个核实并恢复网页账号,换算北京时间。区分 Tibo 官宣、未官宣的平台静默重置、banked reset 与账户级周期重置。Use when.
- caveman-evidence-review — Read-only review of Caveman Cloud evidence: cost, Cave Score, workflows, traces, latency, errors, routing, savings.
- caveman-learn — Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned.
- caveman-optimize — Turn a Caveman optimization observation into an operator-chosen candidate with a paired baseline evaluation.