claude-code-usage

Report Claude Code OAuth session and weekly quota usage with JSON output.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/MagicWifiMoney/openclaw-starter-kit --skill claude-code-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-usage
Source: https://github.com/MagicWifiMoney/openclaw-starter-kit/tree/main/skills-custom/extras/claude-code-usage
Command: npx skills add https://github.com/MagicWifiMoney/openclaw-starter-kit --skill claude-code-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, claude, secret-tool, clawdbot, and includes scripts (resource) components.

What problem does it solve?

Keeping track of Claude Code OAuth usage and resets manually is error-prone and time-consuming, which can lead to unexpected rate limits and interrupted workflows. This Skill consolidates session (5-hour) and weekly (7-day) utilization into readable output, helps avoid hitting quotas, and notifies you when quotas refresh.

Core Features & Use Cases

  • Session & Weekly Tracking: Reports five-hour session and seven-day weekly utilization with color-coded progress bars.
  • Smart Caching & Formats: Provides short TTL caching to avoid API spam and supports both human-readable and JSON output for automation.
  • Automated Monitoring & Alerts: Detects resets via polling or schedules exact reminders using a self-scheduling cron chain and integrates with Clawdbot/Telegram for notifications.
  • Use Case: Monitor Claude Code usage before heavy development sessions, automatically receive a Telegram alert when the 5-hour session resets, and feed JSON into dashboards or status lines.

Quick Start

Ask the agent to check my Claude Code session and weekly usage and notify me when quotas reset.

Frequently Asked Questions about claude-code-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my Claude Code OAuth usage and remaining quota?

To check Claude Code OAuth usage, this Skill queries the Anthropic oauth/usage endpoint using tokens retrieved from your system keychain. It reports your five-hour session and seven-day weekly utilization with color-coded progress bars.

Can I get a Telegram notification when my Claude Code session quota resets?

Yes, you can receive a Telegram notification when your Claude Code quota resets. The Skill integrates with Clawdbot to deliver alerts and uses a self-scheduling cron chain for automated reset detection and exact reminder scheduling.

How do I track Claude Code session limits for automated monitoring workflows?

You can track Claude Code session limits for automated workflows by outputting usage data in JSON format. The Skill provides smart short TTL caching to prevent API spam while feeding precise quota tracking data into your dashboards or status lines.

Does Claude Code quota monitoring require storing OAuth tokens in a specific secret manager?

Claude Code quota monitoring requires OAuth tokens retrieved from your system keychain or secret-store. The Skill uses the `secret-tool` dependency to securely access these tokens before querying the Anthropic usage endpoint.

What is the difference between the 5-hour session and 7-day weekly quota in Claude Code?

The difference between the 5-hour session and 7-day weekly quota in Claude Code is the tracking window. This Skill monitors both timeframes simultaneously, applying caching and polling to detect when either the session or weekly quota limits reset.