Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

claude-code-usage

bởi azaidi94

Clawdbot Tools
4.3kLượt tải do clawskills.sh công bố
15Sao
1Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Check Claude Code OAuth usage limits.

Mô tả

Kỹ năng này làm gì

Queries the Anthropic OAuth API to display Claude Code usage against 5-hour session and 7-day weekly rate limits. Supports text and JSON output, configurable caching, and automated reset notifications via cron.

The Claude Code CLI does not expose quota details directly, so this is the only way to see exact utilization percentages and reset timings without guessing.

Khi nào nên dùng

  • Checking remaining session quota before starting a long coding task
  • Avoiding rate limit surprises mid-project
  • Displaying usage percentage in a terminal statusline
  • Getting notified when a 5-hour session quota resets
  • Piping quota data as JSON into monitoring scripts

Quy trình ví dụ

ĐẦU VÀO

User asks: How much Claude Code usage do I have left?

AGENT
  1. 1

    Retrieves OAuth token from the system keychain

  2. 2

    Queries api.anthropic.com/api/oauth/usage with the token

  3. 3

    Parses five_hour and seven_day utilization metrics

  4. 4

    Calculates time remaining until each quota resets

  5. 5

    Renders progress bars and color-coded status indicators

ĐẦU RA

Session (5h): 40% used, resets in 2h 15m. Weekly (7d): 60% used, resets in 3d 8h.

Yêu cầu

  • Claude Code CLI installed and authenticated via OAuth
  • libsecret / secret-tool (Linux only, for credential storage)

Cài đặt

clawhub install azaidi94/claude-code-usage

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết