Skip to content

Insights Engine

The Insights page provides intelligent analytics on your Claude Code usage — trends, anomalies, forecasts, and week-over-week comparisons, all computed from your session data.

Dashboard Components

Trend Card

Shows the overall direction of your spending:

  • UP / DOWN / STABLE with a daily slope ($/day)
  • Comparison of first half vs second half of the selected period
  • Color-coded indicator (green for down, red for up, neutral for stable)

Daily Cost Chart

Interactive area chart showing daily costs with two overlays:

  • Red dots on anomalous days (z-score > 2) — days where spending was unusually high or low
  • Dashed forecast line projecting costs for the next 7 days based on moving average

Week-over-Week

Compares this week vs last week:

  • Total cost difference with percentage change
  • Top 3 project movers (which projects drove the biggest changes)

7-Day Forecast

Predicted cost for the next 7 days:

  • Point estimate based on moving average
  • Low/high confidence range based on historical variance
  • Sparkline visualization

Anomalies Detected

Table of days with unusually high or low spending:

  • Date, actual cost, expected cost, z-score
  • Sorted by deviation (most anomalous first)
  • Only days with z-score > 2 are shown

At the bottom of the Insights page, copy-to-clipboard examples show how to ask Claude deeper questions using the MCP tools:

  • "What's causing the spending spike on April 5?"
  • "Compare my project costs this month"
  • "What's my forecast if I maintain this pace?"
text
> "Any anomalies in my usage this month?"

Anomaly Detection (last 30 days, threshold: 2.0σ)

1 anomaly detected:

┌──────────────────┬─────────┬──────────────┬─────────┐
│ Date             │ Cost    │ Deviation    │ Z-score │
├──────────────────┼─────────┼──────────────┼─────────┤
│ 2026-04-08       │ $291.33 │ +$158.06     │ +2.0    │
└──────────────────┴─────────┴──────────────┴─────────┘

Your average daily cost is $133/day. April 8 was
2.2x the average — worth investigating what drove that spike.

Period Selector

Toggle between three analysis windows:

  • 7d — last 7 days (good for daily patterns)
  • 30d — last 30 days (good for weekly trends)
  • 90d — last 90 days (good for seasonal patterns)

Powered By

The Insights page uses two dedicated Worker endpoints:

  • GET /api/analytics-trends — trend direction, slope, and daily costs
  • GET /api/analytics-compare-periods — period comparison with top movers

These are the same analytics that power the MCP server's get_trends and compare_periods tools.

Released under the MIT License.