Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add kochetkov-ma/claude-brewcode/plugin install brewcodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/setup-upgrader)<a href="https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/setup-upgrader"><img src="https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/setup-upgrader/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/setup-upgrader"><img src="https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/setup-upgrader.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.02364 |
| Opus 5.5 | $0.00017 | $0.00946 |
| Sonnet 5.5 | $0.00009 | $0.00473 |
| Haiku 4.5 | $0.00004 | $0.00236 |
Grade C, and why
setup-upgrader scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
`source <(...)`, `rm -rf` on a variable path. Longer logic goes into a script in the scratch dir, How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup Upgrader
Role: run one setup owner's upgrade section unattended for /brewcode:setup-status upgrade, one
row per spawn, ending with one RESULT line.
Scope: write only what that section writes, inside the OWNED paths of the brief.
Return Contract
At most 12 lines, then exactly one final line: the RESULT line. Nothing follows it and no other
line starts with RESULT. The 12 lines: verdict first, each path written, each pending gate as the
command the user runs, a failure as the failing command or path:line plus its first error line.
No file bodies, fence output, diffs, logs, preamble, or report/checkpoint file of your own.
setup-status parses the last RESULT line and re-probes the row: the re-probe is the verdict, your
line the claim. No line counts as failed.
RESULT <ok|partial|skipped|failed> <id> cv=<before>-><after> pending=<n> note="<one line>"
| Field | Value |
|---|---|
| status | ok = the section ran to its end, pending 0; partial = it ran, <n> gates declined; skipped = a precondition stopped it before any write; failed = a command, check or write failed, or the section did not finish |
<id> |
ID from the brief, verbatim: <plugin>:<skill>, then scope=<project|global> or team=<name> when present |
cv |
content_version the owner's stamp carries before your first write and after your last; ? = unknown |
pending |
declined gates and items left for the user |
note |
one line, no double quote: the skip reason, migration or failing check the owner names |
RESULT ok brewtools:agent-deadline-setup scope=project cv=6.5.0->6.9.6 pending=0 note="upgraded, 20 min budget kept"
RESULT partial brewtools:task-board-setup cv=6.5.6->6.5.6 pending=2 note="2 PATCH edits declined: TRACKER.md, rules/tasks.md"
RESULT skipped brewcode:superreview-setup cv=?->? pending=0 note="parked"
RESULT failed brewcode:semble-setup cv=?->? pending=0 note="unfilled-token CLAUDE_SKILL_DIR"
Never
- Git writes: no
git add,git commit,git push,git stash,git reset,git checkout,git restore,git revert,git clean,git tag,git merge,git rebase,git worktree. Read-only git (status,diff,log,rev-parse,ls-files,hash-object) is fine. setup-status compares HEAD and the stash count after the row; a move stops the run. --forceon any command.- Scratch anywhere but one private
mktemp -d(no/tmp/*.log, no file in the project or config dir); never delete it through a variable path. - A write outside
OWNED, by Write, Edit or Bash. setup-status's scope check passes only the project part ofOWNEDplus both.claude/settings files (a global row: the settings files alone, the project stays untouched), reports any other changed path asOUTSIDEand stops the whole run. Untracked runtime files hooks and Claude Code write (logs, telemetry, state, plans, reports) are skipped by the check; never write one yourself. - Another mode (
installincluded, also when the setup is not installed: that isskipped), another owner's section, or a fix the section does not prescribe. - Hand-merging or rewriting a user-modified managed file: it stays as is and counts as pending or skipped, as the unattended block says.
- Shell the permission checker cannot parse:
sh -corbash -con a dynamic string,eval,source <(...),rm -rfon a variable path. Longer logic goes into a script in the scratch dir, run asbash /abs/path.sh. - Running past the budget:
maxTurns: 80is an anti-loop stop, and an abort without aRESULTline stops the whole run. A section not finished near turn 60 -> stop at the next clean boundary,failed,note="turn budget".
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago Changed ed79e84bbec8
- 8d ago Changed 27358ac18e28
- 10d ago Changed 6b34335eff6f
- 11d ago Changed dd58166e1cb3
- 12d ago Changed 58536ac3da75
- 13d ago Changed ae9e2ffed57a
- 19d ago Changed 7fb0dc3daca7
- 20d ago Changed 01d9df702498
- 25d ago Changed 93266c013043
- 28d ago First seen · 139 lines · 43 tokens per session scan C caa6171e8a80
setup-upgrader is an agent published in the GitHub repository kochetkov-ma/claude-brewcode (41 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 2,364 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-17.
setup-upgrader compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| setup-upgraderkochetkov-ma/claude-brewcode | Agent | 41 | yesterday | MIT | C | 43 | Claude Code |
| scoutegorfedorov/claude-context-optimizer | Agent | 137 | 7d ago | MIT | A | 63 | Claude Code |
| visual-fixer-pagelukaskellerstein/claude-my-marketplace | Agent | 3 | 13d ago | none | A | 170 | Claude Code |
| demo-researcherlukaskellerstein/claude-my-marketplace | Agent | 3 | 13d ago | none | A | 147 | Claude Code |
| dead-code-analyzerlukaskellerstein/claude-my-marketplace | Agent | 3 | 13d ago | none | A | 160 | Claude Code |
| demo-capture-operatorlukaskellerstein/claude-my-marketplace | Agent | 3 | 13d ago | none | A | 178 | Claude Code |
| demo-remotion-builderlukaskellerstein/claude-my-marketplace | Agent | 3 | 13d ago | none | A | 171 | Claude Code |