Agent Skillsdaymade/claude-code-skills › claude-usage-analyst

claude-usage-analyst

GitHub

分析本地 Claude Code 和 Desktop 的 Token 用量、成本、配额消耗及模型混合情况。通过 ccusage 数据解释配额耗尽原因,提供模型对比与缓存使用详情,帮助用户理解资源消耗。

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

Trigger Scenarios

用户询问为何 Claude 配额耗尽 比较特定模型如 fable/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."
}

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

  • e00a2ec Current 2026-08-20 11:26

Same Skill Collection

capture-screen/SKILL.md
cloudflare-troubleshooting/SKILL.md
codex-image-gallery/SKILL.md
daymade-claude-code/claude-skills-troubleshooting/SKILL.md
daymade-claude-code/continue-claude-work/SKILL.md
daymade-claude-code/marketplace-dev/SKILL.md
daymade-docs/doc-to-markdown/SKILL.md
daymade-docs/mermaid-tools/SKILL.md
daymade-docs/ppt-creator/SKILL.md
daymade-financial/ashare-news-fetcher/SKILL.md
daymade-financial/devils-advocate/SKILL.md
daymade-financial/gangtise-copilot/SKILL.md
daymade-financial/pharma-daily-report/SKILL.md
daymade-skill/skill-reviewer/SKILL.md
daymade-skill/skills-search/SKILL.md
design-style-picker/SKILL.md
douban-skill/SKILL.md
download-gemini-images/SKILL.md
excel-automation/SKILL.md
fact-checker/SKILL.md
gemini-history-analyzer/SKILL.md
github-ops/SKILL.md
github-sensitive-data-cleanup/SKILL.md
i18n-expert/SKILL.md
llm-icon-finder/SKILL.md
macos-cleaner/SKILL.md
notify-wecom/SKILL.md
openclaw/SKILL.md
product-analysis/SKILL.md
prompt-optimizer/SKILL.md
promptfoo-evaluation/SKILL.md
repomix-unmixer/SKILL.md
scrapling-skill/SKILL.md
setup-notifications-via-wecom/SKILL.md
slides-creator/SKILL.md
ui-designer/SKILL.md
video-comparer/SKILL.md
wps-doc-scraper/SKILL.md
youtube-downloader/SKILL.md
auto-repo-setup/SKILL.md
benchmark-due-diligence/SKILL.md
bilibili-source/SKILL.md
cli-demo-generator/SKILL.md
competitors-analysis/SKILL.md
daymade-audio/asr-transcribe-to-text/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

Metadata

Files
0
Version
e00a2ec
Hash
2937e96a
Indexed
2026-08-20 11:26

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 05:17
浙ICP备14020137号-1 $mapa de visitantes$