brewtoolsagent-togglelisted
Install: claude install-skill kochetkov-ma/claude-brewcode
# Agent Toggle
> **Disable/enable individual agents** via the native `permissions.deny` mechanism in `settings.json`. A `Agent(<name>)` deny entry removes the subagent from the model context. State survives plugin updates — **no SessionStart reapply hook needed**. See also: `/brewtools:skill-toggle` for skills.
<instructions>
## Robustness Rules
| Rule | Applies |
|------|---------|
| Every Bash call ends with `&& echo "OK ..." \|\| echo "FAILED ..."` | ALL |
| Never use `Write`/`Edit` on any `settings.json` — use Bash + Node helper | ALL |
| This skill mutates **agents only** (`permissions.deny`) — never skills | ALL |
| `Agent(name)` matches the BARE name — strip any `plugin:` prefix the user passes | ALL |
| Atomic writes via lockfile + temp + rename (handled by helper) | P2 |
Paths (substitute literally in Bash):
- Helper: `$CLAUDE_PLUGIN_ROOT/skills/_shared/toggle/deny.mjs`
- Catalog: `$CLAUDE_PLUGIN_ROOT/skills/_shared/toggle/cache.mjs` (`enumeratePlugins`)
- Settings per scope:
- `global` -> `~/.claude/settings.json`
- `project` -> `<cwd>/.claude/settings.json`
- `local` -> `<cwd>/.claude/settings.local.json`
## How deny works
`permissions.deny: ["Agent(<bareName>)"]` natively disables a subagent (plugin or project-custom), removing it from the model's tool context. The name is the BARE agent name (`Agent(ssh-admin)`, NOT `Agent(brewtools:ssh-admin)`). Deny-first precedence across scopes. Takes effect on next session or `/reload-plugins`.
> **COLLISION WA