sandbox-stable

Build and maintain Cloudflare Sandbox apps on the stable @cloudflare/sandbox package.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/julianckt/adoptarun --skill sandbox-stable-julianckt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sandbox-stable
Source: https://github.com/julianckt/adoptarun/tree/main/.agents/skills/sandbox-stable
Command: npx skills add https://github.com/julianckt/adoptarun --skill sandbox-stable-julianckt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudflare/sandbox.

What problem does it solve? Developers working with Cloudflare Sandbox risk mixing stable and preview (@next) APIs, using deprecated transports, or guessing at command, session, and file APIs. This Skill gates the package line, enforces stable-package contracts, and routes every task to the correct official documentation. ## Core Features & Use Cases - Package Line Gate: Verifies the npm dependency and container image both match the stable @cloudflare/sandbox line, and redirects to sandbox-next or sandbox-migrate-to-next when they do not. - Stable API Contract: Enforces correct usage of exec, startProcess, execStream, sessions, sandbox.terminal, and RPC transport while blocking @next-only APIs like process.output(). - Documentation Retrieval Map: Maps tasks such as commands, files, mounts, backups, ports, tunnels, terminals, and code interpretation to the exact Cloudflare docs page to consult before implementing. - Use Case: A developer maintaining an existing Workers app that runs Python inside a sandbox uses this Skill to confirm the stable package, execute commands with buffered stdout/stderr, and clean up deprecated HTTP/WebSocket transports without migrating to the preview release. ## Quick Start Ask the assistant to review your Cloudflare Sandbox Worker code and confirm it uses only stable @cloudflare/sandbox APIs with a matching container image.

Frequently Asked Questions about sandbox-stable

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

FAQPage Schema
How do I execute commands in a Cloudflare Sandbox?▼

Call await sandbox.exec(command) with a command string on the stable @cloudflare/sandbox package. It resolves when the command finishes and returns buffered stdout, stderr, and exitCode. For long-running work, use startProcess or execStream instead.

What is the difference between @cloudflare/sandbox stable and @next?▼

The stable package is the current default documented in the main Sandbox docs, while @next is the 1.0 preview with a different single-handle process model. Never mix a stable Worker package with a next container image, and use the migration guide when porting.

Can I keep shell state across commands in Cloudflare Sandbox?▼

Yes, sessions preserve working directory and environment variables across commands. Use the default session via enableDefaultSession or create dedicated sessions with createSession when state must carry between exec calls.

How do I clean up deprecated Cloudflare Sandbox APIs without migrating?▼

Update the package and matching image first, then follow the 2026 deprecation guide. Search for patterns like SANDBOX_TRANSPORT, exposePort, enableDefaultSession, and execStream, and prefer RPC transport over deprecated HTTP/WebSocket transports.

When should I not use the stable @cloudflare/sandbox package?▼

New projects should start on @cloudflare/sandbox@next using the sandbox-next guidance, since 1.0 will become the stable release. Existing stable apps can keep shipping and migrate later with the official migration path.