Agent skill

Spend Forecast

by hoangsonww in hoangsonww/Claude-Code-Agent-Monitor

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.

MITAuto-check passed

Install Spend Forecast

skills CLI
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hoangsonww/Claude-Code-Agent-Monitor spend-forecast --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ccam-cost-guard/skills/spend-forecast .claude/skills/spend-forecast && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spend-forecast
GitHub stars
1.1k
Token cost
~905 tokens
SKILL.md length
411 words
Files
2
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 5 steps: Spend to date → Daily trend → Projection → …
  • Projecting cost
  • SKILL.md covers Input, Data Sources, Forecast method and Report Sections, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Spend Forecast is an agent skill from hoangsonww/Claude-Code-Agent-Monitor. 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 dailysessions, /api/pricing/cost, and /api/sessions for a per-day cost curve. Use when projecting cost or asking "where will my spend land".

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

The repository describes itself as: 🚀 A real-time monitoring dashboard for Claude Code & Codex, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, & WebSockets. It tracks sessions, agent activity… The licence is MIT.

When your agent uses it

  • Projecting cost
  • Asking where will my spend land

Example prompts

  • “where will my spend land”
  • “/spend-forecast”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Spend to date
  2. Daily trend
  3. Projection
  4. Budget check (if a budget is known)
  5. Confidence & caveats

What it can do on your machine

Read from SKILL.md and the folder at commit a06db03. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spend Forecast loads about 905 tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 411 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~905

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hoangsonww/Claude-Code-Agent-Monitor at commit a06db03, republished under its MIT licence (© hoangsonww). 411 words, ~905 tokens.

Download SKILL.mdSave it as .claude/skills/spend-forecast/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
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".

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

EndpointReturns
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=200Session 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_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.

Show full SKILL.md (164 more words)Show less

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 ▲/▼.

© hoangsonww, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/ccam-cost-guard/skills/spend-forecast of hoangsonww/Claude-Code-Agent-Monitor.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit a06db03

Compare with similar skills

Spend Forecast next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spend Forecast compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spend Forecast this skillhoangsonww/Claude-Code-Agent-Monitor1.1k—~905Automated safety check: PassMIT
Timesfm ForecastingK-Dense-AI/scientific-agent-skills48k1 repos~2.4kAutomated safety check: NotesApache-2.0
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
Forecast Accuracy Reviewdavila7/claude-code-templates33k—~884Automated safety check: PassMIT
Weekly Project Digeststhedotmack/claude-mem99k—~3.5kAutomated safety check: PassApache-2.0
Weekly Review PlanningNousResearch/hermes-agent252k—~994Automated safety check: PassMIT

Similar skills

  • Timesfm Forecasting

    K-Dense-AI/scientific-agent-skills

    Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation.

    48k GitHub starsUsed in 1 repo~2.4k tokens
    Data & AnalyticsAuto-check: notes
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 10 days ago
    Data & AnalyticsAuto-check passed
  • Forecast Accuracy Review

    davila7/claude-code-templates

    Evaluate demand-forecast quality honestly - WMAPE, bias and Forecast Value Added against a naive benchmark over a rolling-origin backtest.

    33k GitHub stars~884 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Weekly Project Digests

    thedotmack/claude-mem

    Turns a project's claude-mem timeline into a week-by-week narrative, splitting it by ISO week and running one subagent per week that receives the prior week's carry-forward block.

    99k GitHub stars~3.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Weekly Review Planning

    NousResearch/hermes-agent

    Weekly reset: commitments, stalled work, next-week plan. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~994 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Commercial Forecaster

    alirezarezvani/claude-skills

    A skill your agent uses when building a quarterly bookings forecast, ARR projection, pipeline forecast, NRR projection, or commit/best-case/pipe-only board number — especially when the CRO needs to…

    28k GitHub stars~3k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed

More from hoangsonww/Claude-Code-Agent-Monitor

All 78 skills in this repo
  • Version Release

    hoangsonww/Claude-Code-Agent-Monitor

    Choose and apply the correct semantic version bump for this repository.

    1.1k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Budget Set

    hoangsonww/Claude-Code-Agent-Monitor

    Define a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard.

    1.1k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Cache Efficiency

    hoangsonww/Claude-Code-Agent-Monitor

    Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (totalcacheread / (totalcacheread + totalinput)), cachewrite vs cacheread reuse, cache-read…

    1.1k GitHub stars~966 tokensUpdated today
    Auto-check passed
  • Cost Breakdown

    hoangsonww/Claude-Code-Agent-Monitor

    Break down Claude Code costs using the Agent Monitor pricing engine.

    1.1k GitHub stars~845 tokensUpdated today
    Auto-check passed
  • Dag Map

    hoangsonww/Claude-Code-Agent-Monitor

    Render the multi-agent orchestration DAG for a session — parent→child subagent edges, tree depth, and fan-out — from the Agent Monitor workflow intelligence API.

    1.1k GitHub stars~564 tokensUpdated today
    Auto-check passed
  • Dashboard Status

    hoangsonww/Claude-Code-Agent-Monitor

    Quick dashboard health and status overview — checks the Agent Monitor API (port 4820), reports session/agent/event counts from /api/stats, confirms WebSocket connectivity, reads the redacted hook…

    1.1k GitHub stars~600 tokensUpdated today
    Auto-check passed

Questions about Spend Forecast

What does Spend Forecast 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. Spend Forecast is an agent skill from hoangsonww/Claude-Code-Agent-Monitor. 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.

When should I use Spend Forecast?

Spend Forecast fits situations like: projecting cost; asking where will my spend land.

How do I install Spend Forecast in Claude Code?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a claude-code`. Or copy the skill folder (plugins/ccam-cost-guard/skills/spend-forecast in hoangsonww/Claude-Code-Agent-Monitor) into .claude/skills/spend-forecast in your project. Claude Code loads it when a task matches its description.

How do I install Spend Forecast in Codex?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a codex`. Or copy the skill folder (plugins/ccam-cost-guard/skills/spend-forecast in hoangsonww/Claude-Code-Agent-Monitor) into .agents/skills/spend-forecast in your project. Codex loads it when a task matches its description.

Can I use Spend Forecast in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill spend-forecast -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spend-forecast, .gemini/skills/spend-forecast, .github/skills/spend-forecast and .opencode/skills/spend-forecast in your project.

What does Spend Forecast need to run?

SKILL.md names no scripts, command-line tools or credentials: Spend Forecast is instructions for the agent only.

Does Spend Forecast access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spend Forecast safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spend Forecast use?

Spend Forecast is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spend Forecast use?

About 905 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Spend Forecast?

Skills that share tags, products or a category with Spend Forecast: Timesfm Forecasting (K-Dense-AI/scientific-agent-skills, 48k stars), TimesFM Forecasting (google-research/timesfm, 34k stars), Forecast Accuracy Review (davila7/claude-code-templates, 33k stars) and Weekly Project Digests (thedotmack/claude-mem, 99k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spend Forecast?

hoangsonww (a GitHub user) maintains it in hoangsonww/Claude-Code-Agent-Monitor, which has 1,058 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 10, 2026.

Source: hoangsonww/Claude-Code-Agent-Monitor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.