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
Install / Use
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecastInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of spend-forecast
spend-forecast scores 85/100 on our quality scale, 493rd of 736 Operations skills we index.
Its SKILL.md is 3.5 KB long, well organised into 11 sections and no code examples: a solid amount of guidance for an agent.
With 1,015 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 12 days ago, so spend-forecast is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
spend-forecast compared with similar skills
All 4 of these similar skills score higher than spend-forecast; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| spend-forecast (this skill)by hoangsonww | 85 | 1.0k | 12d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 92.4k | 21d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.5k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 85.9k | today | MCP Server |
| crawl4aiby unclecode | 100 | 84.8k | 1d ago | MCP Server |
Frequently asked questions
- How do I install spend-forecast?
- Run
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast. The install tabs above show the steps for each supported agent. - Which AI agents does spend-forecast work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is spend-forecast safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is spend-forecast still maintained?
- The repository was last updated 12 days ago, so spend-forecast is actively maintained.
Skill content
View source on GitHubname: 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".
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:
- Spend-to-date =
total_costfrom/api/pricing/cost. - Avg cost per session =
total_cost / total_session_count. - 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 sessioncostgrouped byDATE(started_at). - 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 (▼). - Remaining days: days left until the end of the chosen horizon (week = through Sunday; month = through the last calendar day).
- 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_atfalls inside the current week/month so the projection isn't inflated by older spend.
Report Sections
1. Spend to date
total_cost, session count, avg cost/session, and how much falls inside the current period.
2. Daily trend
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).
3. Projection
avg_daily_spend × days_remaining and the resulting projected_total for the horizon. State the days-remaining count explicitly.
4. Budget check (if a budget is known)
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).
5. Confidence & caveats
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).
Output
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 ▲/▼.
Related Skills
Agent-Reach
92.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
85.9k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
84.8kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
