setup
Skill2 starsChanged 45 days agoMITView on GitHub
Interactive setup for model-guard — asks three quick preference questions (band language, account display, auto-recovery), installs the statusline scripts, registers the statusLine in ~/.claude/settings.json (with a timestamped backup) and checks the keystroke channel the recovery hooks need. Safe to re-run anytime to change options or to refresh after a plugin update.
- Installs packages
191 other projects use a version of this.
Adopted by
Most recently taken up by
- hydra-db/hydradb-claude-codetheir own version, first seen Nov 8, 2026
- WALKERKILLER/Look-Tongji-Notestheir own version, first seen Nov 8, 2026
- steerlabs/opensteertheir own version, first seen Nov 8, 2026
- ansvisor/ansvisortheir own version, first seen Nov 8, 2026
- dsifry/metaswarmtheir own version, first seen Nov 8, 2026
- anombyte93/prd-taskmastertheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-voice-transcription, add-discord and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
juancruzmunozalbeloSkilladd-voice-transcription
Add voice message transcription to NanoClaw using OpenAI's Whisper API. Automatically transcribes WhatsApp voice notes so the agent can read and respond to them.
Also in 5 projects that use this
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
juancruzmunozalbeloSkilladd-telegram-swarm
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Also in 7 projects that use this
- +8 more from microsoft
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- anthropics/knowledge-work-plugins★ 35ksame name
- garrytan/gbrain★ 32ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- Q00/ouroboros★ 6.3ksame name
- pytorch/executorch★ 5.2ksame name
- agenticnotetaking/arscontexta★ 3.5ksame name
- aws/agent-toolkit-for-aws★ 3.4ksame name
- spotify/portal-ai-plugins★ 2.8ksame name
181 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 2 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 171 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Follow the steps in order.
- Very specific: line 28
Read ~/.claude/settings.json: note the current statusLine (if any) and the model field (used for auto-detecting the expected model — no …
- Very specific: line 30
Read ~/.claude/model-guard.conf if it exists (this run is then a reconfigure — mention the current values inside the question descriptions …
- Very specific: line 60
If settings.json already has a statusLine that is not model-guard, add Question 4 — header "Existing bar": "Replace (keep restorable …
- Very specific: line 69
If a flat ~/.claude/model-guard.sh from an earlier install exists, delete it: the statusLine registered in step 4 points at the directory.
- Very specific: line 71
Write ~/.claude/model-guard.conf with the answers, preserving any unrelated existing keys (SETUP_HINT, PREV_STATUSLINE_B64, EXPECTED_MODEL, …
- Very specific: line 82
Do NOT write EXPECTED_MODEL unless the user explicitly asked for a manual override — auto-detection from the settings.json model field is …
- Very specific: line 100
No channel at all (a plain terminal, or SSH without a multiplexer): say so in one line — a downgrade stops the turn once and the band names …
- Very specific: line 108
If replacing a foreign statusLine, save it for restore-on-uninstall: printf 'PREV_STATUSLINE_B64=%s\n' "$(jq -c .statusLine …
- Distinctive: line 121
Run both and let the raw ANSI output render in the terminal (band colors included):
- Very specific: line 128
If the drill does not come out as an alarm (e.g.
- Very specific: line 131
Only if the user asks for proof of the hooks: bash "${CLAUDE_PLUGIN_ROOT}/tests/run.sh" (about 20 s, isolated temp state, no keystrokes are …
- Very specific: line 140
Keep the marketplace on auto-update (/plugin → Manage marketplaces → Enable auto-update, or "autoUpdate": true on the …
“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
model-guard: interactive setup
You are installing (or reconfiguring) model-guard for this user: the statusline scripts and the auto-recovery hooks' configuration.
Plugin root: ${CLAUDE_PLUGIN_ROOT}
(If the path above looks like an unexpanded shell variable instead of a real
directory, locate the plugin root via claude plugin list --json or by finding
*/model-guard/scripts/statusline.sh under ~/.claude/plugins/.)
Target paths — use exactly these:
- scripts:
~/.claude/model-guard/(statusline.sh,lib.sh,text.sh) - config:
~/.claude/model-guard.conf - register: the
statusLinekey in~/.claude/settings.json
Follow the steps in order. Keep your final report short.
1. Preflight (one Bash call)
command -v jq— required. If missing, stop and tell the user how to install it (sudo apt install jq/brew install jq/sudo pacman -S jq), then exit.- Read
~/.claude/settings.json: note the currentstatusLine(if any) and themodelfield (used for auto-detecting the expected model — no question needed). - Read
~/.claude/model-guard.confif it exists (this run is then a reconfigure — mention the current values inside the question descriptions below). - Keystroke channel for auto-recovery, from this session's environment, first hit wins:
TMUX+TMUX_PANEset → tmux;ZELLIJ_SESSION_NAME+ a numericZELLIJ_PANE_IDset → zellij;KITTY_WINDOW_IDset andKITTY_LISTEN_ONset → kitty;KITTY_WINDOW_IDset butKITTY_LISTEN_ONempty → kitty without remote control (fixable, see step 3b); otherwise none.
2. Ask preferences (ONE AskUserQuestion call)
Question 1 — header "Language", band text language:
- "Auto (Recommended)" — follow Claude Code's
languagesetting, fall back to English - "English"
- "中文"
- "More…" — description: also available: 日本語 · 한국어 · Español · Français · Deutsch · Português; type one via Other (conf values: ja / ko / es / fr / de / pt)
Question 2 — header "Account", show the logged-in account email on the band (useful when juggling multiple accounts):
- "Show (Recommended)"
- "Hide"
Question 3 — header "Recovery", what to do when a safeguard flag downgrades the session automatically (Fable/Opus 5 → Opus 4.8):
- "Stop, switch to Opus 5 (1M) at max effort, continue (Recommended)" — conf:
RECOVER_MODEL=claude-opus-5[1m],RECOVER_EFFORT=max - "Stop, switch to another model…" — description: type the model id (and
optionally an effort level) via Other, e.g.
claude-opus-5 high - "Stop only" — conf:
RECOVER_CHANNEL=none(the turn stops once; the band tells which /model to run) - "Off" — conf:
RECOVER=off(no hooks act; statusline only)
If settings.json already has a statusLine that is not model-guard, add
Question 4 — header "Existing bar": "Replace (keep restorable backup)" /
"Cancel setup". If the user cancels, stop cleanly.
3. Install files
mkdir -p ~/.claude/model-guard, then copy${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh,${CLAUDE_PLUGIN_ROOT}/scripts/lib.shand${CLAUDE_PLUGIN_ROOT}/scripts/text.shinto it andchmod +xthem. The statusline sources its two neighbours, so all three must be present.- If a flat
~/.claude/model-guard.shfrom an earlier install exists, delete it: thestatusLineregistered in step 4 points at the directory. - Write
~/.claude/model-guard.confwith the answers, preserving any unrelated existing keys (SETUP_HINT,PREV_STATUSLINE_B64,EXPECTED_MODEL,SHOW_CONTEXT,SHOW_LIMIT,SHOW_CWD,LIMIT_WARN_AT):
LANGUAGE=auto # or en / zh / ja / ko / es / fr / de / pt
SHOW_ACCOUNT=true # or false
RECOVER_MODEL=claude-opus-5[1m] # from Question 3; omit the RECOVER_* keys entirely for the defaults
RECOVER_EFFORT=maxDo NOT write EXPECTED_MODEL unless the user explicitly asked for a manual
override — auto-detection from the settings.json model field is the default.
3b. Keystroke channel (only when recovery is on)
- tmux, zellij, or kitty with
KITTY_LISTEN_ON: nothing to do, say which channel was found. kitty without remote control: ask (ONE AskUserQuestion, header "kitty") whether to append these two lines to
~/.config/kitty/kitty.conf(backup first:cp ~/.config/kitty/kitty.conf ~/.config/kitty/kitty.conf.bak-model-guard-$(date +%Y%m%d-%H%M%S)):allow_remote_control socket-only listen_on unix:@kittyTell the user kitty must be restarted for this to take effect (open sessions can be resumed with
claude --resume).socket-onlykeeps the tty channel closed; only local processes reaching the socket can control kitty.- No channel at all (a plain terminal, or SSH without a multiplexer): say so in one
line — a downgrade stops the turn once and the band names the
/modelto run; running the session inside tmux or zellij enables the automatic switch.
4. Register the statusLine
- Backup first:
cp ~/.claude/settings.json ~/.claude/settings.json.bak-model-guard-$(date +%Y%m%d-%H%M%S) - If replacing a foreign statusLine, save it for restore-on-uninstall:
printf 'PREV_STATUSLINE_B64=%s\n' "$(jq -c .statusLine ~/.claude/settings.json | base64 -w0)" >> ~/.claude/model-guard.conf - Merge without touching other keys:
jq '.statusLine={"type":"command","command":"'"$HOME"'/.claude/model-guard/statusline.sh","padding":0,"refreshInterval":5}' \
~/.claude/settings.json > ~/.claude/settings.json.tmp && mv ~/.claude/settings.json.tmp ~/.claude/settings.json- Validate:
jq -e .statusLine ~/.claude/settings.jsonmust succeed.
5. Verify — show the user real output
Run both and let the raw ANSI output render in the terminal (band colors included):
- Normal state — use the user's actual pinned model id so it renders green:
echo '{"model":{"id":"<pinned-model-id>","display_name":"<name>"},"effort":{"level":"xhigh"},"thinking":{"enabled":true},"context_window":{"used_percentage":12}}' | ~/.claude/model-guard/statusline.sh - Downgrade drill — must render the full red alarm band:
echo '{"model":{"id":"claude-haiku-4-5","display_name":"Haiku 4.5"}}' | ~/.claude/model-guard/statusline.sh
If the drill does not come out as an alarm (e.g. the user's model is default,
so there is no expectation), explain that and point at EXPECTED_MODEL in the conf.
- Only if the user asks for proof of the hooks:
bash "${CLAUDE_PLUGIN_ROOT}/tests/run.sh"(about 20 s, isolated temp state, no keystrokes are sent).
6. Report (short)
- The statusline hot-reloads: the band should appear at the bottom within seconds (worst case: next session).
- The recovery hooks are plugin hooks: they load when a session starts, so sessions that were already open before the install/update do not have them until restarted.
- Keep the marketplace on auto-update (
/plugin→ Manage marketplaces → Enable auto-update, or"autoUpdate": trueon theextraKnownMarketplacesentry) so later fixes arrive without a manual update. - Re-run
/model-guard:setupanytime to change options. After a plugin update there is nothing to re-run: the session-start hook refreshes the installed statusline scripts itself. /model-guard:removeuninstalls cleanly and restores any previous statusline.- Advanced knobs live in
~/.claude/model-guard.conf:LANGUAGE,SHOW_ACCOUNT,SHOW_CONTEXT,SHOW_LIMIT(the account's 5h/7d usage in the band, default true),SHOW_CWD(the session's working directory in the band, default true),LIMIT_WARN_AT(5h rate-limit warning threshold, default 80,offto disable),EXPECTED_MODEL(grep -Ei pattern override), and for recoveryRECOVER,RECOVER_MODEL,RECOVER_EFFORT,RECOVER_PROMPT,RECOVER_CHANNEL,RECOVER_MAX,DEBUG(see README).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

