Agent skill · data analytics · sundial-org
claude-code-usage
Check Claude Code OAuth usage limits (session & weekly quotas). Use when user asks about Claude Code usage, remaining limits, rate limits, or how much Claude usage they have left. Includes automated session refresh reminders and reset detection monitoring.
Why this skill is useful
Adds a script for monitoring Claude Code OAuth usage limits that includes automated reminders and reset detection, which the AI wouldn't generate on its own.
What it needs
Requires curl installed locally. Requires claude-code account access. About 3k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.
What this skill does
Claude Code Usage Check your Claude Code OAuth API usage limits for both session (5-hour) and weekly (7-day) windows. Quick Start Usage Output Text format (default): JSON format (--json): Features 📊 Session limit (5-hour window) - Short-term rate limit 📅 Weekly limit (7-day window) - Long-term rate limit ⚡ Smart caching - 60-second cache to avoid API spam 🎨 Beautiful output - Progress bars, emojis, color-coded status 🔄 Force refresh - --fresh flag to bypass cache 📤 JSON output - Machine-readable format 🔔 Automated monitoring - Get notified when quotas reset Status Indicators 🟢 Green - 0-50% usage (healthy) 🟡 Yellow - 51-80% usage (moderate) 🔴 Red - 81-100% usage (high/critical) Requirements macOS: Uses Keychain to access Claude Code credentials Linux: Uses secret-tool for credential storage Credentials: Must have Claude Code CLI authenticated How It Works 1. Retrieves OAuth token from system keychain 2. Queries api.anthropic.com/api/oauth/usage with OAuth bearer token 3. Parses fivehour and sevenday utilization metrics 4. Calculates time remaining until reset 5. Formats output with progress bars and status indicators 6. Caches result for 60 seconds (configurable) Cache Default cache: /tmp/claude-usage-cache (60s TTL) Override: Examples Check usage before starting work: Integrate with statusline: Get JSON for monitoring: Automated Monitoring Session Refresh Reminders (Recommended) Get notified exactly when your 5-hour session quota refreshes! Quick Setup: This creates a self-scheduling chain of cron jobs that: 1. Checks your current session expiry time 2. Schedules the next reminder for when your session refreshes 3. Notifies you with current usage stats 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sundial-org/claude-code-usage