rate-limit-guard
Reviewed
at commit d788110
New version, not yet reviewed
Shared rate-limit guard for loop lanes and Claude: a hooks module writes the subscription rate-limit windows to a fixed machine-scope file and tells Claude…
0 upvotes
Log in to upvote or save- Made by
- Melodic Software
- Pinned commit
-
d788110cc1ef9f204ebb400d7f1209878f008cd7 - What we checked
-
Reads your plan's 5-hour and 7-day rate-limit usage from Claude Code and shows a toast and transcript line when a window nears or passes 95%, with an optional row above the prompt; telling Claude too is an option, off by default. It writes the readings, your account email and the session id to a file under ~/.claude, and logs rate-limit stops there. No network calls.
Review details
Static review of the source at the pinned commit; not run. The whole plugin was reviewed again (the diff since 42f26c1 was too large for a delta review). The module registers handlers for session.start, session.end, session.compact, session.measure, turn.step, turn.start, turn.complete, prompt.submit, tool.call, command.run and ui.render (AbovePrompt). It registers a read-only status tool (answered in its own tool.call handler) and a /rate-limit-guard command (status, band on/off), reads usage through $.session.usage and session.measure, and uses $.ui.toast, $.ui.log, $.prompt.read, $.prompt.suggest, $.clock.every and a band row. Only with the model_notices option on (now off by default) does it append one-line context to prompts and tool results, followed by an options line that links the author's account-rotation repository; operator mode offers that line as a prompt suggestion instead. It reads ~/.claude.json (or CLAUDE_CONFIG_DIR) for oauthAccount.accountUuid and emailAddress; the UUID stays in memory to detect an account switch, the email is written with the windows and session id to ~/.claude/rate-limit-guard/rate-limits.json by its own bundled helper lib/write-snapshot.mjs, run with node through $.process.run (atomic owner-only write under a lock, at most about every 5 minutes unless a window moves; the README discloses the file and the email). A StopFailure hook (matcher rate_limit) is launched as node hooks/exec-bash.mjs, a generic launcher that finds a real bash (never the WSL relay or a relative PATH entry) and runs record-rate-limit-stop.sh with none of its optional gate flags; that script sources hook-utils.sh and appends the time and session id to ~/.claude/rate-limit-guard/stop-events.jsonl, rotated at 200 lines. The SessionStart prerequisite notice of the previous version is gone, so lib/prerequisites.* and scripts/check-mod-load.sh are no longer loaded. The remaining setup skill is user-invoked only, read-only, pre-approves only Bash(command -v node*) and runs that probe at load time; it suggests claude --version and claude plugin test, which Claude still asks to run. Options turn the writes, lines, toast and band off. hook-utils.sh (about 5100 lines, sourced by the stop hook) was read for the functions the hook calls (buffer_stdin_to, json_escape, append_jsonl) and searched for network calls, top-level side effects and destructive commands, with none in the paths this plugin uses. No network calls and no obfuscated code found.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
Shared rate-limit guard for loop lanes and Claude: a hooks module writes the subscription rate-limit windows to a fixed machine-scope file and tells Claude where they stand at boundaries, a StopFailure hook records rate-limit stops reactively, and a reader contract fixes how consuming sessions pause and resume.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/rate-limit-guard/)