Skills for Real Engineers. Straight from my .agents directory.
budget-set
Agent skill fromhoangsonww/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. 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.
How to install budget-set
npx skills add hoangsonww/Claude-Code-Agent-Monitor# or add only this skill to Claude Code: copy the folder
plugins/ccam-cost-guard/skills/budget-set/
# into
~/.claude/skills/budget-set/ (all projects)
.claude/skills/budget-set/ (one project)
1# Budget Set23Help the user define a spend budget and turn it into a live cost guardrail on the4Agent Monitor dashboard.56## Input78The user provides: **$ARGUMENTS**910This is the budget to set — e.g. `"$50/month"`, `"$10/week"`, or `"200000 tokens"`.11If a period is omitted, treat it as a monthly budget and say so. If no number is12given, read current spend first and propose a target.1314## Data Sources1516| Endpoint | Returns |17|----------|---------|18| `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 |19| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — existing rules, so you don't create a duplicate guardrail |20| `POST /api/alerts/rules` | Create a rule. Body: `{ name, rule_type, config, enabled?, cooldown_seconds? }`. Returns `{ rule }` |2122## How a budget becomes a rule2324The dashboard's alerting engine fires on **tokens**, not dollars. The spend-relevant25rule type is **`token_threshold`**, whose config is `{ total_tokens }` — it fires when26a session's cumulative tokens (input + output + cache_read + cache_write) cross the27threshold. To turn a **dollar** budget into a token ceiling:2829```30blended_rate_per_token = total_cost / total_tokens # from /api/pricing/cost31token_ceiling = budget_dollars / blended_rate_per_token32```33…
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
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
