Setup
One-command setup for usage-guard's real plan quota. Use this whenever the user runs /usage-guard:setup, asks to enable/activate/turn on the real 5-hour and weekly quota reading, asks to wire up the status line, or when /usage-guard:usage shows no "Real plan quota" block (only the weighted fallback). Detects the installed plugin and writes the status-line shim into the user's settings.json for them, preserving any existing status line, so they don't have to edit JSON by hand.From its SKILL.md
npx -y skills add eltonylfgi-blip/claude-code-usage-guard --skill setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.3 KB, as published. Nobody here has run it
usage-guard setup
Most people install usage-guard but never wire the one-time status-line shim, so the real plan quota never turns on and the guard stays silent. This skill does that wiring for them with as little friction as possible. Prefer doing the edit for the user (with a backup) over just printing instructions — the whole point is to remove the manual step.
Steps
-
Locate the installed status-line shim. It lives under the user's Claude plugins dir. Run this (works on macOS, Linux and Windows):
node -e "const fs=require('fs'),p=require('path'),os=require('os');const root=p.join(os.homedir(),'.claude','plugins');let hit;(function w(d){let es;try{es=fs.readdirSync(d,{withFileTypes:true})}catch(e){return}for(const x of es){if(x.name==='node_modules'||x.name==='.git')continue;const f=p.join(d,x.name);if(x.isDirectory())w(f);else if(x.name==='usage-guard-statusline.mjs')hit=f}})(root);console.log(hit||'NOT_FOUND')"If it prints
NOT_FOUND, tell the user to run/plugin install usage-guard@cc-guardfirst, then retry. -
Open the user's settings. Path:
~/.claude/settings.json(Windows:%USERPROFILE%\.claude\settings.json). If it does not exist, create it as{}. Always back it up first (copy tosettings.json.bak) before editing. -
Wire the
statusLine, preserving any existing one:- If there is NO existing
statusLine, set it to run the shim directly:"statusLine": { "type": "command", "command": "node \"<ABSOLUTE_PATH_FROM_STEP_1>\"" } - If a
statusLine.commandalready exists, do NOT clobber it — chain it through the env var so their line still renders after the snapshot:
(On Windows the env var is set in the wrapping shell — see TUTORIAL.md for the"statusLine": { "type": "command", "command": "USAGE_GUARD_STATUSLINE='<their existing command>' node \"<ABSOLUTE_PATH_FROM_STEP_1>\"" }.cmdwrapper.)
- If there is NO existing
-
Confirm in one line. Tell the user it's wired, and that after their next couple of Claude Code messages,
/usage-guard:usagewill start with a realReal plan quotablock. Note that real quota only appears on Claude.ai Pro/Max sessions and only after the first API response; until then the weighted fallback is used.
Rules
- Idempotent. If the
statusLinealready points atusage-guard-statusline.mjs, change nothing — just confirm it's set. - Only touch the
statusLinekey. Never remove or overwrite unrelated settings. Keep the backup. - When in doubt, show don't guess. If multiple installs are found or the settings look unusual, print the exact block for the user to paste instead of editing blindly.
- This wires the free real-quota reading. If it still doesn't surface after setup, the user's machine may not expose
rate_limitsyet — that is the case the optional hands-on setup service covers.