Agent Skills › daymade/claude-code-skills › claude-usage-analyst

claude-usage-analyst

GitHub

基于本地ccusage数据,分析Claude Code和Desktop的Token用量、成本及配额消耗。用于解释额度耗尽原因、模型费用对比及使用明细,提供面向非技术用户的清晰解读。

daymade-claude-code/claude-usage-analyst/SKILL.md daymade/claude-code-skills

Trigger Scenarios

用户询问为何Claude配额耗尽 需要比较不同模型(如opus/sonnet)的费用差异 查询今日或历史Token消耗量 需要本地CLI/Desktop使用情况的通俗解释

Install

npx skills add daymade/claude-code-skills --skill claude-usage-analyst -g -y
More Options

Non-standard path

npx skills add https://github.com/daymade/claude-code-skills/tree/main/daymade-claude-code/claude-usage-analyst -g -y

Use without installing

npx skills use daymade/claude-code-skills@claude-usage-analyst

指定 Agent (Claude Code)

npx skills add daymade/claude-code-skills --skill claude-usage-analyst -a claude-code -g -y

安装 repo 全部 skill

npx skills add daymade/claude-code-skills --all -g -y

预览 repo 内 skill

npx skills add daymade/claude-code-skills --list

SKILL.md

Frontmatter
{
    "name": "claude-usage-analyst",
    "description": "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.",
    "disable-model-invocation": true
}

Claude Usage Analyst

Overview

Use this skill to produce evidence-based usage explanations from local ccusage data. Separate observed numbers from interpretation, and explain quota burn in human terms.

Workflow

  1. Verify ccusage is available:

    ccusage --version
    

    If missing, install or update with npm install -g ccusage@latest or run with npx ccusage@latest.

  2. Run the bundled analyzer for the requested window:

    python3 /path/to/claude-usage-analyst/scripts/analyze_claude_usage.py \
      --since YYYY-MM-DD --until YYYY-MM-DD --timezone Asia/Shanghai
    

    Default --since/--until is today in the selected timezone. For historical comparison, set --since to an earlier date such as the first day of the month; otherwise rank/median fields only describe the single target day.

  3. If the user asks about a specific model comparison, pass aliases:

    python3 scripts/analyze_claude_usage.py --model-a fable --model-b opus-4-8
    
  4. Read references/explanation-guide.md when writing the final answer.

Evidence Rules

  • Base numeric claims on ccusage output or the bundled analyzer output.
  • State the scope: ccusage claude measures local Claude Code usage logs, including Claude Desktop's Claude Code sessions when those local logs exist. It is not a complete ordinary Claude.ai chat bill.
  • Report dates with timezone.
  • Explain cache clearly: cache read tokens are still usage/quota pressure even though the user did not type those words.
  • Do not infer Anthropic plan quota rules from local token counts unless the user provides plan details. Say "quota-like pressure" or "ccusage estimated cost/token burn" when exact plan accounting is unknown.
  • When comparing models, compare both token volume and estimated cost. A model can have similar token volume but higher cost.

Output Shape

Use this structure unless the user asks otherwise:

  1. Short conclusion in plain language.
  2. Evidence table: total tokens, cost, input, output, cache create, cache read.
  3. Model comparison table.
  4. 5-hour block table when quota exhaustion is discussed.
  5. Explanation of why the burn happened.
  6. Confidence and caveats.

Keep the answer readable for non-technical users. Avoid unexplained terms like "cache read" without a one-sentence translation.

Version History

  • c6903aa Current 2026-09-28 12:33
  • e00a2ec 2026-08-20 11:26

Same Skill Collection

auto-repo-setup/SKILL.md
bilibili-source/SKILL.md
capture-screen/SKILL.md
cli-demo-generator/SKILL.md
cloudflare-troubleshooting/SKILL.md
codex-image-gallery/SKILL.md
competitors-analysis/SKILL.md
data-visualization-discipline/SKILL.md
daymade-audio/asr-transcribe-to-text/SKILL.md
daymade-audio/audio-router/SKILL.md
daymade-audio/meeting-minutes-taker/SKILL.md
daymade-audio/stepfun-asr/SKILL.md
daymade-audio/stepfun-tts/SKILL.md
daymade-audio/transcript-fixer/SKILL.md
daymade-claude-code/agent-web-search-setup/SKILL.md
daymade-claude-code/claude-code-hooks/SKILL.md
daymade-claude-code/claude-code-ops-router/SKILL.md
daymade-claude-code/claude-code-ping-start-5h-quota/SKILL.md
daymade-claude-code/claude-export-txt-better/SKILL.md
daymade-claude-code/claude-skills-troubleshooting/SKILL.md
daymade-claude-code/claude-switch-models-setup/SKILL.md
daymade-claude-code/continue-claude-code-work/SKILL.md
daymade-claude-code/continue-claude-work/SKILL.md
daymade-claude-code/continue-codex-work/SKILL.md
daymade-claude-code/lark-cli-router/SKILL.md
daymade-claude-code/local-conversation-history/SKILL.md
daymade-claude-code/marketplace-dev/SKILL.md
daymade-claude-code/prior-work-retrieval/SKILL.md
daymade-claude-code/read-claude-code-history/SKILL.md
daymade-claude-code/read-claude-web-conversation/SKILL.md
daymade-claude-code/read-codex-history/SKILL.md
daymade-claude-code/statusline-generator/SKILL.md
daymade-claude-code/tech-selection/SKILL.md
daymade-claude-code/terminal-screenshot/SKILL.md
daymade-codex/codex-1m-context-window-setup/SKILL.md
daymade-codex/codex-image-gallery/SKILL.md
daymade-codex/design-style-picker/SKILL.md
daymade-codex/interaction-design-board/SKILL.md
daymade-codex/local-codex/SKILL.md
daymade-docs/docs-router/SKILL.md
daymade-docs/docx-creator/SKILL.md
daymade-docs/excel-automation/SKILL.md
daymade-docs/mermaid-tools/SKILL.md
daymade-docs/pdf-creator/SKILL.md
daymade-docs/ppt-creator/SKILL.md
daymade-docs/read-docx-review/SKILL.md
daymade-financial/ashare-news-fetcher/SKILL.md
daymade-financial/benchmark-due-diligence/SKILL.md
daymade-financial/bigdata-skill/SKILL.md

Metadata

Files
0
Version
c6903aa
Hash
4c6bb36c
Indexed
2026-08-20 11:26

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 20:24
浙ICP备14020137号-1