Install
openclaw skills install ai-usageCheck AI usage across Anthropic and other providers. Use when: 1. User asks about AI usage, token usage, or quota 2. User says "what's my AI usage" or "how much have I used" 3. User asks about Anthropic/Claude usage or limits 4. User asks about costs or spending on AI 5. Monitoring usage during heartbeats (daily check)
openclaw skills install ai-usagepython3 scripts/usage_check.py # Pretty report with gauges
python3 scripts/usage_check.py --json # JSON output for scripting
claude CLI in PATH) — for Anthropic quotaAnthropic (real quota from OAuth API):
Other Providers (from OpenClaw session logs):
OpenClaw Anthropic breakdown:
GET https://api.anthropic.com/api/oauth/usage using Claude Code's OAuth token from ~/.claude/.credentials.json (requires user:profile scope)claude --print -p "ok" (Claude Code refreshes its own OAuth token on any invocation), then re-reads the updated credentials file. If Claude Code isn't installed, Anthropic quota is skipped gracefully.~/.openclaw/agents/main/sessions/*.jsonl for per-provider/model token and cost data| Variable | Default | Description |
|---|---|---|
OPENCLAW_SESSIONS_DIR | ~/.openclaw/agents/main/sessions | OpenClaw session log directory |
CLAUDE_CREDENTIALS_PATH | ~/.claude/.credentials.json | Claude Code credentials file |
--json for programmatic consumption (cron jobs, dashboards, alerts)