setup-upgrader

setup-upgrader is an agent for Claude Code from kochetkov-ma/claude-brewcode. It costs 43 tokens per session (2,364 once invoked), scanned C, original, MIT.

An internal helper that upgrades one outdated setup entry when the setup-status upgrade command starts it.

In plain words
What is it for?
It runs an upgrade section without supervision, records what was written or what blocked it, and returns a final status line for the caller to check.
Why use it?
It keeps upgrade work limited to the paths owned by that setup and reports a machine-readable result. It is not intended for direct or automatic use.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions .claude-plugin; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the brewcode plugin — 4 skills, 7 agents shipped together

Good fit It runs an upgrade section without supervision, records what was written or what blocked it, and returns a final status line for the caller to check.

Compare 6 agents from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add kochetkov-ma/claude-brewcode
Claude Code
/plugin install brewcode

Made for: Claude Code.

Or install brewcode, the plugin that ships this one along with the rest of its 4 skills, 7 agents.

Wrote 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.

agentmods badge for setup-upgrader

README.md
[![agentmods](https://agentmods.dev/badge/agents/kochetkov-ma/claude-brewcode/setup-upgrader/github.svg)](https://agentmods.dev/agents/kochetkov-ma/claude-brewcode/setup-upgrader)
Your own site
<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.

agentmods 80×15 button for setup-upgrader

Your own site · 80×15
<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>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,364 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash ed79e84bbec8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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,
brewcode/agents/setup-upgrader.md · 139 lines

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.
  • --force on 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 of OWNED plus both .claude/ settings files (a global row: the settings files alone, the project stays untouched), reports any other changed path as OUTSIDE and 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 (install included, also when the setup is not installed: that is skipped), 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 -c or bash -c on a dynamic string, eval, source <(...), rm -rf on a variable path. Longer logic goes into a script in the scratch dir, run as bash /abs/path.sh.
  • Running past the budget: maxTurns: 80 is an anti-loop stop, and an abort without a RESULT line stops the whole run. A section not finished near turn 60 -> stop at the next clean boundary, failed, note="turn budget".

Read the full file on GitHub · 139 lines

Changes

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.

  1. 7d ago Changed ed79e84bbec8
  2. 8d ago Changed 27358ac18e28
  3. 10d ago Changed 6b34335eff6f
  4. 11d ago Changed dd58166e1cb3
  5. 12d ago Changed 58536ac3da75
  6. 13d ago Changed ae9e2ffed57a
  7. 19d ago Changed 7fb0dc3daca7
  8. 20d ago Changed 01d9df702498
  9. 25d ago Changed 93266c013043
  10. 28d ago First seen · 139 lines · 43 tokens per session scan C caa6171e8a80

Subscribe to this mod's changes

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.

Related

setup-upgrader compared with agents from other repositories

setup-upgrader next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
setup-upgraderkochetkov-ma/claude-brewcodeAgent41yesterdayMITC43Claude Code
scoutegorfedorov/claude-context-optimizerAgent1377d agoMITA63Claude Code
visual-fixer-pagelukaskellerstein/claude-my-marketplaceAgent313d agononeA170Claude Code
demo-researcherlukaskellerstein/claude-my-marketplaceAgent313d agononeA147Claude Code
dead-code-analyzerlukaskellerstein/claude-my-marketplaceAgent313d agononeA160Claude Code
demo-capture-operatorlukaskellerstein/claude-my-marketplaceAgent313d agononeA178Claude Code
demo-remotion-builderlukaskellerstein/claude-my-marketplaceAgent313d agononeA171Claude Code