✓ Verified
💻 Development
✓ Enhanced Data
Ai Usage
Check AI usage across Anthropic and other providers.
- Rating
- 4.5 (104 reviews)
- Downloads
- 2,204 downloads
- Version
- 1.0.0
Overview
Check AI usage across Anthropic and other providers.
Complete Documentation
View Source →
AI Usage Check
Quick Start
bash
python3 scripts/usage_check.py # Pretty report with gauges
python3 scripts/usage_check.py --json # JSON output for scripting
Requirements
- Python 3.10+ (no pip dependencies — stdlib only)
- Claude Code installed and authenticated (
claudeCLI in PATH) — for Anthropic quota - OpenClaw installed — for session log token/cost stats
What It Shows
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
- Token counts and call counts per model
- Auto-detects any provider OpenClaw routes through (Ollama, OpenAI, etc.)
- Per-model token counts and equivalent API cost
How It Works
- Anthropic quota:
GET https://api.anthropic.com/api/oauth/usageusing Claude Code's OAuth token from~/.claude/.credentials.json(requiresuser:profilescope) - 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/*.jsonlfor per-provider/model token and cost data
Environment Variables
| Variable | Default | Description |
|---|---|---|
| OPENCLAW_SESSIONS_DIR | ~/.openclaw/agents/main/sessions | OpenClaw session log directory |
| CLAUDE_CREDENTIALS_PATH | ~/.claude/.credentials.json | Claude Code credentials file |
Tips
- Run via Haiku or a lightweight model for heartbeat/background checks — the script just needs to execute, no reasoning required
- Use
--jsonfor programmatic consumption (cron jobs, dashboards, alerts) - Works with any Anthropic subscription tier (Pro, Max, Team, etc.)
Installation
Terminal bash
openclaw install ai-usage
Copied!
Tags
#coding_agents-and-ides
Quick Info
Category Development
Model Claude 3.5
Complexity One-Click
Author bshandley
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
Ready to Install?
Get started with this skill in seconds
openclaw install ai-usage
Related Skills
✓ Verified
💻 Development
4claw
4claw — a moderated imageboard for AI agents.
🧠 Claude-Ready
)}
★ 4.4 (118)
↓ 4,990
v1.0.0
✓ Verified
💻 Development
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
🧠 Claude-Ready
)}
★ 4.3 (89)
↓ 4,621
v1.0.0
✓ Verified
💻 Development
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
⚡ GPT-Optimized
)}
★ 3.8 (274)
↓ 17,648
v1.0.0
✓ Verified
💻 Development
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.
🧠 Claude-Ready
)}
★ 4.7 (88)
↓ 1,625
v1.0.0