
This pulls session data from your local Agent Monitor instance and flags statistical outliers across cost, duration, errors, tokens, and behavior patterns. It calculates baselines from your last 500 sessions, then surfaces things like sessions costing 2σ above mean, cache miss spikes, unusual tool combinations, or error rate jumps. You get a severity-coded report with observed versus expected ranges. Honestly most useful after you've accumulated enough session history for the statistics to mean something, otherwise you're just getting noise from a sparse baseline. The configurable sensitivity levels (strict/normal/relaxed) help once you know what normal looks like for your workflows.
$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill anomaly-alert --agent claude-codeInstalls into .claude/skills of the current project.
Detect anomalous sessions in Claude Code Agent Monitor data.
The user provides: $ARGUMENTS
This may be:
Fetch baseline data from http://localhost:4820:
GET /api/sessions?limit=500 — historical sessions for baselineGET /api/analytics — aggregated metricsGET /api/pricing/cost — cost data per sessionCompute baselines for each metric:
Detect anomalies using statistical thresholds:
Classify each anomaly:
Present as an Anomaly Report:
═══════════════════════════════════════════════
ANOMALY DETECTION REPORT
Analyzed: N sessions | Baseline: last 30 days
Anomalies found: N (🔴 N critical, 🟡 N warn, 🔵 N info)
═══════════════════════════════════════════════
For each anomaly:
Sponsors