← 返回
效率工具 中文

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.
从OpenClaw会话数据计算Claude Max订阅使用情况,显示已消耗的积分、每周预算百分比、5小时限速窗口及每会话明细。
lemodigital
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,328
下载
💾 31
安装
1
版本
#latest

概述

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
ModelInput rateOutput rate
--------------------------------
Haiku2/1510/15
Sonnet6/1530/15
Opus10/1550/15

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

Plan budgets

Plan$/monthCredits/5hCredits/week
---------------------------------------
Pro$20550,0005,000,000
$1003,300,00041,666,700
20×$20011,000,00083,333,300

Requirements

  • Python 3.9+
  • OpenClaw with session JSONL files (auto-detected at ~/.openclaw/agents/main/sessions/)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 02:12 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Agent Casino

lemodigital
Base主网上的链上石头剪刀布,使用真实USDC。采用提交-揭示机制,80/20防破产赔付,零抽成。适用于代理想玩...
★ 0 📥 1,034
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 444 📥 226,102
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 437 📥 147,168