Analyzes Claude Code token usage and cost trends over daily/weekly/monthly periods, computes metrics like averages, peak days, trend direction, and monthly projections, with per-project filtering.
npx claudepluginhub li195111/claude-token-analyzer --plugin claude-token-analyzerThis skill uses the workspace's default tool permissions.
Analyze token usage and cost trends over time, with derived metrics and simple forecasting.
Analyzes Claude Code usage, costs, tokens, efficiency, cache hits, and burn rate using ccusage for stats and termgraph for visuals on work or personal profiles.
Generates a quick one-page report summarizing Claude Code token usage, costs, sessions, projects, cache hit rates, subagent ratios, and top spenders. Routes to cost, anomaly, project, or trend audits.
Displays real token usage and estimated savings for current Claude Code session from session logs—no AI estimation. Invoke via `/genshijin-stats` for session stats, `--all` lifetime totals, `--share` summaries, or `--since` periods.
Share bugs, ideas, or general feedback.
Analyze token usage and cost trends over time, with derived metrics and simple forecasting.
Execute mcp__token-analyzer__sync_db. Skip if already called in this conversation.
Execute mcp__token-analyzer__trend_report with:
granularity: "daily" (default). Accept "weekly" or "monthly" from user.last_n_days: 30 (default). Accept custom range from user.project_path: optional, for per-project filtering.From the returned data_points array, compute:
avg_daily_cost (from API)avg_daily_tokens (from API)peak_day (from API)total_cost[-14:-7] total_cost(recent_7d - prev_7d) / prev_7d * 100avg_daily_cost * total_days_in_current_month## CTA 趨勢報告 — 最近 N 天
| 指標 | 值 |
|------|-----|
| 日均成本 | $X.XX USD |
| 日均 Token | X |
| 峰值日 | YYYY-MM-DD ($X.XX) |
| 近 7 天均值 | $X.XX USD |
| 前 7 天均值 | $X.XX USD |
| 趨勢方向 | ↑ +X.X% / ↓ -X.X% |
| 本月預估 | $X.XX USD |
### 趨勢分析
- (Describe trend: stable / rising / declining based on data)
- (If rising >20%: warn and suggest cta-anomaly-hunt)
### 每日明細
| 日期 | 成本 | Token | 會話數 |
|------|------|-------|--------|
| ... | ... | ... | ... |
If the 7-day trend shows >20% increase, proactively suggest:
「趨勢上升幅度較大,建議執行 cta-anomaly-hunt 排查原因。」
avg_daily_cost * total days in month (not remaining days).project_path parameter.$X.XX USD.+15.3%).125,000).For MCP tool parameter details: ${CLAUDE_PLUGIN_ROOT}/skills/cta/references/tool-reference.md