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")
- Plan —
pro ($20), 5x ($100), or 20x ($200). Default: INLINECODE3
Save it so they never have to repeat:
CODEBLOCK0
Commands
CODEBLOCK1
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
CODEBLOCK2
| 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 |
| 5× |
$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/)
Claude 最大用量计算器
基于 she-llac.com/claude-limits 逆向工程的积分系统,追踪您的 Claude Max 订阅使用情况。
使用时机
当用户询问关于 Claude 使用量、积分、订阅消耗、速率限制,或想知道剩余预算时使用。
初始设置(首次使用)
向用户询问:
- 1. 每周重置时间 — 可在 claude.ai 设置 > 用量中查看(例如周一 14:00 重置)
- 套餐 — pro(20美元)、5x(100美元)或 20x(200美元)。默认:5x
保存设置,用户无需重复输入:
bash
python3 {SKILL_DIR}/scripts/claude-usage.py 2026-02-09 14:00 --plan 5x --save
命令
bash
每周概览(首次 --save 后使用已保存配置)
python3 {SKILL_DIR}/scripts/claude-usage.py
覆盖套餐或时区
python3 {SKILL
DIR}/scripts/claude-usage.py --plan 20x --tz America/NewYork
仅显示前 N 个会话
python3 {SKILL_DIR}/scripts/claude-usage.py --top 5
单个会话详情(按关键词或 ID 子串匹配)
python3 {SKILL_DIR}/scripts/claude-usage.py --session main
python3 {SKILL_DIR}/scripts/claude-usage.py --session 9aadee
JSON 输出
python3 {SKILL_DIR}/scripts/claude-usage.py --json
显示内容
每周概览
- - 已用总积分 vs 每周预算(含进度条)
- 5小时滑动窗口 — 接近每5小时速率限制时发出警告
- 按积分消耗排序的所有会话
- 模型细分(Opus/Sonnet/Haiku/非Claude)
单个会话详情(--session)
- - 消耗积分及占每周预算百分比
- 占总用量百分比(该会话占您支出的比例)
- Token 细分(输入/输出/缓存)
- 各模型详情
积分公式
积分 = (输入token + 缓存写入token) × 输入费率 + 输出token × 输出费率
| 模型 | 输入费率 | 输出费率 |
|---|
| Haiku | 2/15 | 10/15 |
| Sonnet |
6/15 | 30/15 |
| Opus | 10/15 | 50/15 |
缓存读取免费。非Claude模型(Gemini、Codex等)不消耗Claude积分。
套餐预算
| 套餐 | 美元/月 | 积分/5小时 | 积分/周 |
|---|
| Pro | 20美元 | 550,000 | 5,000,000 |
| 5× |
100美元 | 3,300,000 | 41,666,700 |
| 20× | 200美元 | 11,000,000| 83,333,300 |
系统要求
- - Python 3.9+
- 包含会话 JSONL 文件的 OpenClaw(自动检测于 ~/.openclaw/agents/main/sessions/)