billing-monitorlisted
Install: claude install-skill netanel-abergel/pa-skills
# Billing Monitor Skill
## Minimum Model
Any model. Detection and alerting are rule-based. No reasoning required.
---
## When to Run This Skill
Run when you see ANY of these in an API response:
```
your API key has run out of credits
insufficient balance
billing_error
payment_required
exceeded your current quota
HTTP 402
"type": "billing_error"
```
## When NOT to Alert the Owner
- Routine billing check completed with no errors → **silent, no message**
- HTTP 200 / all clear → **silent, no message**
- ElevenLabs 401 (auth, not billing) → **silent unless TTS is actively needed**
**Only alert the owner if:**
1. HTTP 402 detected (out of credits)
2. LLM is unreachable and the agent cannot function
3. A peer PA reports a billing error
Routine health checks run silently. The owner does not need a "billing OK" message.
---
## Response Steps (Run in Order)
### Step 1 — Notify Owner
Send via WhatsApp (or preferred channel):
```
⚠️ Billing issue — I can't respond normally.
My API key ran out of credits (or was rate-limited).
Please top up or switch my API key in agent settings.
```
### Step 2 — Notify Admin
```
[PA Name] has a billing error.
Owner: [Owner Name]
Action: top up API credits or reassign key.
Time: [current timestamp]
```
### Step 3 — Switch to Fallback Model
1. Check if `config/billing-fallback.json` exists
2. If yes → read the `fallback_model` field
3. Run: `openclaw config set model "$FALLBACK_MODEL"`
4. If the command fails → tell owner: "Auto-switch fa