SuperAPI AI Directory

report-limit

General & other

View repository

Updated 10-16 09:27

About this skill

Report rate-limited 5-hour windows to GitHub Discussions. Pure rule-based โ€” no LLM reasoning needed.

Help

ONLY show help if the user's argument literally contains the word "help" (e.g. /report-limit help). If no argument or any other argument is given, SKIP this section entirely and proceed to execution.

If the user provides "help" as argument, show usage summary and stop:

/report-limit โ€” Report your rate limit data

Got rate limited? This skill automatically finds your blocked
5-hour windows from cached timeline data and opens a pre-filled
GitHub Discussion to ww-w-ai/claude-code-token-saver.

No manual input needed. Just run it and confirm in your browser.

Options: (nothing) Auto-detect and report all rate-limited windows Report a specific date (e.g. /report-limit 2026-04-01) help Show this help

Examples: /report-limit Report all rate-limited windows /report-limit 2026-04-01 Report all 5h windows on April 1st


Do not run any analysis. Just display the help text and stop.

## Execution

Before running, ask the user's plan if not already known. The prompt message MUST be in the user's language (detect from conversation context). The table content (Plan names, prices) stays in English since they are proper nouns.

> Select your current Claude plan. The report will be generated based on your plan type.
>
> (Translate the above message naturally into the user's language. Example Korean translation โ†’ "ํ˜„์žฌ Claude ํ”Œ๋žœ์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”. ์„ ํƒํ•œ ํ”Œ๋žœ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ฆฌํฌํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.")
>
> | # | Plan | Price |
> |---|------|-------|
> | 1 | Pro | $20/mo |
> | 2 | Max 5x | $100/mo |
> | 3 | Max 20x | $200/mo |
> | 4 | Team Standard | $20/seat/mo |
> | 5 | Team Premium | $100/seat/mo |
> | 6 | Enterprise | custom |
> | 7 | Amazon Bedrock | usage-based |
> | 8 | Microsoft Foundry | usage-based |
> | 9 | Google Vertex AI | usage-based |
>
> Enter number or name (e.g. "3" or "max200"):

Map user input to `--plan` values: 1=pro, 2=max100, 3=max200, 4=team, 5=team_premium, 6=enterprise, 7=bedrock, 8=foundry, 9=vertex

Run the standalone script with `--plan` and optionally `--date`:

```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/report-limit.js --plan <plan> [--date <YYYY-MM-DD>]

If the user provided a date argument (e.g. /report-limit 2026-04-01), pass it as --date 2026-04-01. This reports ALL 5h windows for that date, not just rate-limited ones.

If the user doesn't know or skips plan, run without --plan (reports as "unknown").

Unknown model handling (run inline, do NOT stop the skill)

The script, scripts/model-pricing.jsonwhen it encounters a model not registered in, fails with exit code 2 and outputs to stderr the ERROR:UNKNOWN_MODEL block. In this case, handle the procedure below inline and then continue:

  1. stderr์˜ models: line to extract the list of unregistered model names.
  2. WebFetch๋กœ https://platform.claude.com/docs/en/about-claude/pricing#model-pricingand check each model's input / output / cacheCreate5m / cacheCreate1h / cacheRead / contextWindow.
  3. Once all 6 fields are confirmed,: scripts/model-pricing.jsonread , then add one line per model with Edit in the same format as the existing entry { "input": N, "cacheCreate5m": N, "cacheCreate1h": N, "cacheRead": N, "output": N, "contextWindow": N }. Do not use guessed/inferred values.
  4. If any one of them is not confirmed on the page,: do not arbitrarily fill in the JSON; stop the skill and output the message below to the user.
    โš ๏ธ ๋ฏธ๋“ฑ๋ก ๋ชจ๋ธ {๋ชจ๋ธ๋ช…}์˜ ์ „์ฒด ๊ฐ€๊ฒฉ ์ •๋ณด(ํŠนํžˆ 5m/1h ์บ์‹œ ํ‹ฐ์–ด)๋ฅผ ๊ณต์‹ ํŽ˜์ด์ง€์—์„œ ํ™•์ธํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
    ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธํ•ด ์ฃผ์„ธ์š”:
      /plugin update claude-code-token-saver
    ์—…๋ฐ์ดํŠธ ํ›„์—๋„ ๋ฌธ์ œ๊ฐ€ ์ง€์†๋˜๋ฉด https://github.com/ww-w-ai/claude-code-token-saver/issues ์— ์ œ๋ณด ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
    
  5. (on the 3rd success) re-run the same Bash command as is. Thanks to fail-fast, there is no stale cache, so --forceis unnecessary.
  6. If the re-run succeeds, proceed as is to the summary output step below.

The script outputs JSON to stdout. Parse the result and show the user a brief summary:

๐Ÿ’€ Found {N} rate-limited window(s).

| Window | Cost | Requests |
|--------|------|----------|
| {date} {start}-{end} | ${cost} | {n} |

{If gistUrl: "๐Ÿ“Ž Data uploaded: {gistUrl}"}
{If no gistUrl: "โš ๏ธ GitHub CLI not authenticated. Run `gh auth login` first, or manually attach the zip file."}
{If zipFile: "๐Ÿ“Ž Zip ready: {zipFile}"}

Discussion opened in browser. Review and submit.

Error Handling

  • If the script exits with code 1: "No cached data found. Run /usage-view first."
  • If the script exits with code 2: stderr contains ERROR:UNKNOWN_MODEL. Handle it inline via the "Unknown model handling" procedure above โ€” do NOT treat as a fatal failure.
  • If the script exits with code 0 but windows is empty: "No rate-limited windows found."

Prerequisites

  • GitHub Discussion category "Rate Limits" must exist on ww-w-ai/claude-code-token-saver
  • gh CLI authenticated for gist upload (optional โ€” falls back to local files)