Skills for Real Engineers. Straight from my .agents directory.
spend-forecast
Agent skill fromhoangsonww/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 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 to install spend-forecast
npx skills add hoangsonww/Claude-Code-Agent-Monitor# or add only this skill to Claude Code: copy the folder
plugins/ccam-cost-guard/skills/spend-forecast/
# into
~/.claude/skills/spend-forecast/ (all projects)
.claude/skills/spend-forecast/ (one project)
1# Spend Forecast23Project where Claude Code spend will end up by the close of the current week or month.45## Input67The user provides: **$ARGUMENTS**89This is the forecast horizon — `"week"`, `"month"`, or a specific date. Default to10**month** (calendar month-end) when nothing is given, and state the horizon you used.1112## Data Sources1314| Endpoint | Returns |15|----------|---------|16| `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 |17| `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 |18| `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 |1920## Forecast method2122Spend has no native per-day field, so build a daily-spend series and extrapolate:23241. **Spend-to-date** = `total_cost` from `/api/pricing/cost`.252. **Avg cost per session** = `total_cost / total_session_count`.263. **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)`.27…
Excerpt shown under the repository's MIT license.
More skills in Claude-Code-Agent-Monitor
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
