/ccam-cost-guard:daily-budget-checkfrom ccam-cost-guard
Checks today's agent spend against a daily budget using /api/pricing/cost and /api/sessions data. Reports pace, projected overage, and top spending sessions.
Ships in ccam-cost-guard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A fast daily pulse: are you on pace against today's budget?
The user provides: $ARGUMENTS
This is the daily budget in dollars — e.g. "5" or "$5/day". If omitted, ask
for one or derive it from a monthly budget (monthly / days_in_month) and state the
assumption.
| Endpoint | Returns |
|---|---|
GET /api/pricing/cost | { total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] } — fleet-wide spend and the avg cost-per-session used to value today's sessions |
GET /api/sessions?limit=200 | Session list with inline cost and started_at — filter to today (DATE(started_at) = today) to isolate today's spend |
Spend has no per-day field, so isolate today from the session list:
started_at is today (local date).cost over today's sessions. If inline cost is absent for some rows, fall back to today_session_count × (total_cost / total_session_count) and flag it as approximate.fraction_of_day_elapsed = hours_since_midnight / 24. expected_by_now = daily_budget × fraction_of_day_elapsed.today_spend − expected_by_now (▲ ahead of budget / ▼ behind).projected_today = today_spend / fraction_of_day_elapsed (linear extrapolation of the current pace). Guard against tiny fraction_of_day_elapsed early in the day — if under ~0.1, label the projection low-confidence.projected_today − daily_budget (positive = over).One headline line: today's spend / daily budget, and the percent consumed. Verdict: under / on pace / over.
expected_by_now vs actual today_spend, the ▲/▼ pace delta, and the fraction of the day elapsed.
projected_today and the projected overage/headroom vs the daily budget. Note the confidence (low early in the day).
Today's sessions ranked by cost (top 5): name/id, model, cost. Surface any premium-model session inflating the day.
If projected over: one concrete cut (route the priciest session type cheaper — see model-savings; or arm a token_threshold rule via budget-set). If under: confirm headroom and the remaining daily allowance.
Compact Markdown — this is a daily check-in, keep it tight. Currency as USD to 4 decimal places; pace deltas with ▲/▼. Lead with the verdict line.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hoangsonww/claude-code-agent-monitor --plugin ccam-cost-guard5 skills in this plugin
/budget-setDefine 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. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.
/cost-alertReview the configured cost alert rules and the alerts currently fired on the Agent Monitor dashboard, then explain exactly what tripped and why. Uses /api/alerts (fired feed) and /api/alerts/rules (definitions). Use when checking spend alerts or asking why a cost alarm went off.
/model-savingsEstimate the dollars saved by routing eligible Claude Code work to a cheaper model family, using the Agent Monitor pricing engine. Re-prices each model's token mix at the target family's rates and quantifies the delta. Uses /api/pricing (rates), /api/pricing/cost (current per-model spend), /api/sessions, and /api/analytics. Use when hunting for cost cuts or comparing model tiers.
/spend-forecastForecast 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".
5 plugins ship this exact skill · first indexed Aug 10, 2026
Other plugins' skills for the same job