返回顶部
c

claude-usage

Check Claude Code / Claude Max usage limits. Run when user asks about usage, limits, quota, or how much Claude capacity is left.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.3.0
安全检测
已通过
974
下载量
0
收藏
概述
安装方式
版本历史

claude-usage

# Claude Usage Checker Launches the Claude CLI interactively (PTY) and reads the `/usage` output to report your Claude Code / Claude Max quota. ## Prerequisites - **Claude CLI** must be installed (`npm i -g @anthropic-ai/claude-code`) and logged in - If running `claude` shows "Missing API key", the user must log in manually first: open a terminal, run `claude`, and complete the browser login flow - Requires an interactive PTY — the agent will launch a local process and read its output (quota info only) ## Steps 1. Launch `claude` with PTY 2. Wait for the welcome screen (poll until it appears) 3. Send `/usage` + Enter 4. Read the output (poll until usage data appears) 5. Close with Escape then `/exit` 6. Report the results ## Commands ```bash # Launch claude with PTY exec pty=true command="claude" # Wait and check log process action=poll sessionId=XXX timeout=5000 # Send /usage process action=send-keys sessionId=XXX literal="/usage" process action=send-keys sessionId=XXX keys=["Enter"] # Read output process action=poll sessionId=XXX timeout=5000 # Exit process action=send-keys sessionId=XXX keys=["Escape"] process action=send-keys sessionId=XXX literal="/exit" process action=send-keys sessionId=XXX keys=["Enter"] ``` ## Notes - If you see "Missing API key" → tell the user to log in; browser-based login won't work headlessly - Allow a few seconds between polls — Claude CLI starts slowly - "Current week" = weekly reset, not daily ## Output Format Report in a table: | | Usage | Resets | |---|---|---| | **Current session** | X% used | today at HH:MM (timezone) | | **Weekly (all models)** | X% used | HH:MM (timezone) | | **Weekly (Sonnet only)** | X% used | HH:MM (timezone) | | **Extra usage** | X% used / $X of $Y spent | date (timezone) | Always show reset times. The CLI displays them as "Resets Xpm" — convert to HH:MM format.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 claude-usage-checker-1776419966 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 claude-usage-checker-1776419966 技能

通过命令行安装

skillhub install claude-usage-checker-1776419966

下载 Zip 包

⬇ 下载 claude-usage v1.3.0

文件大小: 1.7 KB | 发布时间: 2026-4-17 20:02

v1.3.0 最新 2026-4-17 20:02
Removed auto-install: claude CLI is a prerequisite, not auto-installed.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部