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
<date> 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:
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)
์คํฌ๋ฆฝํธ๋ scripts/model-pricing.json์ ๋ฑ๋ก๋์ง ์์ ๋ชจ๋ธ์ ๋ง๋๋ฉด exit code 2๋ก ์คํจํ๋ฉด์ stderr์ ERROR:UNKNOWN_MODEL ๋ธ๋ก์ ์ถ๋ ฅํฉ๋๋ค. ์ด ๊ฒฝ์ฐ ์๋ ์ ์ฐจ๋ฅผ ์ธ๋ผ์ธ์ผ๋ก ์ฒ๋ฆฌํ ๋ค ์ด์ด์ ์งํํ์ธ์:
- stderr์
models:์ค์ ํ์ฑํด ๋ฏธ๋ฑ๋ก ๋ชจ๋ธ ์ด๋ฆ ๋ชฉ๋ก์ ์ถ์ถํฉ๋๋ค. - WebFetch๋ก
https://platform.claude.com/docs/en/about-claude/pricing#model-pricing์ ๊ฐ์ ธ์ ๊ฐ ๋ชจ๋ธ์input/output/cacheCreate5m/cacheCreate1h/cacheRead/contextWindow๋ฅผ ํ์ธํฉ๋๋ค. - 6๊ฐ ํ๋๊ฐ ๋ชจ๋ ํ์ธ๋๋ฉด:
scripts/model-pricing.json์ Readํ ๋ค, ๊ธฐ์กด ์ํธ๋ฆฌ์ ๋์ผํ ํ์{ "input": N, "cacheCreate5m": N, "cacheCreate1h": N, "cacheRead": N, "output": N, "contextWindow": N }์ผ๋ก ๋ชจ๋ธ๋ง๋ค ํ ์ค์ฉ Edit์ผ๋ก ์ถ๊ฐํฉ๋๋ค. ์ถ์ธก/์ ๋๊ฐ์ ์ฐ์ง ๋ง์ธ์. - ์ด๋ ํ๋๋ผ๋ ํ์ด์ง์์ ํ์ธ๋์ง ์์ผ๋ฉด: JSON์ ์์๋ก ์ฑ์ฐ์ง ๋ง๊ณ ์คํฌ์ ์ค๋จํ ๋ค ์ฌ์ฉ์์๊ฒ ์๋ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅํ์ธ์.
โ ๏ธ ๋ฏธ๋ฑ๋ก ๋ชจ๋ธ {๋ชจ๋ธ๋ช }์ ์ ์ฒด ๊ฐ๊ฒฉ ์ ๋ณด(ํนํ 5m/1h ์บ์ ํฐ์ด)๋ฅผ ๊ณต์ ํ์ด์ง์์ ํ์ธํ ์ ์์ต๋๋ค. ํ๋ฌ๊ทธ์ธ์ ์ต์ ๋ฒ์ ์ผ๋ก ์ ๋ฐ์ดํธํด ์ฃผ์ธ์: /plugin update claude-code-token-saver ์ ๋ฐ์ดํธ ํ์๋ ๋ฌธ์ ๊ฐ ์ง์๋๋ฉด https://github.com/ww-w-ai/claude-code-token-saver/issues ์ ์ ๋ณด ๋ถํ๋๋ฆฝ๋๋ค. - (3๋ฒ ์ฑ๊ณต ์) ๋์ผํ Bash ๋ช
๋ น์ ๊ทธ๋๋ก ์ฌ์คํํฉ๋๋ค. fail-fast ๋๋ถ์ stale cache๊ฐ ์์ผ๋ฏ๋ก
--force๋ ๋ถํ์ํฉ๋๋ค. - ์ฌ์คํ์ด ์ฑ๊ณตํ๋ฉด ๊ทธ๋๋ก ์๋ ์์ฝ ์ถ๋ ฅ ๋จ๊ณ๋ก ์งํํฉ๋๋ค.
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-viewfirst." - 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
windowsis empty: "No rate-limited windows found."
Prerequisites
- GitHub Discussion category "Rate Limits" must exist on ww-w-ai/claude-code-token-saver
ghCLI authenticated for gist upload (optional โ falls back to local files)