brewtoolsskill-togglelisted
Install: claude install-skill kochetkov-ma/claude-brewcode
# Skill Toggle
> **Disable/enable individual plugin skills** via the stable `skillOverrides` mechanism in `~/.claude/settings.json` (Claude Code 2.1.115+). State survives plugin updates — **no SessionStart reapply hook needed**. See also: `/brewtools:agent-toggle` for agents (uses native `permissions.deny`).
<instructions>
## Robustness Rules
| Rule | Applies |
|------|---------|
| Every Bash call ends with `&& echo "OK ..." \|\| echo "FAILED ..."` | ALL |
| Never use `Write`/`Edit` on `~/.claude/settings.json` — use Bash + Node helper | ALL |
| This skill mutates **skills only** (`skillOverrides`) — never agents | ALL |
| Atomic writes via lockfile + temp + rename (handled by helper) | P2 |
Paths (substitute literally in Bash):
- Helper: `$CLAUDE_PLUGIN_ROOT/skills/skill-toggle/helpers/overrides.mjs`
- Settings: `~/.claude/settings.json` (resolved to `$HOME/.claude/settings.json`)
- Legacy global state (read-only, backwards visibility): `$CLAUDE_PLUGIN_DATA/toggle-state.json`
## Override Modes
| Mode | Effect |
|------|--------|
| `off` | Fully disabled — invisible to user and LLM |
| `user-invocable-only` | Only via `/plugin:skill` slash; LLM cannot auto-invoke |
| `name-only` | Name visible in autocomplete, instructions/body not loaded |
| `on` | (Re-enable) — entry removed from settings.json |
Default for "disable" intent without explicit mode: `off`.
---
## Phase I — Interactive Flow (entry gate)
> **Full spec:** `_shared/toggle/interactive-flow.md` (phases I0