Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

dislerот disler★ 395 звёзд на GitHub26 установок в других каталогах

Об этом скилле

Agent Sandboxes

This skill provides access to E2B sandboxes through a streamlined CLI for safe code execution and file operations in isolated environments.

Variables

  • E2B_API_KEY: The environment variable containing the E2B API key (stored in the environment file)
  • SANDBOX_CLI_PATH: .claude/skills/agent-sandboxes/sandbox_cli/
  • ENVIRONMENT_FILE_PATH: ../../../../.env
  • TIMEOUT_DURATION_IN_SECONDS: 43200 (12 hours)

Prerequisites

Before using sandbox operations, validate the environment:

  1. Check for E2B_API_KEY:

    # Verify the API key is set
    grep "E2B_API_KEY" `ENVIRONMENT_FILE_PATH`
    

    If missing, instruct the user:

    Error: E2B_API_KEY not found in .env file
    
    Please add your E2B API key to the .env file in the project root:
    echo "E2B_API_KEY=your_api_key_here" >> .env
    
    Get your API key from: https://e2b.dev/docs
    
  2. Verify CLI is available: The sandbox CLI is located at SANDBOX_CLI_PATH The .env file is automatically loaded from the project root.

Instructions

  • IMPORTANT: Don't create files locally, always use the sandbox. Only do this if the user explicitly asks you to do so.
  • ALWAYS USE --timeout TIMEOUT_DURATION_IN_SECONDS
  • CAPTURE AND REMEMBER SANDBOX ID - Store it in your context, don't use shell variables or files
  • Multi-agent safe - Each agent tracks its own sandbox ID independently
  • Always validate E2B_API_KEY first - Don't proceed without it
  • Change directory to SANDBOX_CLI_PATH - All commands must be run from there
  • Use --shell for complex commands - Enables pipes, redirections, wildcards
  • Use --cwd instead of cd - More reliable for working directory changes
  • Binary files - Use upload/download for images, PDFs, executables
  • Never delete the sandbox unless you're explicitly asked to do so - Sandboxes auto-timeout after TIMEOUT_DURATION_IN_SECONDS

Template Tiers

Pre-built templates with different resource levels. Use --template flag with sbx init:

Template vCPU RAM Cost Best For
fullstack-vue-fastapi-node22 2 2GB $0.13/hr Simple apps (default)
fullstack-vue-fastapi-node22-lite 2 4GB $0.15/hr Browser tests
fullstack-vue-fastapi-node22-standard 4 4GB $0.27/hr Parallel builds
fullstack-vue-fastapi-node22-heavy 4 8GB $0.33/hr Multi-browser
fullstack-vue-fastapi-node22-max 8 8GB $0.44/hr Fastest

Build new templates: uv run build_template.py --tier <tier> or --list-tiers to see options.

When to Use Sandboxes

Use agent sandboxes when the user needs to:

  • Run untrusted or experimental code safely
  • Test packages or dependencies without affecting the local system
  • Execute system commands in an isolated environment
  • Work with binary files (images, PDFs, executables)
  • Clone and test repositories in isolation
  • Install and test different package versions
  • Run long-running processes without blocking

CLI Overview

The sandbox CLI has four core command groups:

  1. sbx init - Quick sandbox initialization
  2. sbx sandbox - Lifecycle management (create, connect, kill, pause, extend-lifetime, info)
  3. sbx files - File operations (ls, read, write, upload, download, rm, mkdir, mv)
  4. sbx exec - Unified command execution (the most powerful command)
  5. sbx browser - Browser automation for UI validation (visual testing)

Get CLI Help: Use sbx --help to see all available commands and options:

cd SANDBOX_CLI_PATH
uv run sbx --help           # Main help
uv run sbx init --help      # Help for init command
uv run sbx sandbox --help   # Help for sandbox commands
uv run sbx files --help     # Help for file operations
uv run sbx exec --help      # Help for exec command

Key Command: sbx exec

The exec command is the primary interface for running commands in sandboxes:

uv run sbx exec $SANDBOX_ID "command" [options]

Options:
  --cwd PATH          Working directory
  --env KEY=VALUE     Environment variables (multiple allowed)
  --root              Run as root user
  --shell             Enable shell features (pipes, redirections, wildcards)
  --timeout SECONDS   Command timeout (default: 60)
  --background        Run command in background

Important: All commands must be run from SANDBOX_CLI_PATH directory.

Key Command: sbx browser

Browser automation for visual validation of sandbox applications using Playwright's isolated Chromium.

Commands (all support --port PORT for parallel agents):

sbx browser init                        # First-time setup (once per machine)
sbx browser start [--headed]            # Start browser (--headed shows window)
sbx browser nav <url>                   # Navigate to URL
sbx browser eval <code>                 # Run JavaScript, returns result
sbx browser scree
Полный SKILL.md на GitHub

Установить Agent Sandboxes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

build_template.pycookbook/browser.mdexamples/01_run_python_code.mdexamples/02_test_package.mdexamples/03_clone_and_test_repo.mdexamples/04_process_binary_files.mdexamples/05_host_frontend.mdprompts/browse.mdprompts/browser-testing.mdprompts/build.mdprompts/download.mdprompts/host.mdprompts/plan-build-host-test.mdprompts/plan-full-stack.mdprompts/reboot.mdprompts/sandbox.mdprompts/test.mdsandbox_cli/.gitignoresandbox_cli/.python-versionsandbox_cli/README.mdsandbox_cli/pyproject.tomlsandbox_cli/src/__init__.pysandbox_cli/src/commands/__init__.pysandbox_cli/src/commands/browser.pysandbox_cli/src/commands/exec.pysandbox_cli/src/commands/files.pysandbox_cli/src/commands/sandbox.pysandbox_cli/src/main.pysandbox_cli/src/modules/__init__.pysandbox_cli/src/modules/browser.pysandbox_cli/src/modules/commands.pysandbox_cli/src/modules/files.pysandbox_cli/src/modules/sandbox.pysandbox_cli/temp/banana-pokemon-cards-iicr81igq2rw6a5qm2p65/README.mdsandbox_cli/temp/banana-pokemon-cards-iicr81igq2rw6a5qm2p65/index.htmlsandbox_cli/temp/claude-code-sonnet-4-5--easy_notes_app/App.vuesandbox_cli/temp/claude-code-sonnet-4-5--easy_notes_app/NoteEditor.vuesandbox_cli/temp/claude-code-sonnet-4-5--easy_notes_app/NotesList.vuesandbox_cli/temp/claude-code-sonnet-4-5--easy_notes_app/api.tssandbox_cli/temp/claude-code-sonnet-4-5--easy_notes_app/crud.py

FAQ

Что делает скилл 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.

Как установить скилл Agent Sandboxes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Agent Sandboxes запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Agent Sandboxes с