analytics

An analytics dashboard workflow for reviewing how a coding workflow performs over time using command logs, Git history, test runs, coverage reports, and benchmark results.

In plain words
What is it for?
Use it to generate usage reports, calculate return on investment, and inspect recent commits, contributors, changed files, test pass rates, and coverage trends.
Why use it?
It brings scattered development information together so you can see usage, test reliability, coverage changes, and reported time savings in one summary.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/vishnu2kmohan/mcp-server-langgraph/analytics
Clone the repo
git clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraph

Made for: Claude Code.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,233 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.03233
Opus 5 $0.00008 $0.01617
Sonnet 5 $0.00003 $0.00647
Haiku 4.5 $0.00002 $0.00323

Measured 2d ago against content hash 82c8e87495ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analytics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/analytics.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow Analytics Dashboard

You are tasked with generating a comprehensive analytics dashboard for the Claude Code workflow optimization. This command shows usage statistics, time savings, ROI, and recommendations.

Analytics Context

Data Sources:

  • Command usage log (.claude/analytics/command-usage.jsonl)
  • Git commit history
  • Test execution history
  • Coverage reports
  • Benchmark results

Tracked Metrics:

  • Command usage frequency
  • Time savings per command
  • Overall ROI
  • Sprint velocity
  • Test pass rate
  • Coverage trends

Your Task

Step 1: Generate Usage Report

Run the usage tracking script:

python scripts/workflow/track-command-usage.py --report --days 30

Step 2: Calculate ROI

Run the ROI calculation:

python scripts/workflow/track-command-usage.py --roi

Step 3: Gather Additional Metrics

Git Metrics (last 30 days):

# Commit count
git log --since="30 days ago" --oneline | wc -l

# Contributors
git log --since="30 days ago" --format="%an" | sort -u | wc -l

# Files changed
git log --since="30 days ago" --name-only | sort -u | wc -l

# Lines changed
git log --since="30 days ago" --numstat | awk '{add+=$1; del+=$2} END {print add, del}'

Test Metrics:

# Run tests and capture results
pytest tests/ -v --tb=no 2>&1 | tee /tmp/test-results.txt

# Parse pass rate
grep "passed" /tmp/test-results.txt

Coverage Metrics:

# Get coverage percentage
if [ -f "htmlcov/index.html" ]; then
    grep -oP 'pc_cov">\K[0-9]+' htmlcov/index.html | head -1
fi

Step 4: Generate Comprehensive Dashboard

Dashboard Format:

╔══════════════════════════════════════════════════════════════════╗
║              WORKFLOW ANALYTICS DASHBOARD                        ║
║              Last 30 Days | Auto-Generated                       ║
╠══════════════════════════════════════════════════════════════════╣
║  COMMAND USAGE STATISTICS                                        ║
╠══════════════════════════════════════════════════════════════════╣
║  Total Commands Used:      287                                   ║
║  Unique Commands:          15                                    ║
║  Most Used:                /test-summary (45 uses)               ║
║  Highest Value:            /create-adr (40 min/use)              ║
║  Total Time Saved:         42.5 hours                            ║
╠══════════════════════════════════════════════════════════════════╣
║  TOP 10 COMMANDS BY VALUE                                        ║
╠══════════════════════════════════════════════════════════════════╣
║  1. /test-summary          45 uses │ 3.8h saved │ 5 min/use     ║
║  2. /quick-debug           38 uses │ 7.6h saved │ 12 min/use    ║
║  3. /create-adr            12 uses │ 8.0h saved │ 40 min/use ⭐ ║
║  4. /improve-coverage      8 uses  │ 6.0h saved │ 45 min/use ⭐ ║
║  5. /coverage-gaps         18 uses │ 6.0h saved │ 20 min/use ⭐ ║
║  6. /ci-status             42 uses │ 3.2h saved │ 4.5 min/use   ║
║  7. /pr-checks             15 uses │ 2.5h saved │ 10 min/use    ║
║  8. /start-sprint          2 uses  │ 0.7h saved │ 20 min/use    ║
║  9. /progress-update       6 uses  │ 2.0h saved │ 20 min/use    ║
║  10. /deploy               5 uses  │ 2.1h saved │ 25 min/use ⭐ ║
╠══════════════════════════════════════════════════════════════════╣
║  RETURN ON INVESTMENT (ROI)                                      ║
╠══════════════════════════════════════════════════════════════════╣
║  Investment:               35 hours (one-time)                   ║
║  Return (30 days):         42.5 hours                            ║
║  ROI:                      1.2x (21% return) ✅                  ║
║  Break-Even:               ACHIEVED ✅                           ║
║                                                                  ║
║  Projected Annual:         510 hours saved                       ║
║  Work Weeks Saved:         12.8 weeks                            ║
║  Annualized ROI:           14.6x                                 ║
╠══════════════════════════════════════════════════════════════════╣
║  DEVELOPMENT VELOCITY                                            ║
╠══════════════════════════════════════════════════════════════════╣
║  Commits (30d):            47                                    ║
║  Contributors:             2                                     ║
║  Files Changed:            156                                   ║
║  Lines Added:              +2,847                                ║
║  Lines Removed:            -1,234                                ║
║  Net Change:               +1,613                                ║
║  Avg Commits/Day:          1.6                                   ║
╠══════════════════════════════════════════════════════════════════╣
║  QUALITY METRICS                                                 ║
╠══════════════════════════════════════════════════════════════════╣
║  Test Pass Rate:           99.3% (722/727) ✅                    ║
║  Test Coverage:            65% → 67% (+2%) 📈                    ║
║  Mypy Strict Modules:      3/11 → 5/11 (+2) 📈                   ║
║  Open TODOs:               34 → 28 (-6) 📉                       ║
║  Documentation:            39 ADRs (complete) ✅                 ║
╠══════════════════════════════════════════════════════════════════╣
║  EFFICIENCY GAINS (vs baseline)                                  ║
╠══════════════════════════════════════════════════════════════════╣
║  Sprint Setup:             67% faster (30min → 10min)            ║
║  Context Loading:          90% faster (10min → 1min)             ║
║  Test Analysis:            75% faster (20min → 5min)             ║
║  ADR Creation:             67% faster (60min → 20min) ⭐         ║
║  Coverage Analysis:        75% faster (60min → 15min) ⭐         ║
║  Debugging:                60% faster (20min → 8min)             ║
║  Deployment:               38% faster (40min → 25min) ⭐         ║
║  Overall:                  55-65% more efficient ✅              ║
╠══════════════════════════════════════════════════════════════════╣
║  RECOMMENDATIONS                                                 ║
╠══════════════════════════════════════════════════════════════════╣
║  🔥 High Impact:                                                 ║
║    • Use /create-adr more (only 12 uses, saves 40 min each)     ║
║    • Use /improve-coverage weekly (8 uses, saves 45 min each)   ║
║    • Use /deploy for all deployments (5 uses, saves 25 min)     ║
║                                                                  ║
║  ⚠️  Watch:                                                       ║
║    • Test coverage at 67% (target: 80%)                          ║
║    • Mypy strict rollout at 45% (5/11 modules)                   ║
║                                                                  ║
║  ✅ Celebrate:                                                   ║
║    • 99.3% test pass rate (excellent!)                           ║
║    • 287 command uses (workflow is being used!)                  ║
║    • ROI achieved in < 1 month                                   ║
╚══════════════════════════════════════════════════════════════════╝

Read the full file on GitHub · 343 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 343 lines · 16 tokens per session scan A 82c8e87495ad

Subscribe to this mod's changes

analytics is a command published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 9d ago), licensed MIT. It adds 16 tokens to every session and 3,233 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.