cwc-setup

cwc-setup is a command for Claude Code from anthropics/cwc-workshops. It costs 23 tokens per session (1,179 once invoked), scanned D, original, Apache-2.0.

A setup command for the Agent Battle workshop, which connects its dependencies, server, bot, and relay until a participant is ready.

In plain words
What is it for?
Use it after a fresh clone to configure the participant environment, connect event settings, start the workshop services, and reach the ready state.
Why use it?
It checks required settings early and explains what the participant must provide or agree to, including the Minecraft usage agreement.

Command for Claude Code

About the project

CWC Workshops is a collection of materials from Anthropic-run workshops on building and evaluating AI-assisted coding workflows. The workshops cover model selection, multi-agent systems, managed agents, and product development with coding agents. The catalogue entries are examples and teaching materials from those workflows.

anthropics/cwc-workshops · 2,045 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anthropics/cwc-workshops/cwc-setup
Clone the repo
git clone --depth 1 https://github.com/anthropics/cwc-workshops

Made for: Claude Code.

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 cwc-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/anthropics/cwc-workshops/cwc-setup.svg)](https://agentmods.dev/commands/anthropics/cwc-workshops/cwc-setup)
Your own site
<a href="https://agentmods.dev/commands/anthropics/cwc-workshops/cwc-setup"><img src="https://agentmods.dev/badge/commands/anthropics/cwc-workshops/cwc-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
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.00023 $0.01179
Opus 5 $0.00012 $0.00589
Sonnet 5 $0.00005 $0.00236
Haiku 4.5 $0.00002 $0.00118

Measured 6d ago against content hash 83d6a4629412, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade D, and why

cwc-setup scanned grade D with 3 findings 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 6d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `java not found` | macOS: `brew install openjdk@21 && sudo ln -sfn $(brew --prefix openjdk@21)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/`. Linux: `sudo apt install openjdk-21-jdk`. Then re-run. |

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| `npm install (bot) failed` | Likely a corp registry. Run `(cd bot && rm -rf node_modules package-lock.json && npm install --registry=https://registry.npmjs.org)` then re-run `./setup.sh`. |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| `bot did not register with the relay` | Read `/tmp/mc-bot.log`, look for `[relay]` lines. Check `curl $EVENT_URL/api/config` works from their machine. If the event server is fine but WebSockets can't connect, the venue
agent-battle/.claude/commands/cwc-setup.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are setting up the Agent Battle workshop stack for a participant. Your job: get them from a fresh clone to ▸ ready with no manual debugging on their part. Be adaptive — every machine is a little different.

Steps

1. Check the participant env vars that must be exported:

for v in PARTICIPANT MINECRAFT_EULA; do
  if [ -z "${!v:-}" ]; then echo "MISSING: $v"; else echo "OK: $v"; fi
done
[ -f .env.event ] && grep EVENT_URL .env.event || echo "NO .env.event"

If any are MISSING, stop and tell them what to export:

  • ANTHROPIC_API_KEY — their own key from console.anthropic.com (optional if their environment has SDK OAuth/workload-identity auth)
  • PARTICIPANT — any unique name they pick
  • MINECRAFT_EULA — must be accept. Show them https://www.minecraft.net/eula and ask whether they agree. If yes, they run export MINECRAFT_EULA=accept. You must not set this for them or assume agreement — the user has to affirmatively accept the EULA themselves.

EVENT_URL, LEADERBOARD_KEY, and MC_SEED come from the .env.event file in this directory — setup.sh reads it automatically. Do NOT block on these. (If .env.event has an empty EVENT_URL, setup runs in SOLO mode — local event server + one quick-tunnel — which is correct for at-home practice.)

Do NOT proceed until PARTICIPANT and MINECRAFT_EULA are set (ANTHROPIC_API_KEY is optional).

2. Run setup and capture the full output:

./setup.sh 2>&1

3. Decide based on what you see:

If the last line is the boxed OPEN THIS IN YOUR BROWSER block → success. Tell them:

  • Open http://localhost:8088/view in a browser (their bot's camera)
  • Open my_agent.py and find the AGENT = dict(...) block — that's what they'll edit
  • Run python3 my_agent.py — every run is 5 min and posts to the leaderboard; best run counts, so iterate freely
  • python3 my_agent.py --eval for a ~30-60s scorecard with no run
  • You're standing by if anything breaks — they can type /cwc-fix

If you see (a die() line) → failure. Match the error to the playbook in CLAUDE.md and remediate. Common cases:

Error pattern Fix
java not found macOS: brew install openjdk@21 && sudo ln -sfn $(brew --prefix openjdk@21)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/. Linux: sudo apt install openjdk-21-jdk. Then re-run.
npm install (bot) failed Likely a corp registry. Run (cd bot && rm -rf node_modules package-lock.json && npm install --registry=https://registry.npmjs.org) then re-run ./setup.sh.
server failed — see /tmp/mc-server.log Read that log. If Address already in use: stale java holding :25565 → see CLAUDE.md "Killing leftovers". If Unsupported class file: Java too old, install 17+.
bot failed — see /tmp/mc-bot.log Read that log. Usually Cannot find module (npm install incomplete) or ECONNREFUSED (server not up yet — wait 10s, re-run).
bot did not register with the relay Read /tmp/mc-bot.log, look for [relay] lines. Check curl $EVENT_URL/api/config works from their machine. If the event server is fine but WebSockets can't connect, the venue network may block them — escalate to the facilitator.
event server failed (SOLO mode) Read /tmp/event-local.log. Usually a missing (cd event && npm install).
tunnel failed (SOLO mode only) Transient cloudflared issue. Re-run ./setup.sh. If /tmp/cloudflared is missing or zero-byte, delete it so tunnel.sh re-downloads.
ANTHROPIC_API_KEY not set warning Fine to proceed if their environment has SDK auth; otherwise have them export it.

After remediating, re-run ./setup.sh (it's idempotent). Loop until ▸ ready or you hit something not in the playbook — then explain what you see and ask if they want you to dig in.

Read the full file on GitHub · 82 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. 6d ago First seen · 82 lines · 23 tokens per session scan D 83d6a4629412

Subscribe to this mod's changes

cwc-setup is a command published in the GitHub repository anthropics/cwc-workshops (2,045 stars, last pushed 9d ago), licensed Apache-2.0. It adds 23 tokens to every session and 1,179 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.