克劳德使用分析师

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

概述

使用此技能从本地ccusage数据生成基于证据的使用解释。将观察到的数字与解释分开,并用人性化的方式解释配额燃烧。

工作流程

验证ccusage是否可用:如果丢失,请使用npm install -g ccusage@latest安装或更新或使用npx ccusage@latest运行。针对请求的窗口运行捆绑分析器:默认 --since/--until 是所选时区的今天。为了进行历史比较,将--since设置为更早的日期,例如该月的第一天;否则排名/中位数字段仅描述单个目标日。

证据规则

基于ccusage输出或捆绑分析器输出的数字声明。说明范围:ccusage claude 测量本地 Claude Code 使用日志,包括 Claude Desktop 的 Claude Code 会话(当这些本地日志存在时)。它不是完整的普通 Claude.ai 聊天账单。报告带有时区的日期。清楚地解释缓存:即使用户没有输入这些单词,缓存读取令牌仍然是使用/配额压力。

输出形状

除非用户另有要求,否则请使用此结构:用简单的语言进行简短的结论。证据表:总令牌、成本、输入、输出、缓存创建、缓存读取。型号对照表。讨论配额耗尽时的 5 小时块表。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@daymade · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Linux · Windows
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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:
   ```bash
   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:
   ```bash
   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:
   ```bash
   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.

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。