Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By chrisnsv0.5.1MITIn 1 marketplace
Keeps the last part of your 5-hour and weekly quota for you. At the reserve, spare10 holds all work and asks you whether to continue. After a Resume, it asks again at the floor, by default at 5% left. Shortly before the reset, it lets work use the reserve.
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Status badgebadge
Show the spare10 marker at the right of the prompt footer.
booleandefault true
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; reads environment variables (CLAUDE_AFK_TIMEOUT_MS, CLAUDE_CODE_ENABLE_FUNCTION_HOOKS, CLAUDE_CODE_SESSION_KIND, SPARE10, SPARE10_AUTO_RESUME, SPARE10_CONSENT, SPARE10_HEADLESS, SPARE10_LAST_MINUTES, SPARE10_LIMIT_PAUSE, SPARE10_PAUSE_PROMPT, SPARE10_RESERVE, SPARE10_RESUME_FLOOR, SPARE10_SIMULATE, SPARE10_STOPPED, SPARE10_WEEKLY_CONSENT, SPARE10_WEEKLY_LAST_HOURS, SPARE10_WEEKLY_PACE, SPARE10_WEEKLY_RESERVE, SPARE10_WEEKLY_RESUME_FLOOR); sets environment variables; reads your settings; reads or rewrites your prompts; sends prompts on its own; acts on other mods as they load.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Guarded sessionsscope
all: spare10 guards every interactive session. opt-in: only runs started with SPARE10=on. SPARE10=off switches spare10 off for one run.
One of all, opt-in
stringdefault all
Reserve (%)reserve
Keep this much of the 5-hour window for yourself. spare10 steps in when this much or less is left. 1 to 99, one decimal at most. SPARE10_RESERVE overrides it for one run.
number1–99default 10
Unattended runs (-p, SDK)headless
What spare10 does inside the reserve when nobody can answer: off (watch only), prompt (tell every agent to wind down), stop (refuse tools and further requests), wait (hold, then continue at the reset). SPARE10_HEADLESS overrides it for one run.
One of off, prompt, stop, wait
stringdefault off
Continue at the resetautoResume
On: spare10 continues held and stopped work by itself when the reserve opens before the reset, or a few minutes after the reset. Stop here then means stop until then. At 100% used, Stop here never continues by itself. Off: work waits for you. SPARE10_AUTO_RESUME overrides it for one run.
booleandefault true
Pause at the limitlimitPause
On: at 100% used, spare10 holds all work. This is also true in an open reserve, after a Resume and with a pause prompt. It asks you once. With no answer, the work continues after the reset, unless Continue at the reset is off. Stop here stops the work until you type a prompt after the reset. Off: work runs into the limit, and Claude Code refuses it. Switch it off when you pay for extra usage. SPARE10_LIMIT_PAUSE overrides it for one run.
booleandefault true
Weekly paceweeklyPace
Pace your week. A list of checkpoints like Fri:10 or Wed:45,Fri:10. Each item is a weekday and the percent of the weekly quota that must be left at the end of that day. spare10 holds work when you use the quota faster than a straight line to the checkpoints. A Resume lets you go on until midnight, then spare10 draws the line again from your use. After the last checkpoint, only the reserve applies. Weekdays use your local time. Blank switches this off. SPARE10_WEEKLY_PACE overrides it for one run.
stringdefault
Open reserve before 5-hour reset (min)lastMinutes
This many minutes before the 5-hour window resets, spare10 stops guarding the reserve and lets all work use it, because the quota refreshes soon. 0 switches this off. 0 to 299, one decimal at most. SPARE10_LAST_MINUTES overrides it for one run.
number0–299default 20
Pause promptpausePrompt
Leave empty to stop and ask you. Or write an instruction, and spare10 gives it to every agent instead of stopping. At 100% used, Pause at the limit still holds all work and asks you. SPARE10_PAUSE_PROMPT overrides it for one run.
stringdefault
Resume floor (%)resumeFloor
After a Resume at the 5-hour reserve, spare10 asks again when this much of the window is left. With a pause prompt, it tells the agents to wind down there. A second Resume lasts until the reset. 0 switches this off, so a Resume lasts until the reset. 0 to 99, one decimal at most. A value at or above the reserve does nothing. SPARE10_RESUME_FLOOR overrides it for one run.
number0–99default 5
Weekly reserve (%)weeklyReserve
Keep this much of the weekly window for yourself. 1 to 99, one decimal at most. 0 switches the weekly guard off. SPARE10_WEEKLY_RESERVE overrides it for one run.
number0–99default 10
Open weekly reserve before weekly reset (h)weeklyLastHours
This many hours before the weekly window resets, spare10 stops guarding the weekly reserve and lets all work use it. 0 switches this off. 0 to 167, one decimal at most. SPARE10_WEEKLY_LAST_HOURS overrides it for one run.
number0–167default 8
Weekly resume floor (%)weeklyResumeFloor
After a Resume at the weekly reserve, spare10 asks again when this much of the weekly window is left. With a pause prompt, it tells the agents to wind down there. 0 switches this off. 0 to 99, one decimal at most. A value at or above the weekly reserve does nothing. SPARE10_WEEKLY_RESUME_FLOOR overrides it for one run.
number0–99default 5
A quota circuit breaker for Claude Code and the OpenAI Codex CLI. It keeps the last part of your 5-hour and weekly quota windows for you.
The idea comes from spare10 by Alessandro Diano.
spare10 wraps the claude command and stops Claude Code before the quota runs out.
spare10-mod keeps the idea and moves it into the agent, as a plugin.
Many texts and rules come from spare10.
Thank you, Alessandro.
spare10-mod is early access software.
In Claude Code, it uses function hooks, an early access feature of Claude Code 2.1.281 and later.
In Codex, it uses plugin hooks and a small MCP server. It is tested on Codex CLI 0.157.0.
The plugin name is spare10 in both.
spare10 watches two quota windows: the 5-hour window and the weekly window. By default, it keeps the last 10% of each window for you. At the reserve of either window, spare10 holds all work at the next step. It then asks you one question: Stop here or Resume.
At 100% used, spare10 holds all work until the reset, and asks once: Continue at the reset or Stop here.
Near the reset, a reserve that you do not use is lost. So spare10 opens the reserve in the last 20 minutes of the 5-hour window and the last 8 hours of the weekly window. Then, or after the reset, spare10 continues held and stopped work by itself. You can switch each of these off.
Switch on function hooks.
Put this env entry in ~/.claude/settings.json:
{ "env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" } }
If the file has an env block already, add only the CLAUDE_CODE_ENABLE_FUNCTION_HOOKS line to it.
This flag switches on function hooks for every installed plugin that has a hooks module.
Before you start tells you more.
Run this command in bash, zsh or sh. It needs jq. macOS has jq in /usr/bin.
sh -c 'f="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json"; s="$f"; [ -e "$f" ] || s=/dev/null; t=$(mktemp) || exit 1; jq -s "if length > 1 then error(\"more than one JSON value\") else (.[0] // {}) | .env.CLAUDE_CODE_ENABLE_FUNCTION_HOOKS = \"1\" end" "$s" > "$t" || { rm -f "$t"; exit 1; }; mkdir -p "$(dirname "$f")" && cat "$t" > "$f" || { echo "Could not write $f. The new settings are in $t" >&2; exit 1; }; rm -f "$t"; echo "Function hooks are on in $f"'
The command keeps your other settings. jq rewrites the file with two-space indentation.
If jq cannot read or parse the file, the command shows an error and changes nothing.
If you export CLAUDE_CONFIG_DIR, the command uses that folder, as Claude Code does.
Run it once for each config folder that you use.
Install the plugin:
claude plugin marketplace add chrisns/spare10-mod
claude plugin install spare10@spare10
The install can say that 12 userConfig options are not set yet.
You do not have to set them. The defaults apply until you change them in /config.
Start a new Claude Code session in a terminal.
spare10 arms itself. You do not need a command.
The footer shows ⧗ spare10 until spare10 reads your quota. Then it shows ● spare10.
Type /spare10 to see the full status.
/ to see the command list. If /spare10 is not in the list, spare10 did not load.claude doctor. If it shows Invalid settings, correct that entry."0" in the env block of a project's .claude/settings.json switches function hooks off in that project.You need Node.js 20 or later.
spare10 looks for it in Homebrew, in /usr/local/bin, in /usr/bin and in Volta.
Then it tries the versions of nvm, mise, asdf and fnm, and last your PATH.
spare10 runs it outside the Codex sandbox.
Differences in Codex item 26 says where to install it.
Install the plugin:
codex plugin marketplace add chrisns/spare10-mod
codex plugin add spare10@spare10
npx claudepluginhub chrisns/spare10-mod --plugin spare10Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.