Agent skill · Data & Analytics

spend-forecast

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".

hoangsonww869★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: plugins/ccam-cost-guard/skills/spend-forecast/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 869
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Spend Forecast Project where Claude Code spend will end up by the close of the current week or month. ## Input 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. ## Data Sources | 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 | ## Forecast method 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_

What's inside
Steps it walks through
  1. Input
  2. Data Sources
  3. Forecast method
  4. Report Sections
  5. 1. Spend to date
  6. 2. Daily trend
  7. 3. Projection
  8. 4. Budget check (if a budget is known)
  9. 5. Confidence & caveats
  10. Output
More from Claude-Code-Agent-Monitor
All skills →
About this skill
What does the spend-forecast skill do?

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".

How do I install it?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From hoangsonww/Claude-Code-Agent-Monitor, a repository with 869 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going