Token Panel ULTIMATE
๐๏ธ Know your limits. Stay within them. Maximize your capacity.
Real-time usage tracking for Claude Max, Gemini, and Manus โ all in one place.
Features
| Provider | What It Tracks |
|---|---|
| Claude Max | 5-hour window, 7-day window, reset times |
| ChatGPT / OpenAI | Per-model API rate limits (requests + tokens), Plus subscription caps |
| Gemini | RPD/RPM/TPM per model, bottleneck detection |
| Manus | Daily refresh, monthly credits, addon balance |
Plus a webchat widget that shows it all at a glance.
Claude Max Usage
Track your Claude Max subscription usage in real-time.
What It Shows
- 5-hour window: Rolling usage percentage and reset time
- 7-day window: Weekly usage percentage and reset time
- Model-specific limits: Sonnet and Opus allocations
Usage
# Pretty print current usage
python3 {baseDir}/scripts/claude-usage-fetch.py
# Update JSON file for the widget
python3 {baseDir}/scripts/claude-usage-fetch.py --update
# Raw JSON output
python3 {baseDir}/scripts/claude-usage-fetch.py --json
Requirements
- Claude Code CLI installed and authenticated (
claude /login)
Auto-Update (Optional)
# Add to crontab for automatic updates every 5 minutes
*/5 * * * * python3 {baseDir}/scripts/claude-usage-fetch.py --update
Gemini Multi-Model Tracking
Track the bottleneck metric (highest % among RPD, RPM, TPM) for each model.
Model Limits (Tier 1)
| Model | RPM | TPM | RPD |
|---|---|---|---|
| gemini-3-pro | 25 | 1M | 250 |
| gemini-2.5-pro | 25 | 1M | 250 |
| gemini-2.5-flash | 2000 | 4M | โ |
| gemini-3-flash | 1000 | 1M | 10K |
| gemini-2.0-flash | 2000 | 4M | โ |
Fallback Strategy
gemini-3-pro โ gemini-2.5-pro โ gemini-2.5-flash(โ) โ gemini-3-flash โ gemini-2.0-flash(โ)
Most capable first, unlimited RPD models as safety nets.
Reset time: Midnight Pacific (RPD resets daily)
JSON Format
Store in memory/gemini-usage.json:
{
"models": {
"gemini-3-pro": {
"limits": { "rpm": 25, "tpm": 1000000, "rpd": 250 },
"usage": { "rpm": 17, "tpm": 1380000, "rpd": 251 },
"status": "exceeded"
}
}
}
Manus Credit Monitoring
Credit Structure
- Monthly: 4,000 credits (resets on renewal)
- Daily refresh: 300 credits (resets 01:00)
- Addon: Purchased credits (never expire)
Usage
# Pretty print current usage
python3 {baseDir}/scripts/manus-usage-fetch.py
# Update JSON file for the widget
python3 {baseDir}/scripts/manus-usage-fetch.py --update
# Raw JSON output
python3 {baseDir}/scripts/manus-usage-fetch.py --json
Requirements
MANUS_API_KEYenvironment variable set
Auto-Update (Optional)
# Add to crontab for automatic updates every 15 minutes
*/15 * * * * MANUS_API_KEY=your-key python3 {baseDir}/scripts/manus-usage-fetch.py --update
JSON Format
Store in memory/manus-usage.json (auto-generated by fetch script):
{
"credits": {
"total_all_time": 8407,
"breakdown": {
"monthly": { "used": 480, "limit": 4000, "remaining": 3520 },
"addon": 7296
},
"daily_refresh": { "used": 0, "remaining": 300, "limit": 300, "reset_time": "01:00 local" }
},
"today": { "tasks": 0, "credits_used": 0, "breakdown": [] }
}
ChatGPT / OpenAI Usage
Track API rate limits per model and ChatGPT Plus subscription caps.
What It Shows
- API rate limits: Requests/min, tokens/min per model (from response headers)
- Plus caps: GPT-4o (150/3hr), o3 (100/week), o4-mini (300/day), etc.
- Models probed: gpt-4o, gpt-4o-mini, gpt-4, gpt-3.5-turbo, o3-mini
Usage
# Pretty print current usage
python3 {baseDir}/scripts/chatgpt-usage-fetch.py
# Update JSON file for the widget
python3 {baseDir}/scripts/chatgpt-usage-fetch.py --update
# Raw JSON output
python3 {baseDir}/scripts/chatgpt-usage-fetch.py --json
Requirements
OPENAI_API_KEYenvironment variable set- Key needs chat completion permissions (rate limit headers are extracted from minimal probe calls)
- For billing/cost data: key needs
api.usage.readscope (admin key)
Auto-Update (Optional)
# Add to crontab for automatic updates every 10 minutes
*/10 * * * * OPENAI_API_KEY=your-key python3 {baseDir}/scripts/chatgpt-usage-fetch.py --update
Budget-Aware Behavior
Add to your SOUL.md:
## Resource Awareness
**Behavior by budget level:**
| Budget | Behavior |
|--------|----------|
| ๐ข >50% | Normal operations |
| ๐ก 30-50% | Be concise |
| ๐ 10-30% | Defer non-essential tasks |
| ๐ด <10% | Minimal responses only |
Agent Self-Check
import json
from pathlib import Path
def get_claude_usage():
path = Path.home() / ".openclaw/workspace/memory/claude-usage.json"
if path.exists():
data = json.loads(path.read_text())
return data.get("limits", {}).get("five_hour", {}).get("utilization", 0)
return 0
Webchat Widget
A Tampermonkey userscript that displays real-time usage in OpenClaw webchat.
Installation
1. Install Tampermonkey
| Browser | Link |
|---|---|
| Chrome | Chrome Web Store |
| Firefox | Firefox Add-ons |
| Edge | Edge Add-ons |
| Safari | Mac App Store |
2. Create New Script
- Click Tampermonkey icon โ "Create a new script..."
- Delete all default content
- Copy entire contents of
{baseDir}/scripts/budget-panel-widget.user.js - Paste into Tampermonkey
- Ctrl+S to save
3. Refresh Webchat
Go to http://localhost:18789 and refresh. Panel appears bottom-left.
Troubleshooting
- Panel not appearing? Check Tampermonkey is enabled
- Shows 0%? Run
claude-usage-fetch.py --updatefirst - MIME error? Full restart:
openclaw gateway stop && openclaw gateway start
Files
token-panel-ultimate/
โโโ SKILL.md
โโโ package.json
โโโ scripts/
โโโ claude-usage-fetch.py # Claude Max usage fetcher
โโโ manus-usage-fetch.py # Manus credit usage fetcher
โโโ budget-panel-widget.user.js # Webchat widget
Gateway Plugin
For full integration, the budget-panel gateway plugin is available in our OpenClaw fork:
Repository: github.com/globalcaos/clawdbot-moltbot-openclaw
The plugin provides:
budget.usagegateway method for real-time data- Automatic JSON file reading
- Multi-provider aggregation
Install the plugin at extensions/budget-panel/ in your OpenClaw installation.
Related Skills
- shell-security-ultimate - Command security enforcement
- agent-memory-ultimate - Memory system with usage logs
Credits
Created by Oscar Serra with the help of Claude (Anthropic).
Built during a late-night hacking session, February 2026.