/ccam-analytics:usage-trendsfrom ccam-analytics
Analyzes Claude Code usage trends over time using Agent Monitor analytics API — daily sessions, events, tokens, model distribution, tool usage, and session health.
Ships in ccam-analytics. 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.
Read when SKILL.md points to them.
Analyze usage patterns and trends from the Agent Monitor analytics data.
The user provides: $ARGUMENTS
Options: "last 7 days", "last 30 days", "last quarter", "peak hours", "tool trends", "model usage".
| Endpoint | Returns |
|---|---|
GET /api/analytics | Comprehensive analytics object (see schema below) |
GET /api/stats | { total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status } |
GET /api/sessions?limit=200 | Full session records with timestamps and metadata |
GET /api/analytics){
"overview": { "total_sessions", "active_sessions", "active_agents", "total_agents", "total_events" },
"tokens": {
"total_input": N, "total_output": N,
"total_cache_read": N, "total_cache_write": N
},
"tool_usage": [{ "tool_name": "...", "count": N }], // top 20
"daily_events": [{ "date": "YYYY-MM-DD", "count": N }], // 365 days
"daily_sessions": [{ "date": "YYYY-MM-DD", "count": N }], // 365 days
"agent_types": [{ "subagent_type": "task"|"explore"|null, "count": N }],
"event_types": [{ "event_type": "PreToolUse"|"PostToolUse"|..., "count": N }],
"avg_events_per_session": N,
"total_subagents": N,
"sessions_by_status": { "active": N, "completed": N, "error": N, "abandoned": N },
"agents_by_status": { "working": N, "completed": N, "error": N, ... }
}
Plot daily_sessions and daily_events for the requested period. Compute:
From analytics tokens (baselines are pre-summed into totals at the DB level):
total_input, total_output, total_cache_read, total_cache_writetotal_cache_read / (total_cache_read + total_input) — trending up = improvingtotal_output / total_input ratio — high = Claude is verboseFrom tool_usage (top 20 tools by event count):
From agent_types + per-session model field:
From sessions_by_status:
completed / total × 100error / total × 100abandoned / total × 100From event_types:
Markdown with tables and ASCII trend indicators (▲▼→). Include period comparison when applicable.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
usage-trends, agent-monitor, analytics, claude-code-monitoring
npx claudepluginhub hoangsonww/claude-code-agent-monitor --plugin ccam-analytics6 skills in this plugin
/cache-efficiencyAnalyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.
/cost-breakdownBreak down Claude Code costs using the Agent Monitor pricing engine. Shows per-model costs (input, output, cache_read, cache_write at $/Mtok rates), per-session costs, daily trends, and compaction baseline token recovery. Use when analyzing spending, comparing model costs, or planning budgets.
/model-mixBreak down Claude Code usage by model family (Opus / Sonnet / Haiku) from the Agent Monitor dashboard — each family's share of tokens, share of cost, and the spots where an expensive model is doing cheap work. Pulls per-model token and cost splits from /api/pricing/cost, current rates from /api/pricing, fleet token totals from /api/analytics, and per-session model assignment from /api/sessions. Use when deciding model routing or whether to downshift work to a cheaper tier.
/productivity-scoreCalculate a productivity score using actual Agent Monitor metrics — session completion rates, cache efficiency (cache_read vs input), compaction pressure (baseline tokens), turn velocity (turn_count / total_turn_duration_ms), tool success ratio (PreToolUse vs PostToolUse), and the workflow intelligence API's complexity and effectiveness scores.
/session-reportGenerate a comprehensive session report with per-model token usage (input, output, cache_read, cache_write including compaction baselines), cost breakdown via the pricing engine, tool invocations, agent hierarchy, compaction events, API errors, turn durations, and thinking block counts. Use when reviewing a specific session or summarizing activity over a date range.
5 plugins ship this exact skill · first indexed Aug 10, 2026
Other plugins' skills for the same job