From limit-usage
Stop model requests before you exhaust your Claude usage. A mod that reads the 5h/7d usage % and the session cost from Claude Code itself and stops every request, subagents included, once a threshold is reached (use cost on plans with no usage quota). Needs a Claude Code build with mods.
4 events · 12 calls
Ships in limit-usage. Installing the plugin adds it to Claude Code.
A mod runs inside Claude Code as you, unsandboxed. This is what its source calls.
fs.writeenv.getEach event it registers a hook on, with the matcher when it sets one
session.startcommand.run{command=limit-usage}session.measureturn.stepEvery mods API method its source calls, by namespace
nowregistergetwriteusagegetsetdeletegetsetlogstatusHOMEXDG_STATE_HOMEWhere Claude Code finds the mod
hooks/hooks.jsonsrc/register.ts (written ../src/register.ts)Read from the source, never run. Claude Code checks a mod again when it loads it and can refuse code this reading accepts; claude plugin validate shows its own list.
npx claudepluginhub pokutuna/claude-plugins --plugin limit-usage