Brewtools Overview
Brewtools is a lightweight plugin providing universal utilities: token-efficient optimization, AI-artifact removal, secrets scanning, SSH server management, and GitHub Actions deployment. Each skill is self-contained and requires no prior setup.
The -setup naming rule
A -setup suffix marks a skill that installs a mechanism you afterwards use instead of the skill β hooks, a generated Kanban, a delegation wall. Recurring tools you run again and again keep bare names (text-optimize, deploy, ssh). Every -setup skill shares one canonical mode set, in this order: status | install | upgrade | enable | disable | uninstall | purge. No argument means status when it is installed and install when it is not.
v6 hardening
The HARD delegation wall (manager-setup) moved from a denylist to a strict per-binary allowlist that fails closed on any flag it does not recognize, and closed four further bypasses: git diff --output=, git branch -D, gh issue comment --body, find -fprint0. Every subagent lost AskUserQuestion (removed in Claude Code 2.1.233) β a destructive or privileged step now returns a ## APPROVAL REQUIRED envelope to the caller instead of asking directly. ssh-admin no longer places secrets on curl argv.
Installation
Install prompt
Execute these commands in this Claude Code session, one by one, show full output for each, do not skip any, do not summarize:
1. claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
2. claude plugin install brewtools@claude-brewcode
After all commands succeed, run `/reload-plugins`. If `/reload-plugins` is unavailable, tell me to type `exit` and run `claude` again. Run the commands now. Install the entire suite:
Install prompt
Execute these commands in this Claude Code session, one by one, show full output for each, do not skip any, do not summarize:
1. claude plugin marketplace add https://github.com/kochetkov-ma/claude-brewcode
2. claude plugin install brewcode@claude-brewcode
3. claude plugin install brewdoc@claude-brewcode
4. claude plugin install brewtools@claude-brewcode
5. claude plugin install brewui@claude-brewcode
After all commands succeed, run `/reload-plugins`. If `/reload-plugins` is unavailable, tell me to type `exit` and run `claude` again. Run the commands now. Skills (recipes)
text-optimize
LLM token efficiency optimization with 30+ validated rules. Three modes: light, medium, deep. Parallel file processing.
text-human
Remove AI artifacts from code and docs: comments, fake issue numbers, unicode characters, trivial documentation. Commit, file, or folder scope.
secrets-scan
Security audit for leaked credentials in git-tracked files. 10 parallel agents, severity classification, interactive remediation.
ssh
SSH server management β connect, configure, deploy, administer remote Linux servers with safety gates and confirmation prompts.
deploy
GitHub Actions deployment β workflows, releases, GHCR, CI/CD pipelines with safety gates and rollback support.
plugin-update
Check, install, and update the full brewcode plugin suite in one command. Version status table, install missing plugins, reload prompt.
provider-switch
Configure alternative API providers β DeepSeek V4 (priority), Z.ai/GLM, Qwen, MiniMax, OpenRouter. Shell aliases in ~/.zshrc, one-command switching, validated model selection.
context-slim
Compresses everything that permanently enters the LLM context β CLAUDE.md, rules, agent descriptions, hooks, memory β via cross-layer dedup and per-file compression.
agent-deadline-setup
Soft wall-clock budget for subagents β warns at 80% of the budget, blocks non-finalizing tools past 100% so the report survives.
agent-return-setup
Size budget on every subagentβs final return message β blocks once past threshold with a compress or write-to-report order.
agent-router-setup
EXPERIMENTAL. Denies a generic subagent spawn when a real project or plugin expert owns the task, and names that expert.
manager-setup
Installs a hard delegation wall for this project β strict per-binary
allowlist, fails closed β and the ++m / ++a / ++rr / ++r codewords.
task-board-setup
Deploys a file-based Kanban into any repo via multi-agent analysis, plus an optional gated CLAUDE.md-optimization pass.
think-short-setup
Installs, upgrades or removes the think-short terse-mode hooks β project or global scope.
Commands
| Command | Purpose | Model | Arguments |
|---|---|---|---|
/brewtools:text-optimize | Optimize text for LLM token efficiency | sonnet | [-l|-d] [file|folder|path1,path2] |
/brewtools:text-human | Remove AI artifacts from code and docs | sonnet | <commit-hash|path> [custom instructions] |
/brewtools:secrets-scan | Scan for leaked secrets and credentials | sonnet | [--fix] |
/brewtools:ssh | SSH server management | opus | <prompt describing what to do> |
/brewtools:deploy | GitHub Actions deployment, CI/CD | opus | <prompt describing what to do> |
/brewtools:plugin-update | Check and update the full brewcode plugin suite | sonnet | [check|update|all] |
/brewtools:provider-switch | Configure alternative API providers | opus | [status|install|verify|model-check|help|<provider>] |
/brewtools:context-slim | Compress everything that permanently enters the LLM context | opus | [prompt] [measure|preview|slim|hard|bodies|restore] [--target=N%] [--global] [--memory] [--noask] [ts] |
/brewtools:agent-deadline-setup | Install a soft wall-clock budget for subagents | sonnet | [status|install|upgrade|enable|disable|uninstall|purge] [project|global] [minutes] |
/brewtools:agent-return-setup | Cap the size of every subagentβs final return message | sonnet | [status|install|upgrade|enable|disable|uninstall|purge] [project|global] [pass] [file] |
/brewtools:agent-router-setup | Route a generic subagent spawn to the real expert (experimental) | sonnet | [status|install|upgrade|enable|disable|uninstall|purge] [level fast|strict] |
/brewtools:manager-setup | Manager mode: hard delegation wall + codewords | sonnet | [status|install|upgrade|enable|disable|uninstall|purge] [level strict|balanced] [edit] |
/brewtools:task-board-setup | Deploy a file-based Kanban into any repo | opus | [status|install|upgrade|enable|disable|uninstall|purge] [repo path] [free-text directive] |
/brewtools:think-short-setup | Install/remove think-short terse-mode hooks | sonnet | [status|install|upgrade|enable|disable|uninstall|purge] [project|global] |
Agent
| Agent | Model | Purpose |
|---|---|---|
| text-optimizer | sonnet | Lean execution engine for text optimization with rule-based validation |
| ssh-admin | inherit | SSH server administration, configuration, deployment |
| deploy-admin | inherit | GitHub Actions, CI/CD, releases, GHCR management |
Artifact metadata
Every -setup skill stamps what it writes with the plugin version that generated it and generated_by naming the skill. JSON artifacts carry these plus last_updated as top-level keys. The byte-copied .mjs/.md hook and prompt files carry only version and generated_by in a // brewcode-meta: comment line (or .md frontmatter) β never last_updated, since the date would be the release date already present at the top of the file and rewriting it on every build would defeat the copyβs own drift check.
| Skill | Carrier |
|---|---|
| manager-setup | state.json top-level keys + the copied guardβs brewcode-meta line |
| think-short-setup | brewcode-meta line in each of the three .mjs hooks + the prompt file |
| agent-deadline-setup | agent-deadline.json top-level keys + both hooksβ brewcode-meta line |
| agent-return-setup | agent-return.json top-level keys + the brewcode-meta line in all three .mjs |
| agent-router-setup | agent-router.json top-level keys + the hookβs brewcode-meta line |
| task-board-setup | .md frontmatter (doc_type: llm, version, generated_by, last_updated) on nine generated artifacts |
/brewcode:setup-status reads these stamps back across all eleven -setup skills in this marketplace and tells you when an install is running on an older brewtools version than the plugin currently installed β the fix is always that skillβs own upgrade mode.
Plugin variable
${CLAUDE_PLUGIN_ROOT} and ${CLAUDE_SKILL_DIR} are text substitutions Claude Code performs
on the prompt itself, not environment variables β no hook injection required.
Skills in the main conversation use ${CLAUDE_SKILL_DIR} to access their own files.
Subagent .md definitions get ${CLAUDE_PLUGIN_ROOT} substituted into the prompt text at
Task spawn; it is not readable as a shell variable inside a Bash call.
Architecture
brewtools/
βββ .claude-plugin/
β βββ plugin.json # Plugin manifest
βββ hooks/ # filenames deliberately NOT renamed in v5.0.0
β βββ hooks.json # Hook registry
β βββ session-start.mjs # SessionStart: HARD-wall awareness, manager codeword prep
β βββ manager-prompt.mjs # UserPromptSubmit: ++m / ++a / ++rr / ++r codewords
β βββ hardmode-guard.mjs # Copied into a project by manager-setup install
β βββ lib/ # utils.mjs, manager-state.mjs, manager-prompts.mjs
βββ skills/
β βββ text-optimize/ # Token optimization
β βββ text-human/ # AI artifact removal
β βββ secrets-scan/ # Secrets scanning
β βββ ssh/ # SSH server management
β βββ deploy/ # GitHub Actions deployment
β βββ plugin-update/ # Check, install, and update plugin suite
β βββ provider-switch/ # Alternative API provider management
β βββ context-slim/ # Permanent-context compression
β βββ agent-deadline-setup/ # Soft wall-clock budget for subagents
β βββ agent-return-setup/ # Size budget on every subagent's final return
β βββ agent-router-setup/ # Generic-spawn router (experimental)
β βββ manager-setup/ # Hard delegation wall + codewords
β βββ task-board-setup/ # File-based Kanban generator
β βββ think-short-setup/ # Terse-mode hook installer
βββ agents/
βββ text-optimizer.md # Text optimization agent
βββ ssh-admin.md # SSH server administration
βββ deploy-admin.md # GitHub Actions, CI/CD agent
Brewtools vs Brewcode
Brewtools provides standalone text utilities: optimization, humanization, security scanning. Each skill works independently with no lifecycle dependencies.
Brewcode is the spec-and-search plugin β agent and skill authoring, semantic code search via the semble MCP, deep-review and team generators, plus the cross-plugin setup dashboard.
Both plugins install from the same claude-brewcode marketplace but operate independently.
Latest Release
Download, changelog, and installation instructions.
Installation Guide
Full setup, update, and troubleshooting instructions.
View on GitHub
Source code, README, and configuration files.