mcpbeat Sign in

Spend Forecast Skill for Claude

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

906 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
867
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast

The instruction itself

11 sections, as written by the author

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_cost from /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 session cost grouped by DATE(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_at falls 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 ▲/▼.

Other skills for the same job

different authors, same section of the catalogue
Scientific Visualization
by christophacham
×3

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

26k tokens scripts
Caam
by Dicklesworthstone
×2

Coding Agent Account Manager - Sub-100ms account switching for AI coding CLIs with fixed-cost subscriptions. Vault profiles, isolated profiles for parallel sessions, smart rotation with health scoring, cooldown tracking, automatic failover, TUI dashboard. Go CLI.

4k tokens
Cloud Claw
by internet-court
×1

Use this umbrella skill when the request spans multiple Cloud Claw user-facing domains, especially launching a new AltClaw or OpenClaw VM and then managing lifecycle, logs, renewal, or dashboard access through the local altllm cloud-claw-* commands in this repository.

896 tokens
Claude D3js Skill
by ComeOnOliver
×1

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visua...

23k tokens
Reporting Issues
by ComeOnOliver
×1

Use this skill when you need to report on a troubleshooting session

2k tokens
Accessing Mlflow
by NVIDIA
vendor

Query and browse evaluation results stored in MLflow. Use when the user wants to look up runs by invocation ID, compare metrics across models, fetch artifacts (configs, logs, results), or set up the MLflow MCP server. ALWAYS triggers on mentions of MLflow, experiment results, run comparison, invocation IDs in the context of results, or MLflow MCP setup.

1k tokens
Grow App
by wondelai

Guided journey from an app people sign up for and then quietly abandon to a sealed retention engine with a habit loop, an activated first run, and one metric the whole team trusts. Orchestrates eight skills phase by phase - hooked-ux, improve-retention, continuous-discovery, lean-ux, inspired-product, lean-analytics, microinteractions, drive-motivation - asking the user questions at every decision point and recording results in the project docs/ folder (PRODUCT.md, METRICS.md, GROW-APP-PLAN.md) so the journey resumes across sessions. Use when the user wants to lift activation and retention, design a habit loop, fix a leaky onboarding funnel, or says ''users sign up then disappear''. Do not use to fix broken UX or performance that no engagement mechanic can paper over - run improve-app first; if there is no app yet, use create-app. For one framework in isolation, invoke that skill directly.

6k tokens
Improve Business
by wondelai

Guided journey from a stalled, plateaued business to one with an honest diagnosis, a working operating rhythm, and offers repriced to real value. Orchestrates eight skills phase by phase - good-strategy-bad-strategy, traction-eos, high-output-management, team-topologies, drive-motivation, lean-analytics, negotiation, monetizing-innovation - asking the user questions at every decision point and recording results in the project docs/ folder (STRATEGY.md, OPERATIONS.md, METRICS.md, IMPROVE-BUSINESS-PLAN.md) so the journey resumes across sessions. Use when the user wants to fix a business that has plateaued, diagnose why growth stalled, tighten strategy and execution, re-motivate a team, or says ''revenue is flat and I do not know why''. Starting from scratch with no customers: use create-business. Once the fundamentals work and the goal is expansion: use grow-business. When the product itself drags the business down: use improve-app. For one framework in isolation, invoke that skill directly.

6k tokens

How to use it

Copy the folder

Take hoangsonww/spend-forecast from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.