openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Claude Usage Checker

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

开发与 DevOps

作者:kokoko @aligurelli

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.3.0

统计:⭐ 0 · 698 · 3 current installs · 4 all-time installs

0

安装量(当前) 4

🛡 VirusTotal :可疑 · OpenClaw :良性

Package:claude-usage-checker

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :良性

OpenClaw 评估

The skill's requirements and instructions match its stated purpose (it launches the local Claude CLI in a PTY and reads /usage), and it doesn't request extra credentials or install code, so it's internally coherent.

目的

Name and description match the runtime instructions: the skill needs the local 'claude' CLI and an interactive PTY to query /usage. Requiring the claude binary is appropriate for this purpose.

说明范围

Instructions are narrowly scoped to launching the local claude CLI, sending the '/usage' command, reading output, and exiting. Minor caution: because it runs an interactive PTY and reads the process output, it could capture any text the CLI emits (including any unexpected sensitive lines). The instructions themselves do not ask for unrelated files, env vars, or external endpoints.

安装机制

This is an instruction-only skill with no install spec and no code to download or execute. That minimizes supply-chain risk.

证书

The skill declares no environment variables, credentials, or config paths. That is proportionate to its stated goal of interacting with the local 'claude' CLI.

持久

always is false and the skill does not request elevated or persistent system privileges or modify other skills. Autonomous invocation is permitted (platform default) but not combined with other red flags.

综合结论

This skill appears to do exactly what it says: run your local Claude CLI in a terminal and read the /usage output. Before installing or using it, confirm you have the official claude CLI installed and are comfortable letting the agent spawn an interactive terminal on your machine — whatever the CLI prints to the terminal can be read by the skill. Manually log in to claude first (the skill notes browser login won't work headlessly). If you are …

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Claude Usage Checker」。简介:Check Claude Code / Claude Max usage limits. Run when user asks about usage, li…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aligurelli/claude-usage-checker/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: claude-usage
description: Check Claude Code / Claude Max usage limits. Run when user asks about usage, limits, quota, or how much Claude capacity is left.
homepage: https://github.com/aligurelli/clawd
metadata:
  {
    "openclaw":
      {
        "requires": { "bins": ["claude"], "pty": true }
      }
  }
---

# 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.