setup-sandbox

setup-sandbox is a command for Claude Code from henkisdabro/cloudflare-workers-react-boilerplate. It costs 0 tokens per session (2,604 once invoked), scanned C, original, MIT.

A setup command for Cloudflare Sandbox SDK, a toolkit for running code in isolated environments.

In plain words
What is it for?
Use it when adding Cloudflare Sandbox SDK to a project for secure, isolated code execution.
Why use it?
It helps keep user or untrusted code separate from the main application while setting up the required project support.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when adding Cloudflare Sandbox SDK to a project for secure, isolated code execution.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox
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.

Clone the repo
git clone --depth 1 https://github.com/henkisdabro/cloudflare-workers-react-boilerplate

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox/github.svg)](https://agentmods.dev/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox)
Your own site
<a href="https://agentmods.dev/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox"><img src="https://agentmods.dev/badge/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox/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-sandbox

Your own site · 80×15
<a href="https://agentmods.dev/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox"><img src="https://agentmods.dev/badge/commands/henkisdabro/cloudflare-workers-react-boilerplate/setup-sandbox.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,604 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. 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.00000 $0.02604
Opus 5.5 $0.00000 $0.01042
Sonnet 5.5 $0.00000 $0.00521
Haiku 4.5 $0.00000 $0.00260

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

Security

Grade C, and why

setup-sandbox scanned grade C with 2 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 24d 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.

RUN apt-get update && apt-get install -y --no-install-recommends python3 && rm -rf /var/lib/apt/lists/*

Makes network callslowCapability

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

The base image has Node.js 24 but no Python, Git or curl. For the AI code execution option, add
.claude/commands/setup-sandbox.md · 287 lines

How it starts

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

Setup Cloudflare Sandbox

You are helping the user add Cloudflare Sandbox SDK 1.0 (@cloudflare/sandbox 1.0.0) to this project for isolated code execution. The project is Vite + @cloudflare/vite-plugin, with the Worker in worker/index.ts and config in wrangler.jsonc.

Base every step on the current docs rather than memory: https://developers.cloudflare.com/sandbox/ - if anything below disagrees with them, the docs win. Sandbox SDK 0.x (getSandbox(), "unsafe": { "bindings": [{ "type": "sandbox" }] }) is legacy until 2026-12-31; do not generate 0.x code.

What is Sandbox SDK 1.0?

A sandbox is a Durable Object the project defines plus the Linux container it starts, each in its own microVM. The Durable Object drives the container through this.ctx.container (start(), exec(), getTcpPort()); @cloudflare/sandbox adds the Files, S3Mount and DirectoryBackup helpers. Full guide: SANDBOX.md.

Before Starting

Confirm with the user, and stop if any is missing:

  1. Workers Paid plan - Containers do not run on Free.
  2. Docker is running - check with docker info. Both pnpm dev and deploys build the image.
  3. The code really needs Linux - if it is JavaScript that only calls methods the Worker defines, suggest a Dynamic Worker instead.

Interactive Setup

Ask the user what they want to build:

  1. Run commands - execute shell commands or scripts from the Worker
  2. AI code execution - Claude writes Python, the sandbox runs it
  3. Something else - preview a web app, background processes, a browser terminal, R2 mounts, snapshots or coding agents. Do Steps 1-6, then follow the matching guide and example linked from cloudflare/sandbox-sdk.

Setup Steps

Step 1: Install the package

pnpm add -E @cloudflare/sandbox

Note the installed version - the Dockerfile tag in Step 2 must match it.

Read the full file on GitHub · 287 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. 24d ago Changed · -53 lines scan A → C 2304d53e9b28
  2. 1mo ago First seen · 340 lines · 0 tokens per session scan A 5d4000c8a4e5

Subscribe to this mod's changes

setup-sandbox is a command published in the GitHub repository henkisdabro/cloudflare-workers-react-boilerplate (13 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,604 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.