budget-set
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. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing
Install / Use
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill budget-setInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of budget-set
budget-set scores 85/100 on our quality scale, 489th of 736 Operations skills we index.
Its SKILL.md is 4.0 KB long, well organised into 12 sections with 2 code examples: a solid amount of guidance for an agent.
With 1,015 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 12 days ago, so budget-set is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
budget-set compared with similar skills
All 4 of these similar skills score higher than budget-set; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| budget-set (this skill)by hoangsonww | 85 | 1.0k | 12d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 92.4k | 21d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.5k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 85.9k | today | MCP Server |
| crawl4aiby unclecode | 100 | 84.8k | 1d ago | MCP Server |
Frequently asked questions
- How do I install budget-set?
- Run
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill budget-set. The install tabs above show the steps for each supported agent. - Which AI agents does budget-set work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is budget-set safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is budget-set still maintained?
- The repository was last updated 12 days ago, so budget-set is actively maintained.
Skill content
View source on GitHubname: budget-set description: > 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. 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.
Budget Set
Help the user define a spend budget and turn it into a live cost guardrail on the Agent Monitor dashboard.
Input
The user provides: $ARGUMENTS
This is the budget to set — e.g. "$50/month", "$10/week", or "200000 tokens".
If a period is omitted, treat it as a monthly budget and say so. If no number is
given, read current spend first and propose a target.
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 }] } — current spend, used to size the budget and compute the blended $/token rate |
| GET /api/alerts/rules | { rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] } — existing rules, so you don't create a duplicate guardrail |
| POST /api/alerts/rules | Create a rule. Body: { name, rule_type, config, enabled?, cooldown_seconds? }. Returns { rule } |
How a budget becomes a rule
The dashboard's alerting engine fires on tokens, not dollars. The spend-relevant
rule type is token_threshold, whose config is { total_tokens } — it fires when
a session's cumulative tokens (input + output + cache_read + cache_write) cross the
threshold. To turn a dollar budget into a token ceiling:
blended_rate_per_token = total_cost / total_tokens # from /api/pricing/cost
token_ceiling = budget_dollars / blended_rate_per_token
Compute total_tokens by summing the four token columns across the cost breakdown.
Rule fields explained
| Field | Meaning |
|-------|---------|
| name | Human label shown in the alert feed (e.g. "Monthly $50 budget"). Required, non-empty. |
| rule_type | "token_threshold" for a spend guardrail. (Other types: event_pattern, inactivity, status_duration — not spend-related.) |
| config.total_tokens | Positive integer token ceiling. A session crossing it fires the alert. Derive from the dollar budget as above. |
| enabled | true to arm immediately (default), false to stage it. |
| cooldown_seconds | Minimum seconds between re-fires for the same scope. Default 300. Raise it (e.g. 3600) so a single overspending session doesn't spam the feed. |
Report Sections
1. Current spend snapshot
From /api/pricing/cost: total_cost, total tokens, and the blended $/Mtok rate. State how much of the proposed budget is already consumed.
2. Budget interpretation
Restate the parsed budget (amount + period). If converting dollars → tokens, show the blended rate and the token_ceiling arithmetic.
3. Existing guardrails
List any token_threshold rules from /api/alerts/rules so the user sees what is already in place; warn before creating a near-duplicate.
4. Proposed alert rule
Show the exact JSON body you would POST, with each field annotated. Then give the ready-to-run command (only run it on explicit confirmation):
curl -s -X POST http://localhost:4820/api/alerts/rules \
-H 'Content-Type: application/json' \
-d '{"name":"Monthly $50 budget","rule_type":"token_threshold","config":{"total_tokens":12500000},"cooldown_seconds":3600}'
5. Confirmation
On success, echo the returned rule (id, name, config). Remind the user that the rule is per-session token usage — to track a whole-period dollar budget, pair it with /ccam-cost-guard:forecast and the spend-forecast skill.
Output
Markdown with the snapshot, the conversion math, and the annotated rule body. Currency as USD to 4 decimal places; token counts with thousands separators. Only POST after the user confirms — never create a rule silently.
Related Skills
Agent-Reach
92.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
85.9k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
84.8kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
