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

If Claude refuses to run the commands, paste the prompt below directly into the chat.
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

If Claude refuses to run the commands, paste the prompt below directly into the chat.
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

CommandPurposeModelArguments
/brewtools:text-optimizeOptimize text for LLM token efficiencysonnet[-l|-d] [file|folder|path1,path2]
/brewtools:text-humanRemove AI artifacts from code and docssonnet<commit-hash|path> [custom instructions]
/brewtools:secrets-scanScan for leaked secrets and credentialssonnet[--fix]
/brewtools:sshSSH server managementopus<prompt describing what to do>
/brewtools:deployGitHub Actions deployment, CI/CDopus<prompt describing what to do>
/brewtools:plugin-updateCheck and update the full brewcode plugin suitesonnet[check|update|all]
/brewtools:provider-switchConfigure alternative API providersopus[status|install|verify|model-check|help|<provider>]
/brewtools:context-slimCompress everything that permanently enters the LLM contextopus[prompt] [measure|preview|slim|hard|bodies|restore] [--target=N%] [--global] [--memory] [--noask] [ts]
/brewtools:agent-deadline-setupInstall a soft wall-clock budget for subagentssonnet[status|install|upgrade|enable|disable|uninstall|purge] [project|global] [minutes]
/brewtools:agent-return-setupCap the size of every subagent’s final return messagesonnet[status|install|upgrade|enable|disable|uninstall|purge] [project|global] [pass] [file]
/brewtools:agent-router-setupRoute a generic subagent spawn to the real expert (experimental)sonnet[status|install|upgrade|enable|disable|uninstall|purge] [level fast|strict]
/brewtools:manager-setupManager mode: hard delegation wall + codewordssonnet[status|install|upgrade|enable|disable|uninstall|purge] [level strict|balanced] [edit]
/brewtools:task-board-setupDeploy a file-based Kanban into any repoopus[status|install|upgrade|enable|disable|uninstall|purge] [repo path] [free-text directive]
/brewtools:think-short-setupInstall/remove think-short terse-mode hookssonnet[status|install|upgrade|enable|disable|uninstall|purge] [project|global]

Agent

AgentModelPurpose
text-optimizersonnetLean execution engine for text optimization with rule-based validation
ssh-admininheritSSH server administration, configuration, deployment
deploy-admininheritGitHub 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.

SkillCarrier
manager-setupstate.json top-level keys + the copied guard’s brewcode-meta line
think-short-setupbrewcode-meta line in each of the three .mjs hooks + the prompt file
agent-deadline-setupagent-deadline.json top-level keys + both hooks’ brewcode-meta line
agent-return-setupagent-return.json top-level keys + the brewcode-meta line in all three .mjs
agent-router-setupagent-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.