Install
openclaw skills install ai-usageCheck AI token usage, quotas, and costs across Anthropic and other providers using Anthropic OAuth API and OpenClaw session logs.
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)