Skill: Cloudflare Sandbox SDK
by Cloudflare
Build secure code-execution features on Cloudflare — sandboxes for AI-generated code, interpreters, and CI systems.
Build on @cloudflare/sandbox@next, the Sandbox SDK 1.0 preview — with a package gate that stops an agent mixing preview APIs into a stable app.
Cloudflare's Sandbox SDK runs isolated Linux environments on Cloudflare Containers, driven from a Worker. The SDK now has two live lines — the stable package and the @next 1.0 preview — whose APIs differ enough that code written for one fails on the other. This official skill covers the preview line, and its first job is making sure the agent is on it.
That is the "gate": before writing any code, inspect the app's npm dependency and container image and confirm both are on the preview line (@cloudflare/sandbox@next, cloudflare/sandbox:next). A default dependency means stop and load sandbox-stable; a port request means stop and load sandbox-migrate-to-next. Mixing an @next Worker package with a stable container image, in either direction, is called out as never correct.
The contract section then pins the semantics that most often get assumed wrong. sandbox.exec(argv) takes an argv list, not a shell string, and resolves when the process starts — it returns a handle, not a finished result. Results come from the handle: output(), logs(), waitForExit(), waitForPort(), waitForLog(), kill(). There is no implicit shell, so shell syntax needs an explicit ["/bin/bash", "-lc", script]. Each launch is independent, so a cd or export in one exec is invisible to the next; pass cwd and env per launch. Local wait timeouts and AbortSignal cancel the wait only — they do not kill the process. Process and terminal IDs belong to the current container rather than to the sandbox ID forever, so durable work stores the whole job, not an id.
It closes with a retrieval map pointing at the right preview doc per task, and a pre-ship checklist: lockfile and Dockerfile on the same line, typecheck against installed @next types, no live credentials in sandbox env, wildcard DNS for preview hostnames on a custom domain. For teams building code interpreters, agent sandboxes or CI-style execution on Workers. Apache-2.0.
The instructions your agent loads, as published by Cloudflare.
by Cloudflare
Build secure code-execution features on Cloudflare — sandboxes for AI-generated code, interpreters, and CI systems.
by Cloudflare
Build stateful AI agents on Cloudflare Workers — durable state, scheduling, RPC, WebSockets, and MCP servers.
Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.
The official Genkit skill for Node.js and TypeScript — flows, Dotprompt files, tools and the beta agent API with sessions, interrupts and branching.