managing-e2b-sandboxes
Manages E2B sandbox operations including code execution, debugging, and template building. Triggers when working/asking about sandboxes, code interpreters, or secure code execution environments.
Best use case
managing-e2b-sandboxes is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Manages E2B sandbox operations including code execution, debugging, and template building. Triggers when working/asking about sandboxes, code interpreters, or secure code execution environments.
Teams using managing-e2b-sandboxes should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/managing-e2b-sandboxes/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How managing-e2b-sandboxes Compares
| Feature / Agent | managing-e2b-sandboxes | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Manages E2B sandbox operations including code execution, debugging, and template building. Triggers when working/asking about sandboxes, code interpreters, or secure code execution environments.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# E2B Sandbox Helper
## Step 1: Analyze Codebase Context
Before providing guidance, understand the project:
```bash
# Find SDK version and sandbox usage
grep -r "e2b" package.json requirements.txt pyproject.toml 2>/dev/null
grep -r "Sandbox" --include="*.py" --include="*.ts" --include="*.js" .
grep -r "timeout" --include="*.py" --include="*.ts" --include="*.js" .
```
Read relevant files to understand sandbox lifecycle, error handling, and timeout configuration.
## Step 2: Check Build System
```bash
# Detect legacy vs modern build system
find . -name "e2b.Dockerfile" -o -name "e2b.toml" 2>/dev/null
grep -rl "from e2b import Template\|Template()" --include="*.py" . 2>/dev/null
```
| Found | Build System | Action |
|-------|--------------|--------|
| `e2b.Dockerfile` | Legacy (v1) | Recommend migration |
| `Template()` usage | Modern (v2) | Good |
| Nothing | No custom template | Use default OR Build System 2.0 |
**IMPORTANT**:
- For **legacy systems**: Suggest `e2b template migrate`
- For **new custom templates**: ALWAYS use Build System 2.0 with `Template()`. NEVER create `e2b.Dockerfile` or `e2b.toml` files.
See [BUILD-SYSTEM.md](BUILD-SYSTEM.md) for how to build custom templates.
## Step 3: Fetch Documentation
**1. MCP (preferred)** - Check if `mcp__e2b-docs__SearchE2BDocs` is available. If yes, use it:
```
mcp__e2b-docs__SearchE2BDocs({ query: "auto pause sandbox" })
```
If MCP is NOT available, prompt the user:
> "I recommend installing the E2B docs MCP for faster lookups. Run: `claude mcp add --transport http e2b-docs https://e2b.dev/mcp`"
**2. WebFetch** - Fetch `https://e2b.dev/docs/llms.txt` first to find the right URL, then fetch the specific page.
## Step 4: Code Review
Copy this checklist:
```
E2B Code Review:
- [ ] Timeout configured (Python: seconds, JS: timeoutMs in ms)
- [ ] Python uses Sandbox.create(), not Sandbox()
- [ ] Exception handling around sandbox.run_code()
- [ ] Cleanup guaranteed (context manager or finally block)
- [ ] Sandbox validation before operations
- [ ] Streaming for long operations (on_stdout/on_stderr)
- [ ] Errors returned to LLM for self-correction
```
### Report Format
```
## E2B Code Review Results
### Critical Issues
1. **[CRITICAL]** Issue description
- File: `path:line`
- Fix: `code example`
```
## Quick Reference
### SDK Differences
| | Python | JavaScript |
|-|--------|------------|
| Timeout param | `timeout` (seconds) | `timeoutMs` (milliseconds) |
| Create sandbox | `Sandbox.create()` | `Sandbox.create()` |
| 5 min timeout | `timeout=300` | `timeoutMs=300000` |
### Common Gotchas
| Symptom | Cause | Solution |
|---------|-------|----------|
| "Sandbox not found" | Timeout expired | Increase timeout, use `set_timeout()` |
| 502 Bad Gateway | Sandbox timeout | Increase `timeout` at creation |
| Code runs, no output | Wrong location | Check `logs.stdout`, not just `results` |
| Template build fails | Alpine or missing `-y` | Use Debian-based, add `-y` to apt |
**Note**: `set_timeout()` RESETS from now, doesn't ADD to remaining time.
### Execution Result Structure
```python
execution = sandbox.run_code(code)
if execution.error:
execution.error.name # Error type
execution.error.value # Message
execution.error.traceback # Full traceback
execution.results # Jupyter-style outputs (plots, dataframes)
execution.logs.stdout # print() output
execution.logs.stderr # Errors, warnings
execution.text # Main result as string
```
## Detailed References
- **Code templates**: See [TEMPLATES.md](TEMPLATES.md)
- **CLI & Python snippets**: See [CLI.md](CLI.md)
- **Custom template building**: See [BUILD-SYSTEM.md](BUILD-SYSTEM.md)
- **File operations (read/write) & advanced patterns**: See [REFERENCE.md](REFERENCE.md)Related Skills
managing-vercel
Vercel platform CLI for frontend deployments, serverless functions, and edge network management. Use for deploying applications, managing domains, environment variables, and debugging deployments.
managing-adrs
Create and manage Architecture Decision Records (ADRs) with auto-numbering, template detection, and index maintenance. Use when user mentions "ADR", "architecture decision", "document this decision", "create ADR", editing ADR files (docs/adr/, doc/adr/, .adr/), or discussing architectural choices and tradeoffs.
managing-traefik
Manages Traefik reverse proxy for local development. Use when routing domains to local services, configuring CORS, checking service health, or debugging connectivity issues.
managing-skills
Install, find, update, and manage agent skills. Use when the user wants to add a new skill, search for skills that do something, check if skills are up to date, or update existing skills. Triggers on: install skill, add skill, get skill, find skill, search skill, update skill, check skills, list skills.
managing-astro-local-env
Manage local Airflow environment with Astro CLI. Use when the user wants to start, stop, or restart Airflow, view logs, troubleshoot containers, or fix environment issues. For project setup, see setting-up-astro-project.
Agent Sandboxes
Operate E2B agent sandboxes using the CLI. Use when user needs to run code in isolation, test packages, execute commands safely, or work with binary files in a sandbox environment. Keywords: sandbox, e2b, isolated environment, run code, test code, safe execution.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
pdf-official
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmaticall...
pdf-manipulation
Manipulate PDF files including merge, split, extract, redact, convert, and secure workflows.
pdf-api-io-automation
Automate PDF API IO tasks via Rube MCP (Composio). Always search tools first for current schemas.
pcf-overview
Power Apps Component Framework overview and fundamentals Triggers on: **/*.{ts,tsx,js,json,xml,pcfproj,csproj}