Agent skill

Sandbox SDK

by hodgef in hodgef/apiker

Build sandboxed applications for secure code execution. An agent skill from hodgef/apiker.

MITAuto-check passedDevOps & Cloud

Install Sandbox SDK

skills CLI
$ npx skills add hodgef/apiker --skill sandbox-sdk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hodgef/apiker sandbox-sdk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hodgef/apiker.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sandbox-sdk .claude/skills/sandbox-sdk && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sandbox-sdk
GitHub stars
127
Used in
2 other repos
Token cost
~1.4k tokens
SKILL.md length
352 words
Files
3 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Build sandboxed applications for secure code execution. An agent skill from hodgef/apiker.

  • Tasks that involve CI/CD
  • SKILL.md covers FIRST: Verify Installation, Retrieval Sources, Required Configuration and Quick Reference, plus 8 more sections
  • Calls npm and docker

What it does

Sandbox SDK is an agent skill from hodgef/apiker. Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/api-quick-ref.md` and `references/examples.md`).

It sits in DevOps & Cloud, covering CI/CD. It works with Cloudflare, Cloudflare Workers, Docker and Python. The repository describes itself as: 🔼 Create Serverless APIs with Cloudflare Workers, Durable Objects & Wrangler. The licence is MIT.

When your agent uses it

  • Tasks that involve CI/CD

Example prompts

  • “/sandbox-sdk”

Requirements

  • Python 3
  • Node.js
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 444ace2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.cloudflare.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sandbox SDK loads about 1.4k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hodgef/apiker at commit 444ace2, republished under its MIT licence (© hodgef). 352 words, ~1,443 tokens.

Download SKILL.mdSave it as .claude/skills/sandbox-sdk/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
sandbox-sdk
description
Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

Cloudflare Sandbox SDK

Build secure, isolated code execution environments on Cloudflare Workers.

FIRST: Verify Installation

bash
npm install @cloudflare/sandbox
docker info  # Must succeed - Docker required for local dev

Retrieval Sources

Your knowledge of the Sandbox SDK may be outdated. Prefer retrieval over pre-training for any Sandbox SDK task.

When implementing features, fetch the relevant doc page or example first.

Required Configuration

wrangler.jsonc (exact - do not modify structure):

jsonc
{
  "containers": [{
    "class_name": "Sandbox",
    "image": "./Dockerfile",
    "instance_type": "lite",
    "max_instances": 1
  }],
  "durable_objects": {
    "bindings": [{ "class_name": "Sandbox", "name": "Sandbox" }]
  },
  "migrations": [{ "new_sqlite_classes": ["Sandbox"], "tag": "v1" }]
}

Worker entry - must re-export Sandbox class:

typescript
import { getSandbox } from '@cloudflare/sandbox';
export { Sandbox } from '@cloudflare/sandbox';  // Required export

Quick Reference

TaskMethod
Get sandboxgetSandbox(env.Sandbox, 'user-123')
Run commandawait sandbox.exec('python script.py')
Run code (interpreter)await sandbox.runCode(code, { language: 'python' })
Write fileawait sandbox.writeFile('/workspace/app.py', content)
Read fileawait sandbox.readFile('/workspace/app.py')
Create directoryawait sandbox.mkdir('/workspace/src', { recursive: true })
List filesawait sandbox.listFiles('/workspace')
Expose portawait sandbox.exposePort(8080)
Destroyawait sandbox.destroy()

Core Patterns

Execute Commands
typescript
const sandbox = getSandbox(env.Sandbox, 'user-123');
const result = await sandbox.exec('python --version');
// result: { stdout, stderr, exitCode, success }

Use runCode() for executing LLM-generated code with rich outputs:

typescript
const ctx = await sandbox.createCodeContext({ language: 'python' });

await sandbox.runCode('import pandas as pd; data = [1,2,3]', { context: ctx });
const result = await sandbox.runCode('sum(data)', { context: ctx });
// result.results[0].text = "6"

Languages: python, javascript, typescript

State persists within context. Create explicit contexts for production.

File Operations
typescript
await sandbox.mkdir('/workspace/project', { recursive: true });
await sandbox.writeFile('/workspace/project/main.py', code);
const file = await sandbox.readFile('/workspace/project/main.py');
const files = await sandbox.listFiles('/workspace/project');

When to Use What

NeedUseWhy
Shell commands, scriptsexec()Direct control, streaming
LLM-generated coderunCode()Rich outputs, state persistence
Build/test pipelinesexec()Exit codes, stderr capture
Data analysisrunCode()Charts, tables, pandas

Extending the Dockerfile

Base image (docker.io/cloudflare/sandbox:0.7.0) includes Python 3.11, Node.js 20, and common tools.

Add dependencies by extending the Dockerfile:

dockerfile
FROM docker.io/cloudflare/sandbox:0.7.0

# Python packages
RUN pip install requests beautifulsoup4

# Node packages (global)
RUN npm install -g typescript

# System packages
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*

EXPOSE 8080  # Required for local dev port exposure

Keep images lean - affects cold start time.

Show full SKILL.md (140 more words)Show less

Preview URLs (Port Exposure)

Expose HTTP services running in sandboxes:

typescript
const { url } = await sandbox.exposePort(8080);
// Returns preview URL for the service

Production requirement: Preview URLs need a custom domain with wildcard DNS (*.yourdomain.com). The .workers.dev domain does not support preview URL subdomains.

See: https://developers.cloudflare.com/sandbox/guides/expose-services/

OpenAI Agents SDK Integration

The SDK provides helpers for OpenAI Agents at @cloudflare/sandbox/openai:

typescript
import { Shell, Editor } from '@cloudflare/sandbox/openai';

See examples/openai-agents for complete integration pattern.

Sandbox Lifecycle

  • getSandbox() returns immediately - container starts lazily on first operation
  • Containers sleep after 10 minutes of inactivity (configurable via sleepAfter)
  • Use destroy() to immediately free resources
  • Same sandboxId always returns same sandbox instance

Anti-Patterns

  • Don't use internal clients (CommandClient, FileClient) - use sandbox.* methods
  • Don't skip the Sandbox export - Worker won't deploy without export { Sandbox }
  • Don't hardcode sandbox IDs for multi-user - use user/session identifiers
  • Don't forget cleanup - call destroy() for temporary sandboxes

Detailed References

© hodgef, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .agents/skills/sandbox-sdk of hodgef/apiker.

  • SKILL.md
  • references/api-quick-ref.md
  • references/examples.md

Open the folder on GitHubat commit 444ace2

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in hodgef/apiker, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Sandbox SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sandbox SDK compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sandbox SDK this skillhodgef/apiker1272 repos~1.4kAutomated safety check: PassMIT
Devops SpecialistCaoMeiYouRen/caomei-auth220—~446Automated safety check: NotesMIT
Prepare Cloudflare Production DeploymentLubomirGeorgiev/cloudflare-workers-nextjs-saas-template786—~5.9kAutomated safety check: NotesMIT
DDNS Build and Release MaintenanceNewFuture/DDNS4.7k—~444Automated safety check: PassMIT
Plugin Testapache/skywalking-python219—~2.3kAutomated safety check: PassApache-2.0
Code PatternsAedelon/claude-code-blueprint120—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Devops Specialist

    CaoMeiYouRen/caomei-auth

    修改 Docker、CI/CD、部署配置、环境变量、运行时参数、构建脚本和发布流程时使用。优先覆盖 Docker、Vercel、Cloudflare 与 GitHub Actions 场景。用户提到 deploy、Dockerfile、workflow、CI、CD、environment variables、build pipeline、release config 时都应触发。

    220 GitHub stars~446 tokensUpdated 8 days ago
    DevOps & CloudAuto-check: notes
  • Prepare Cloudflare Production Deployment

    LubomirGeorgiev/cloudflare-workers-nextjs-saas-template

    Source-of-truth runbook for preparing this Vinext Cloudflare Workers SaaS template for production deployment.

    786 GitHub stars~5.9k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • Maintains the DDNS project's GitHub Actions, Docker and Nuitka builds, packaging and release preparation without touching publishing credentials.

    4.7k GitHub stars~444 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Plugin Test

    apache/skywalking-python

    Build Docker test images and run SkyWalking Python plugin/unit/e2e tests locally, mirroring the CI pipeline

    219 GitHub stars~2.3k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Code Patterns

    Aedelon/claude-code-blueprint

    Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.

    120 GitHub stars~1.2k tokensUpdated 7 mo ago
    DevOps & CloudAuto-check passed
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 11 days ago
    DevOps & CloudAuto-check passed

More from hodgef/apiker

All 11 skills in this repo
  • Cloudflare

    hodgef/apiker

    Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…

    127 GitHub starsUsed in 7 repos~2.2k tokens
    Auto-check passed
  • Durable Objects

    hodgef/apiker

    Create and review Cloudflare Durable Objects. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 4 repos~1.5k tokens
    Auto-check passed
  • Send and receive transactional emails with Cloudflare Email Service (Email Sending + Email Routing).

    127 GitHub starsUsed in 2 repos~2k tokens
    Auto-check passed
  • Web Perf

    hodgef/apiker

    Analyzes web performance using Chrome DevTools MCP. An agent skill from hodgef/apiker.

    127 GitHub starsUsed in 5 repos~2k tokens
    Auto-check passed
  • Reviews and authors Cloudflare Workers code against production best practices.

    127 GitHub starsUsed in 6 repos~1.8k tokens
    Auto-check passed
  • Apiker

    hodgef/apiker

    Develop, review, and extend the Apiker library — a framework for building serverless REST APIs on Cloudflare Workers + Durable Objects.

    127 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Sandbox SDK

What does Sandbox SDK do?

Build sandboxed applications for secure code execution. An agent skill from hodgef/apiker. Sandbox SDK is an agent skill from hodgef/apiker. Build sandboxed applications for secure code execution.

When should I use Sandbox SDK?

Sandbox SDK fits situations like: tasks that involve CI/CD.

How do I install Sandbox SDK in Claude Code?

Run `npx skills add hodgef/apiker --skill sandbox-sdk -a claude-code`. Or copy the skill folder (.agents/skills/sandbox-sdk in hodgef/apiker) into .claude/skills/sandbox-sdk in your project. Claude Code loads it when a task matches its description.

How do I install Sandbox SDK in Codex?

Run `npx skills add hodgef/apiker --skill sandbox-sdk -a codex`. Or copy the skill folder (.agents/skills/sandbox-sdk in hodgef/apiker) into .agents/skills/sandbox-sdk in your project. Codex loads it when a task matches its description.

Can I use Sandbox SDK in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hodgef/apiker --skill sandbox-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sandbox-sdk, .gemini/skills/sandbox-sdk, .github/skills/sandbox-sdk and .opencode/skills/sandbox-sdk in your project.

What does Sandbox SDK need to run?

Going by SKILL.md and its folder, Sandbox SDK needs the command-line tools its instructions call (npm and docker). Our summary lists: Python 3; Node.js; Docker.

Does Sandbox SDK access the network?

SKILL.md names 2 domains. As links in the text: developers.cloudflare.com and github.com. This is read from the text; nothing was executed.

Is Sandbox SDK safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sandbox SDK use?

Sandbox SDK is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sandbox SDK use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Sandbox SDK?

Skills that share tags, products or a category with Sandbox SDK: Devops Specialist (CaoMeiYouRen/caomei-auth, 220 stars), Prepare Cloudflare Production Deployment (LubomirGeorgiev/cloudflare-workers-nextjs-saas-template, 786 stars), DDNS Build and Release Maintenance (NewFuture/DDNS, 4.7k stars) and Plugin Test (apache/skywalking-python, 219 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sandbox SDK?

hodgef (a GitHub user) maintains it in hodgef/apiker, which has 127 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 20, 2026.

Source: hodgef/apiker on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.