Skip to main content
command CX Codex

insights · hoangsonww — Claude Code command: usage analysis and installation

The insights command reads Agent Monitor data and reports three high-impact findings about Claude Code usage. Use it to spot activity shifts, cache patterns, or API errors.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-insights@claude-code-agent-monitor-plugins
Open on GitHub

What insights does

insights queries Agent Monitor’s local API for statistics and analytics. It compares the latest seven days with the seven before them, calculates the cache-read share, identifies frequently used tools and event types, and examines API errors and subagent activity.

The result ranks three findings by impact. Each includes a supporting value, why it matters, and a concrete next step. Currency appears in USD to four decimal places, while percentages use two. Agent Monitor must be reachable at http://localhost:4820; if the API cannot be reached, the command tells you to run npm start from the repository root. The dashboard is required for these metrics.

What it helps with

  • compare Claude Code activity across two weeks
  • calculate the cache-read share of token usage
  • identify the most-used tool
  • check API error share and subagent activity

Example prompts for the agent

  • Analyze Agent Monitor data and report three key findings about Claude Code usage.
  • Compare Claude Code activity over the latest seven days with the previous seven, then suggest an action.
  • Check the API error share and cache usage using the dashboard data.

How to install insights

1Plugin marketplace

/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-insights@claude-code-agent-monitor-plugins

2Manually: put the files in place

.claude/commands/insights.md

Call it with /insights. For all projects use ~/.claude/commands/

Questions about insights

How do I install insights in Claude Code?

Run /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then /plugin install ccam-insights@claude-code-agent-monitor-plugins. The command file is .claude/commands/insights.md.

What does the insights command do?

It analyzes Agent Monitor metrics and returns three prioritized findings about Claude Code usage. Each finding includes a supporting value, an explanation, and an action.

What needs to be running for insights to work?

Agent Monitor must be reachable at http://localhost:4820. If the API cannot be reached, the command directs you to run npm start from the repository root.

Source text

insights.md · MIT
---
description: Surface the top 3 data-backed insights about your Claude Code usage right now
---

Produce the **top 3 insights** about Claude Code usage right now, each backed by real numbers from the Agent Monitor dashboard.

1. Fetch high-level state:
   - `curl -s http://localhost:4820/api/stats` → total_sessions, active_sessions, active_agents, total_events, events_today, agents_by_status, sessions_by_status.
   - `curl -s http://localhost:4820/api/analytics` → tokens (total_input/total_output/total_cache_read/total_cache_write), tool_usage (top 20), daily_events (365d), daily_sessions (365d), event_types, avg_events_per_session, total_subagents.

2. Derive signal, citing exact field values:
   - Cache hit rate = `total_cache_read / (total_cache_read + total_input)`.
   - Activity trend: compare the last 7 days of `daily_sessions`/`daily_events` against the prior 7.
   - Concentration: the single most-used tool and most-frequent `event_type`, with its share of the total.
   - Error pressure: `APIError` share of events; subagent fan-out via `total_subagents` and `avg_events_per_session`.

3. Pick the **3 most decision-relevant** findings (biggest cost lever, sharpest trend, or clearest anomaly). For each print:
   - A one-line headline with the supporting number.
   - Why it matters in one sentence.
   - One concrete action.

Output rules: rank by impact (most important first); currency in USD to 4 decimals; rates as percentages to 2 decimals; use ▲/▼ for trend direction; cite only fields the API returned — never fabricate. If `curl` cannot reach `http://localhost:4820`, tell the user to start the dashboard with `npm start` from the repo root.

© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

insights by other authors comes first.

insights Rohit Ghumare insights turns your pro-workflow history into numbers: edits per session, rules you actually apply, mistakes that keep coming back. Useful when you want to see where the agent keeps slipping. CX Codex +1 ★ 2,966repo stars turning-engineering-analytics-into-insights PostHog turning-engineering-analytics-into-insights — a skill for Claude Code and Codex: converts PR and CI metrics into saved PostHog insights, dashboards, and automated subscriptions. Triggers when visualizing engineering team performance. CX Codex +1 189installs creator-insights Starchild-ai-agent The creator-insights skill analyzes Twitter/X accounts, spots viral patterns and high-value followers, and drafts tweets. Use it for creator research and niche analysis. CX Codex +1 151installs creating-box-plot-insights PostHog The creating-box-plot-insights Claude Code skill builds box plot insights in PostHog from product analytics or SQL. It runs on requests to chart a numeric distribution, compare medians, or save an insight. CX Codex +1 148installs synthesize-insights gtmagents synthesize-insights turns scattered customer feedback and usage numbers into one brief for leadership: themes, quotes, metrics and owners. CX Codex +1 ★ 450repo stars synthesize-voc-insights gtmagents synthesize-voc-insights is a Claude Code command that combines Voice of Customer signals and estimates their impact. It prepares findings for executives or product teams. CX Codex +1 ★ 450repo stars analytics-insights Indranil Banerjee analytics-insights — a skill for designing an analytics layer with KPI frameworks, report templates, and attribution models. Activates when you work with metrics, success measures, and traffic anomalies. CX Codex +1 ★ 1,596repo stars

From the same set155

The whole set →

Project sponsors

Companies that keep this analytics open