Setup & Installation
What This Skill Does
The Cloudflare Sandbox SDK builds secure, isolated code execution environments on Workers. Covers sandbox lifecycle, running commands, file operations, a code interpreter, and preview URLs — useful for AI code execution, code interpreters, CI/CD systems, interactive dev environments, and running untrusted code.
Isolating untrusted code usually requires standing up VMs or containers — the Sandbox SDK provides a lightweight, Workers-native isolation primitive with lifecycle, files, commands, and previews built in.
When to use it
- Running untrusted user-submitted code from an AI code interpreter
- Building a web-based coding playground with isolated execution
- Executing CI/CD test steps in an isolated sandbox per run
- Spinning up interactive dev environments with preview URLs
- Running tool-call code for an agent without exposing the host Worker