From sundial-org-awesome-openclaw-skills-4
Checks Claude Code OAuth API usage for 5-hour session and 7-day weekly quotas. Displays progress bars, reset timers, status indicators, with caching, JSON output, and refresh reminders.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4This skill uses the workspace's default tool permissions.
Check your Claude Code OAuth API usage limits for both session (5-hour) and weekly (7-day) windows.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Check your Claude Code OAuth API usage limits for both session (5-hour) and weekly (7-day) windows.
cd {baseDir}
./scripts/claude-usage.sh
# Default: show cached usage (if fresh)
./scripts/claude-usage.sh
# Force refresh from API
./scripts/claude-usage.sh --fresh
# JSON output
./scripts/claude-usage.sh --json
# Custom cache TTL
./scripts/claude-usage.sh --cache-ttl 300
Text format (default):
๐ฆ Claude Code Usage
โฑ๏ธ Session (5h): ๐ข โโโโโโโโโโ 40%
Resets in: 2h 15m
๐
Weekly (7d): ๐ก โโโโโโโโโโ 60%
Resets in: 3d 8h
JSON format (--json):
{
"session": {
"utilization": 40,
"resets_in": "2h 15m",
"resets_at": "2026-01-19T22:15:00Z"
},
"weekly": {
"utilization": 60,
"resets_in": "3d 8h",
"resets_at": "2026-01-22T04:00:00Z"
},
"cached_at": "2026-01-19T20:00:00Z"
}
--fresh flag to bypass cachesecret-tool for credential storageapi.anthropic.com/api/oauth/usage with OAuth bearer tokenfive_hour and seven_day utilization metricsDefault cache: /tmp/claude-usage-cache (60s TTL)
Override:
CACHE_FILE=/tmp/my-cache CACHE_TTL=300 ./scripts/claude-usage.sh
Check usage before starting work:
./scripts/claude-usage.sh --fresh
Integrate with statusline:
usage=$(./scripts/claude-usage.sh | grep "Session" | awk '{print $NF}')
echo "Session: $usage"
Get JSON for monitoring:
./scripts/claude-usage.sh --json | jq '.session.utilization'
Get notified exactly when your 5-hour session quota refreshes!
Quick Setup:
./scripts/session-reminder.sh
This creates a self-scheduling chain of cron jobs that:
What You'll Get:
๐ Claude Code Session Status
โฑ๏ธ Current usage: 44%
โฐ Next refresh: 2h 15m
Your 5-hour quota will reset soon! ๐ฆ
โ
Next reminder scheduled for: Jan 22 at 01:22 AM
How It Works:
claude-usage.sh to find the exact session reset timeBenefits:
Get automatic notifications when your Claude Code quotas reset by polling usage.
Quick Setup:
# Test once
./scripts/monitor-usage.sh
# Setup automated monitoring (runs every 30 minutes)
./scripts/setup-monitoring.sh
Or add via Clawdbot directly:
# Check every 30 minutes
clawdbot cron add --cron "*/30 * * * *" \
--message "cd /Users/ali/clawd/skills/claude-code-usage && ./scripts/monitor-usage.sh" \
--name "Claude Code Usage Monitor" \
--session isolated --deliver --channel telegram
What You'll Get:
๐ Claude Code Session Reset!
โฑ๏ธ Your 5-hour quota has reset
๐ Usage: 2%
โฐ Next reset: 4h 58m
Fresh usage available! ๐ฆ
How It Works:
/tmp/claude-usage-state.jsonCustomization:
# Change check interval
clawdbot cron add --cron "*/15 * * * *" ... # Every 15 minutes
clawdbot cron add --cron "0 * * * *" ... # Every hour
# Custom state file location
STATE_FILE=/path/to/state.json ./scripts/monitor-usage.sh
| Feature | Session Reminder | Reset Detection |
|---|---|---|
| Accuracy | โ Exact minute | ~30min window |
| API calls | Minimal | Every check |
| Notification timing | Right on reset | Up to 30min delay |
| Setup | One command | One command |
| Maintenance | Self-scheduling | Cron runs forever |
Recommendation: Use Session Reminder for precise, real-time notifications.
No credentials found:
claude once to trigger OAuth flowAPI request failed:
--fresh to force new requestLinux users:
Install libsecret for credential storage:
# Debian/Ubuntu
sudo apt install libsecret-tools
# Fedora/RHEL
sudo dnf install libsecret