← 返回 Skills 市场
lemodigital

Claude Usage

作者 lemodigital · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
988
总下载
0
收藏
7
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-usage
功能描述
Calculate Claude Max subscription usage from OpenClaw session data. Shows credits consumed, weekly budget percentage, 5-hour rate limit window, and per-session breakdown.
使用说明 (SKILL.md)

Claude Max Usage Calculator

Track your Claude Max subscription usage based on the reverse-engineered credits system from she-llac.com/claude-limits.

When to use

When the user asks about Claude usage, credits, subscription consumption, rate limits, or wants to know how much budget is left.

Setup (first time)

Ask the user for:

  1. Weekly reset time — visible on claude.ai Settings > Usage (e.g. "Resets Mon 2:00 PM")
  2. Planpro ($20), 5x ($100), or 20x ($200). Default: 5x

Save it so they never have to repeat:

python3 {SKILL_DIR}/scripts/claude-usage.py "2026-02-09 14:00" --plan 5x --save

Commands

# Weekly overview (uses saved config after first --save)
python3 {SKILL_DIR}/scripts/claude-usage.py

# Override plan or timezone
python3 {SKILL_DIR}/scripts/claude-usage.py --plan 20x --tz "America/New_York"

# Top N sessions only
python3 {SKILL_DIR}/scripts/claude-usage.py --top 5

# Single session detail (substring match on key or id)
python3 {SKILL_DIR}/scripts/claude-usage.py --session "main"
python3 {SKILL_DIR}/scripts/claude-usage.py --session "9aadee"

# JSON output
python3 {SKILL_DIR}/scripts/claude-usage.py --json

What it shows

Weekly overview

  • Total credits used vs weekly budget (with progress bar)
  • 5-hour sliding window — warns if approaching the per-5h rate limit
  • All sessions ranked by credits consumed
  • Model breakdown (Opus/Sonnet/Haiku/non-Claude)

Single session detail (--session)

  • Credits consumed and % of weekly budget
  • % of total usage (how much of your spending this session accounts for)
  • Token breakdown (input/output/cache)
  • Per-model detail

Credits formula

credits = (input_tokens + cache_write_tokens) × input_rate + output_tokens × output_rate
Model Input rate Output rate
Haiku 2/15 10/15
Sonnet 6/15 30/15
Opus 10/15 50/15

Cache reads are free. Non-Claude models (Gemini, Codex, etc.) don't consume Claude credits.

Plan budgets

Plan $/month Credits/5h Credits/week
Pro $20 550,000 5,000,000
$100 3,300,000 41,666,700
20× $200 11,000,000 83,333,300

Requirements

  • Python 3.9+
  • OpenClaw with session JSONL files (auto-detected at ~/.openclaw/agents/main/sessions/)
安全使用建议
This tool appears to do what it says: it reads local OpenClaw session JSONL files (auto-detected under ~/.openclaw/agents/main/sessions), computes Claude credits, prints reports, and saves a config at ~/.openclaw/claude-usage.json. Before installing/running: (1) Verify you have Python 3.9+ and are comfortable the script will read those session files; (2) inspect the included scripts if you want to confirm there's no network activity (the provided code shows no HTTP/remote calls); (3) be aware session transcripts may contain sensitive content — the tool processes them locally and does not request external credentials. If you want additional assurance, run the Python script in a sandbox or review the full script contents (it is included in the bundle).
功能分析
Type: OpenClaw Skill Name: claude-usage Version: 1.0.0 The skill's purpose is to calculate Claude usage from OpenClaw session data, which it achieves by reading JSONL files from standard OpenClaw session directories (`~/.openclaw/agents/main/sessions/`). It saves user configuration to `~/.openclaw/claude-usage.json`, a local file specific to the skill. The Python script uses `subprocess.check_output` only as a fallback to determine the local timezone offset, which is a benign and limited use of system commands. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts with harmful objectives in SKILL.md or other files. All actions are directly aligned with the stated purpose.
能力评估
Purpose & Capability
Name/description (Claude usage from OpenClaw session data) match the included files: a Python scanner that reads OpenClaw session JSONL files, computes credits using the documented formula, and reports per-session and windowed usage. No extraneous cloud credentials or unrelated dependencies are requested.
Instruction Scope
SKILL.md instructs the user to provide the weekly reset time and plan and then run the bundled Python script. The runtime instructions and script operate on session files under ~/.openclaw/agents/... and save a small config; they do not instruct reading unrelated system files, scanning other home directories, or sending data to external endpoints.
Install Mechanism
There is no install spec in the skill bundle (instruction-only install), which is low risk. The package includes package.json and a small Node wrapper that execs the Python script (normal convenience). README suggests npm installation or ClawHub, but the skill itself does not perform any remote downloads during runtime.
Credentials
The skill declares no required environment variables or credentials. The script reads OpenClaw session files and writes a local config (~/.openclaw/claude-usage.json), which is proportionate to its purpose. It does not request unrelated secrets.
Persistence & Privilege
The script will create and update a small config file in the user's home (~/.openclaw/claude-usage.json) to store reset_time/plan/tz — this is expected behavior for a local CLI tool. The skill is not marked always:true and does not modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-usage
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-usage 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: weekly overview, 5h rate limit window, per-session breakdown, single session detail, saved config
元数据
Slug claude-usage
版本 1.0.0
许可证
累计安装 7
当前安装数 7
历史版本数 1
常见问题

Claude Usage 是什么?

Calculate Claude Max subscription usage from OpenClaw session data. Shows credits consumed, weekly budget percentage, 5-hour rate limit window, and per-session breakdown. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 988 次。

如何安装 Claude Usage?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-usage」即可一键安装,无需额外配置。

Claude Usage 是免费的吗?

是的,Claude Usage 完全免费(开源免费),可自由下载、安装和使用。

Claude Usage 支持哪些平台?

Claude Usage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claude Usage?

由 lemodigital(@lemodigital)开发并维护,当前版本 v1.0.0。

💬 留言讨论