debug-live-issue
Debug production-like issues in this repository with disciplined evidence gathering. Use when fixing failing workflows,…
Forecast Claude Code spend to the end of the week or month from the daily session trend on the Agent Monitor dashboard — moving average of daily spend × days remaining, added to spend-to-date. Uses /api/analytics daily_sessions, /api/pricing/cost, and /api/sessions for a per-day
Claude Code
$ npx -y skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast --agent claude-code
Codex
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a codex -y
Cursor
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a cursor -y
Gemini CLI
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a github-copilot -y
OpenCode
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a opencode -y
Windsurf
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a windsurf -y
name: spend-forecast description: > Forecast Claude Code spend to the end of the week or month from the daily session trend on the Agent Monitor dashboard — moving average of daily spend × days remaining, added to spend-to-date. Uses /api/analytics daily_sessions, /api/pricing/cost, and /api/sessions for a per-day cost curve. Use when projecting cost or asking "where will my spend land".
Project where Claude Code spend will end up by the close of the current week or month.
The user provides: **$ARGUMENTS**
This is the forecast horizon — `"week"`, `"month"`, or a specific date. Default to **month** (calendar month-end) when nothing is given, and state the horizon you used.
| Endpoint | Returns | |----------|---------| | `GET /api/analytics` | `{ total_cost, tokens (effective totals, baselines pre-summed), daily_sessions (365d: [{ date, count }]), daily_events, overview, ... }` — `daily_sessions` is the trend the forecast extrapolates | | `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — authoritative spend-to-date and avg cost-per-session input | | `GET /api/sessions?limit=200` | Session list with inline `cost` and `started_at` — group by day for a sharper daily-spend curve than the count-based approximation |
Spend has no native per-day field, so build a daily-spend series and extrapolate:
1. **Spend-to-date** = `total_cost` from `/api/pricing/cost`. 2. **Avg cost per session** = `total_cost / total_session_count`. 3. **Daily spend series**: for the trailing window, `daily_spend[d] ≈ daily_sessions[d].count × avg_cost_per_session`. For a sharper curve, instead sum inline session `cost` grouped by `DATE(started_at)`. 4. **Moving average**: `avg_daily_spend = mean(daily_spend over the trailing 7 days)`. Also compute a 14-day average to gauge whether the trend is accelerating (▲) or cooling (▼). 5. **Remaining days**: days left until the end of the chosen horizon (week = through Sunday; month = through the last calendar day). 6. **Projection**: `projected_total = spend_to_date_this_period + (avg_daily_spend × days_remaining)`.
> Spend-to-date this period: when the trend covers more than the current period, restrict the spend-to-date term to sessions whose `started_at` falls inside the current week/month so the projection isn't inflated by older spend.
`total_cost`, session count, avg cost/session, and how much falls inside the current period.
The 7-day and 14-day moving averages of daily spend, with a ▲/▼ accelerating-vs-cooling read. Show the last 7 days as a compact table (date, sessions, est. spend).
`avg_daily_spend × days_remaining` and the resulting `projected_total` for the horizon. State the days-remaining count explicitly.
If the user mentions a budget, show projected vs. budget, the over/under delta, and the date the budget is projected to be crossed (`days_to_budget = (budget − spend_to_date) / avg_daily_spend`).
Note that the forecast assumes the recent daily pace holds, that daily spend is approximated from session counts unless an inline-cost curve was used, and call out any low-data horizons (e.g. fewer than 7 active days).
Markdown with the trend table and the projection. Currency as USD to 4 decimal places; show moving averages and the projected total prominently. Deltas with ▲/▼.
🚀 A real-time monitoring dashboard for Claude Code & Codex, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, & WebSockets. It tracks sessions, agent activity, tool usage, and subagent orchestration, providing live analytics, a Kanban status board, status notifications, a cute buddy, & an interactive web UI/MacOS/Windows native app.
Debug production-like issues in this repository with disciplined evidence gathering. Use when fixing failing workflows,…
MANDATORY for every coding agent (Claude Code, Codex, or any other) on every change-set — every applicable source file the agent…
MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI…
Operate and maintain the local MCP server for this project. Use when creating MCP host config, troubleshooting tool connectivity,…
Push the current working tree directly to a GitHub PR whose head lives on a **fork**, without creating a new branch and without…
Onboard quickly to this repository. Use when asked to understand architecture, locate ownership, choose the right module, or…
Personalized audit that teaches the advanced Paradev (formerly Superset) features the user isn't using yet (automations, parallel…
Direct actions on one Orchestrator session or PR: stop or interrupt, resume, merge a PR, start a review, screenshot a session's…
Your capability catalog — read this at boot. Lists the temporal date-range skills and the external integrations (reached via the…