Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Check AI token usage, quotas, and costs across Anthropic and other providers using Anthropic OAuth API and OpenClaw session logs.
Check AI token usage, quotas, and costs across Anthropic and other providers using Anthropic OAuth API and OpenClaw session logs.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
python3 scripts/usage_check.py # Pretty report with gauges python3 scripts/usage_check.py --json # JSON output for scripting
Python 3.10+ (no pip dependencies โ stdlib only) Claude Code installed and authenticated (claude CLI in PATH) โ for Anthropic quota OpenClaw installed โ for session log token/cost stats
Anthropic (real quota from OAuth API): Weekly utilization % with reset countdown 5-hour rolling window % Model-specific weekly (Sonnet, Opus) when available Extra usage spend vs monthly limit Other Providers (from OpenClaw session logs): Token counts and call counts per model Auto-detects any provider OpenClaw routes through (Ollama, OpenAI, etc.) OpenClaw Anthropic breakdown: Per-model token counts and equivalent API cost
Anthropic quota: GET https://api.anthropic.com/api/oauth/usage using Claude Code's OAuth token from ~/.claude/.credentials.json (requires user:profile scope) Token auto-refresh: If the token is expired, the script automatically refreshes it by invoking 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. Session stats: Parses ~/.openclaw/agents/main/sessions/*.jsonl for per-provider/model token and cost data
VariableDefaultDescriptionOPENCLAW_SESSIONS_DIR~/.openclaw/agents/main/sessionsOpenClaw session log directoryCLAUDE_CREDENTIALS_PATH~/.claude/.credentials.jsonClaude Code credentials file
Run via Haiku or a lightweight model for heartbeat/background checks โ the script just needs to execute, no reasoning required Use --json for programmatic consumption (cron jobs, dashboards, alerts) Works with any Anthropic subscription tier (Pro, Max, Team, etc.)
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.