Sandbox Sdk
Official cloudflare skill for Cloudflare — helps with deploying and managing cloud infrastructure.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add cloudflare-sandbox-sdk npx -- -y @trustedskills/cloudflare-sandbox-sdk
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"cloudflare-sandbox-sdk": {
"command": "npx",
"args": [
"-y",
"@trustedskills/cloudflare-sandbox-sdk"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables AI agents to build and manage secure, isolated code execution environments on Cloudflare Workers using the Cloudflare Sandbox SDK. It allows for running shell commands, executing code (including LLM-generated code), managing files within a sandboxed environment, and exposing ports. The skill is particularly useful for situations requiring controlled and reproducible code execution, especially when integrating with AI agents to execute generated code safely.
When to use it
- Executing LLM-Generated Code: Safely run Python or JavaScript code generated by an AI agent without risking the underlying system.
- Running Shell Scripts: Execute shell commands and scripts within a controlled environment for tasks like version checks or simple automation.
- Developing Isolated Applications: Build secure, isolated applications on Cloudflare Workers that require specific dependencies or environments.
- Reproducible Code Execution: Ensure consistent results by running code in a pre-defined and isolated sandbox.
Key capabilities
- Code Execution (Interpreter): Executes code snippets using
runCode()with support for Python and JavaScript/TypeScript. State persists within the context of execution. - Command Execution: Runs shell commands and scripts via
exec(). - File Management: Creates directories, writes files, reads files, and lists files within the sandbox environment.
- Port Exposure: Exposes ports for applications running inside the sandbox.
- Sandbox Creation & Destruction: Creates and destroys sandboxed environments as needed.
Example prompts
- "Run 'python --version' in the sandbox."
- "Execute this Python code:
import pandas as pd; data = [1,2,3]; print(sum(data))" - "Create a directory called 'my_project' and write a file named 'hello.py' with the content 'print('Hello from Sandbox!')'"
Tips & gotchas
- Docker Requirement: Local development requires Docker to be installed and functioning correctly (
docker infomust succeed). - Configuration Required: A
wrangler.jsoncfile is required, following a specific structure (do not modify it). - Explicit Contexts for Production: For production environments, create explicit code contexts to manage state effectively.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🏢 Official
Published by the company or team that built the technology.