spend-circuit-breaker
spend-circuit-breaker
OpenClaw has no built-in hard spending cap. This skill monitors session logs to estimate cumulative API cost, alerts at configurable thresholds, and automatically pauses non-essential cron automations when the monthly budget ceiling is hit.
Setup (first run)
Before the skill is useful, record your monthly budget in state:
python3 check.py --set-budget 50 # $50/month hard cap
python3 check.py --set-alert 0.5 0.75 # Alert at 50% and 75%
Cron Wakeup Behaviour
Runs every 4 hours (cron: "0 */4 * * *"). On each wakeup:
- Read
~/.openclaw/skill-state/spend-circuit-breaker/state.yaml— loadmonthly_budget_usdandspend_this_month_usd - Parse OpenClaw session logs from
~/.openclaw/sessions/to estimate new spend sincelast_checked_at(model × token counts × price table)
More from archieindian/openclaw-superpowers
context-window-management
Prevents context overflow on long-running OpenClaw sessions. Use when approaching context limits.
28heartbeat-governor
Enforces per-skill execution budgets for scheduled cron skills — pauses runaway skills that exceed their token or wall-clock budget before they drain your monthly API allowance.
27using-superpowers
Bootstrap skill — teaches the agent how to find and invoke skills. Use when starting any new task or session.
23long-running-task-management
Breaks multi-hour tasks into checkpointed stages with resume capability. Use when a task is expected to take more than 30 minutes or multiple sessions.
22fact-check-before-trust
Triggers a secondary verification pass for any agent output containing factual claims, numbers, dates, or named entities before the output is acted on
21persistent-memory-hygiene
Keeps OpenClaw's memory store clean, structured, and useful. Use at session end and during periodic maintenance.
20