limits
Reviewed
at commit 86b14fe
One line above the prompt with the 5-hour and 7-day limits, context with a compaction count, minutes left on the prompt cache, session cost and running…
0 upvotes
Log in to upvote or save- Made by
- Andrei Shivalin
- Pinned commit
-
86b14fe5b0758415506aa6bfa4b7ef4d362ce605 - What we checked
-
Shows your 5h/7d quota, context fill, prompt-cache time left and session cost on one line above the prompt, with details on hover. It reads the tail of your own session transcript and keeps a small shared quota file in your Claude config folder; optional settings can poll api.anthropic.com for your quota, run a cost command you name, or add a copy-session-reference button.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 1bd3c22; the rest carries over from the review at that commit. Changes in this version (0.13.3): in the session.measure hook the compaction window is now also re-read through $.session.usage (readCompactWindow, the same in-engine call as before) when the context token count exceeds the stored compaction window, not only when the model window changes; version number and a test updated. Hooks: session.start, session.end, session.measure, session.compact, prompt.submit (stores the last 10 prompts as one-line text in session state to show the last prompt on hover; not written to disk or sent anywhere), turn.start, turn.step, turn.complete, tool.call (counts tools of subagents, observation only, always calls next), agent.spawn and ui.render (AbovePrompt, plus a countdown client module). Runtime calls: $.session.usage/id/cwd/authorize, $.clock, $.ui.copy/toast. Processes: sh -c tail -c 400000 on ~/.claude/projects/*/<session id>.jsonl (session id validated against a word-character pattern, only when the module loads mid-session, to seed the cache clock, last prompt and context; only the parsed values are kept); the user's costCommand (opt-in, empty by default, session id appended, 15 s timeout, output parsed as JSON); with the opt-in copyRef button, fixed sh scripts (ls, wc -c, git branch --show-current with arguments passed as positional parameters) and pbcopy. Files: $.fs reads and writes <CLAUDE_CONFIG_DIR or ~/.claude>/state/limits/quota.json (quota readings and last poll time, every 30 s) and, with quotaLog, appends a JSON line per poll to the user's chosen path. Network: only with quotaPoll set to 5m or 15m (off by default), one request per period across sessions via $.http.fetch to https://api.anthropic.com/api/oauth/usage using the handle from $.session.authorize (the mod never sees the token), only for claude.ai logins; the reply is parsed leniently for five_hour/seven_day windows. No model calls, no eval, no install steps. The skill customize-limits only documents options and how to edit the mod; it pre-approves no tools. Not reviewed: the media helper scripts in tools/media (Python, not loaded by the plugin). The README and SECURITY.md disclose each of these reads, writes and calls.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: yes
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
Claude Code mod: your 5h/7d quota, context window, prompt-cache time left and session cost on one line above the prompt, with per-subagent cost on hover
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/limits/)