/claude-token-analyzer:cta-trend-watchfrom claude-token-analyzer
Analyzes Claude Code token usage and cost trends over time with daily/weekly/monthly granularity and simple forecasting. Flags significant increases and suggests anomaly investigation.
Ships in claude-token-analyzer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub li195111/claude-token-analyzer --plugin claude-token-analyzer7 skills in this plugin
/ctaThis skill should be used when the user asks to "analyze token usage", "check costs",
"how much did I spend", "token analysis", "session analysis", "cta", or mentions
Claude Code usage efficiency, token spending, or cost optimization.
Routes to 6 workflow sub-skills: cta-health-check, cta-cost-audit, cta-anomaly-hunt,
cta-project-review, cta-trend-watch, cta-usage-pattern. Also handles ambiguous intent with a quick overview.
Do NOT trigger for: building token-related features, tokenizer/NLP work, or non-Claude cost analysis.
/cta-anomaly-huntThis skill should be used when the user asks about "anomalies", "problems", "有異常嗎",
"哪些會話有問題", "排查", "診斷", or suspects waste or efficiency issues in Claude Code
usage. Scans for 6 types of statistical anomalies with severity scoring and automatic
drill-down into suspicious sessions. Can also be routed from the main cta skill.
/cta-cost-auditOther plugins' skills for the same job