CodeQL, Semgrep and SARIF static-analysis toolkit from Trail of Bits: taint tracking, fast pattern scans and merged, deduplicated security findings for coding agents.
Sandbox SDK (1.0 Preview)Skill
Summary
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.
Features
- Package gate that refuses to apply preview APIs to a stable app
- Pins exec() semantics: argv list, handle-not-result, no implicit shell
- Explains why process IDs are container-scoped, not sandbox-scoped
- Pre-ship checklist for lockfile, types, secrets and preview DNS
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Description
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.
Related Skills
Microsoft's official Playwright skill — drives a real browser from the command line using accessibility snapshots and element refs, and plans, generates and heals Playwright tests.
Google's official agent skill for writing production Maps Platform code — grounded in freshly fetched docs, with a demo key path that needs no billing account.
Railway's official agent skill: create projects, provision databases and buckets, deploy, manage variables and domains, and read build failures back — from the CLI, API or MCP server.