Daily budget check
Skill hoangsonww/Claude-Code-Agent-Monitor/plugins/ccam-cost-guard/skills/daily-budget-check
π A real-time monitoring dashboard for Claude Code, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, and WebSockets. It tracks sessions, agent activity, tool usage, and subagent orchestration, providing live analytics, a Kanban status board, status notifications, a cute buddy, and an interactive web UI/MacOS/Windows native app.
npx -y skills add hoangsonww/Claude-Code-Agent-Monitor --skill daily-budget-checkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Run a daily spend check-in against a daily budget on the Agent Monitor dashboard β today's spend vs the daily target, pace through the day, and the projected overage if the current pace holds. Uses /api/pricing/cost and /api/sessions (grouped by started_at = today). Use for a quick daily spend check-in or a morning/evening budget pulse.
SKILL.md
3.0 KB, as published. Nobody here has run it
Daily Budget Check
A fast daily pulse: are you on pace against today's budget?
Input
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.
Data Sources
| 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 |
Method
Spend has no per-day field, so isolate today from the session list:
- Today's sessions = sessions whose
started_atis today (local date). - Today's spend = sum of inline
costover today's sessions. If inlinecostis absent for some rows, fall back totoday_session_count Γ (total_cost / total_session_count)and flag it as approximate. - Pace:
fraction_of_day_elapsed = hours_since_midnight / 24.expected_by_now = daily_budget Γ fraction_of_day_elapsed. - Pace delta =
today_spend β expected_by_now(β² ahead of budget / βΌ behind). - End-of-day projection:
projected_today = today_spend / fraction_of_day_elapsed(linear extrapolation of the current pace). Guard against tinyfraction_of_day_elapsedearly in the day β if under ~0.1, label the projection low-confidence. - Projected overage =
projected_today β daily_budget(positive = over).
Report Sections
1. Today vs budget
One headline line: today's spend / daily budget, and the percent consumed. Verdict: under / on pace / over.
2. Pace
expected_by_now vs actual today_spend, the β²/βΌ pace delta, and the fraction of the day elapsed.
3. End-of-day projection
projected_today and the projected overage/headroom vs the daily budget. Note the confidence (low early in the day).
4. Today's drivers
Today's sessions ranked by cost (top 5): name/id, model, cost. Surface any premium-model session inflating the day.
5. Nudge
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.
Output
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.