跳到正文
TakoAPI
返回技能列表

claude-code-usage

由 azaidi94 提供

Clawdbot Tools
4.3k下载量由 clawskills.sh 提供
15星标
1浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Check Claude Code OAuth usage limits.

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

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

智能体
  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

输出

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

前置要求

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

安装

clawhub install azaidi94/claude-code-usage

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接