cloudflare-sandbox

Create isolated Linux containers for secure code execution in Cloudflare Workers.

204|30|Updated Nov 8, 2025
One-click install
npx skills add https://github.com/secondsky/claude-skills --skill cloudflare-sandbox-secondsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-sandbox
Source: https://github.com/secondsky/claude-skills/tree/main/plugins/cloudflare-sandbox/skills/cloudflare-sandbox
Command: npx skills add https://github.com/secondsky/claude-skills --skill cloudflare-sandbox-secondsky

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Cloudflare Sandboxes provide isolated Linux containers at the edge for secure code execution, git operations, and AI-assisted tasks.

Core Features & Use Cases

  • Per-sandbox containers with durable object routing
  • Secure code execution for Python/Node.js
  • Session-based workflows and ephemeral environments
  • Guidance on persistence, lifecycle, and security considerations

Quick Start

Create a sandbox, run code, and destroy when done; use sessions for multi-step tasks.

Frequently Asked Questions about cloudflare-sandbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run untrusted code securely in Cloudflare Workers?

Cloudflare Sandboxes provide isolated Linux containers at the edge for secure code execution of untrusted scripts. Deploy sandboxes within Workers and Durable Objects, execute Python or Node.js code via the exec API, and destroy containers after use to eliminate attack surface.

Can I persist state across multiple code executions in a sandbox?

Yes, sandboxes support session-based workflows for multi-step tasks. Create a session to maintain working directories and state across executions; use readFile, writeFile, and gitCheckout APIs within the same session, then destroy when complete.

What's the best way to run AI code interpreters at the edge?

Edge sandboxes enable ephemeral code execution for AI agent workflows and notebooks. Spin up per-request containers in Cloudflare's distributed network, execute generated code safely, and tear down automatically—ideal for AI-assisted tasks without persistent infrastructure.

Do sandboxes support git operations and repository checkouts?

Yes, sandboxes include gitCheckout in the API surface for cloning repositories into ephemeral containers. Combine with code execution to enable CI-like builds, automated git operations, and repository-driven workflows within isolated edge environments.

What are the limitations of ephemeral container sandboxes?

Sandboxes are designed for stateless, per-request execution. Persistence requires external storage integration; containers are destroyed on lifecycle completion, so plan for data export before sandbox termination if long-term retention is needed.