Productivity score
Skill hoangsonww/Claude-Code-Agent-Monitor/plugins/ccam-analytics/skills/productivity-score
π A real-time monitoring dashboard for Claude Code, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, and WebSockets. It tracks sessions, agent activity, tool usage, and subagent orchestration, providing live analytics, a Kanban status board, status notifications, a cute buddy, and an interactive web UI/MacOS/Windows native app.
npx -y skills add hoangsonww/Claude-Code-Agent-Monitor --skill productivity-scoreAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Calculate 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.
SKILL.md
3.9 KB, as published. Nobody here has run it
Productivity Score
Calculate a productivity scorecard from the Agent Monitor's real data.
Input
The user provides: $ARGUMENTS
Options: "today", "this week", "last 30 days", a session ID, or "compare" for period comparison.
Data Sources
| Endpoint | Returns |
|---|---|
GET /api/analytics | Token totals (total_input, total_output, total_cache_read, total_cache_write β baselines pre-summed), tool_usage top 20, daily_events/sessions, event_types, sessions_by_status, agents_by_status, avg_events_per_session, total_subagents |
GET /api/sessions?limit=100 | Sessions with metadata JSON: thinking_blocks, turn_count, total_turn_duration_ms, usage_extras (service_tier, speed, inference_geo) |
GET /api/pricing/cost | Total cost with per-model breakdown |
GET /api/workflows/{sessionId} | 11 workflow datasets: stats, orchestration, toolFlow, effectiveness, patterns, modelDelegation, errorPropagation, concurrency, complexity, compaction, cooccurrence |
Score Components (each 0β100)
1. Completion Rate (20% weight)
From sessions_by_status:
completed / (completed + error + abandoned) Γ 100- Bonus for high completed-to-active ratio
- Penalty for abandoned sessions (wasted work)
2. Token Efficiency (20% weight)
From analytics tokens (baselines are pre-summed into totals):
- Cache hit rate:
total_cache_read / (total_cache_read + total_input) Γ 100- Above 60% = excellent, below 30% = poor
- Output concentration:
total_output / total_inputβ 0.3β0.8 is balanced
3. Tool Effectiveness (20% weight)
From event_types:
- Success ratio: Count
PostToolUse/ CountPreToolUseβ should be ~1.0; gap = tool failures - API error rate: Count
APIError/ total events β should be near 0 - From workflow
effectivenessdata: subagent completion rates, task success per type
4. Velocity (20% weight)
From session metadata:
- Turns per session: average
turn_countacross sessions - Turn speed: average
total_turn_duration_ms / turn_countβ lower = faster - Events per session: from
avg_events_per_sessionin analytics overview - Thinking depth: average
thinking_blocksβ more thinking = more thorough (neutral metric)
5. Cost Efficiency (20% weight)
From pricing:
- Cost per completed session:
total_cost / completed_sessions - Cost trend: comparing current period to previous (decreasing = improving)
- Model optimization: sessions using expensive models (Opus) for tasks subagents handle with Haiku/Sonnet
Overall Score
Weighted sum β letter grade:
- A+ (95-100), A (90-94), B+ (85-89), B (80-84), C+ (75-79), C (70-74), D (60-69), F (<60)
Output Format
βββββββββββββββββββββββββββββββββββββββ
PRODUCTIVITY SCORE: 87/100 (B+)
βββββββββββββββββββββββββββββββββββββββ
Completion Rate ββββββββββ 80/100
Token Efficiency ββββββββββ 92/100
Tool Effectivenessββββββββββ 85/100
Velocity ββββββββββ 88/100
Cost Efficiency ββββββββββ 90/100
βββββββββββββββββββββββββββββββββββββββ
Then: top 3 strengths, top 3 improvement areas with actionable steps, and period comparison if available.