Install
openclaw skills install clawcostTrack OpenClaw agent costs. Check daily/weekly spending and model breakdown.
openclaw skills install clawcostRun this command:
python3 {baseDir}/scripts/clawcost.py --budget 10
JSON with:
balance: {initial, spent, remaining} or nulltoday: cost, budget, pctweek: total week costtotal: all-time cost, tokensmodels: breakdown all-timemodels_today: breakdown for today onlydaily: cost per day (last 7 days)User sets INITIAL balance (when they top up):
python3 {baseDir}/scripts/clawcost.py --set-balance 50.00
Remaining auto-calculates: initial - total_spent
Tone: Friendly, like a helpful assistant checking expenses. Use emojis sparingly.
Format: Use tree-style (├ └) for clean output:
💰 clawleaks
├ Balance $42.98 / $50 remaining
├ Today $1.36 / $10 (14%) ✅
├ Week $7.02
└ Total $7.02 (15.5M tok)
📈 Sonnet $3.99 (57%) • Haiku $2.06 (29%) • Opus $0.97 (14%)
Rules:
Alerts (IMPORTANT):
today.pct > 80%: Start with ⚠️ "Warning: Daily budget {pct}% used!"today.pct > 100%: Start with 🚨 "OVER BUDGET! ${cost} spent"balance.remaining < 5: Warn "💸 Low balance: ${remaining} left"balance is null: Suggest "Set initial balance with --set-balance"Contextual: