Automated summary
This skill runs commands inside isolated containers through the agentkernel tool so the host machine stays protected when executing untrusted code or risky system commands.
Strengths
- Automatically detects the runtime (Python, Node, Rust, Go, Ruby, etc.) from the command and picks the matching Docker image.
- Three documented security profiles (permissive, moderate, restrictive) that control network access, working-directory and home mounts, env passthrough and read-only filesystem.
- Supports persistent sandboxes (create/start/exec/stop/remove) for longer-running work.
- A --keep flag retains the sandbox after execution to make debugging easier.
Limitations
- Fully depends on the external agentkernel CLI being installed, and its exact syntax cannot be verified from the skill alone.
- Compound commands using && or || must be wrapped in sh -c, which adds a manual step.
- Not suitable for operations that need host credentials, SSH keys or direct filesystem access.
Use it whenever you need to run generated or untrusted code, builds, or tests that could change system state.
Avoid it for simple file reads and writes, routine Git operations, or anything that requires the host's credentials and SSH keys.
Security analysis
CautionThe skill is designed for legitimate isolation and does not instruct destructive, exfiltrating, or obfuscated actions. However, it relies on powerful container/runtime tooling and documents permissive modes that mount host paths and pass environment variables, so it warrants caution rather than a safe rating.
- •No allowed-tools are declared even though the skill instructs the agent to execute shell commands via agentkernel.
- •The permissive profile mounts the current directory and home directory and passes environment variables, which could expose credentials or secrets if used carelessly.
- •Compound commands are supported through sh -c, which increases the chance of unintended execution if untrusted input is interpolated.
- •Persistent sandboxes and --keep may leave running containers or resources behind if cleanup is omitted.
- •The skill depends on an external agentkernel CLI plus Docker/Podman/Firecracker, so its actual security properties depend on that tool's installation and configuration.
Examples
Run this downloaded Python script in an isolated sandbox so it can't touch my machine: agentkernel run python3 script.pyInstall dependencies and run the test suite inside a sandbox: agentkernel run sh -c 'npm install && npm test'Reproduce this build failure with networking disabled using the restrictive profile: agentkernel run --profile restrictive cargo buildname: sandbox description: Execute commands in isolated sandboxes for security. Use when running untrusted code, system commands, or operations that could affect the host system. Automatically detects the right runtime (Python, Node, Rust, Go, Ruby, etc.) from the command.
Sandbox Skill
Execute commands in secure, isolated containers using agentkernel. This provides hardware-level isolation to protect the host system from potentially dangerous operations.
When to Use This Skill
Use this skill when:
- Running untrusted or generated code
- Executing shell commands that could modify system state
- Testing code in a clean environment
- Running build/test commands that might have side effects
- Executing code from external sources
- Any operation where isolation is beneficial for security
Do NOT use this skill for:
- Simple file reads/writes (use standard tools)
- Git operations (use standard tools)
- Operations that need access to host credentials or SSH keys
Instructions
Basic Usage
Run any command in an isolated sandbox:
agentkernel run <command> [args...]
For compound commands with && or ||, wrap in sh -c:
agentkernel run sh -c 'npm install && npm test'
The runtime is auto-detected from the command:
# Python
agentkernel run python3 script.py
agentkernel run pip install package-name
agentkernel run pytest
# Node.js
agentkernel run node script.js
agentkernel run npm test
agentkernel run npx create-react-app my-app
# Rust
agentkernel run cargo build
agentkernel run cargo test
# Go
agentkernel run go build
agentkernel run go test ./...
# Ruby
agentkernel run ruby script.rb
agentkernel run bundle exec rspec
# And more: PHP, Java, C/C++, Elixir, Lua, Terraform...
Specifying an Image
Override the auto-detected image:
agentkernel run --image ubuntu:24.04 apt-get update
agentkernel run --image postgres:16-alpine psql --version
Security Profiles
Control sandbox permissions with security profiles:
# Default: moderate security (network enabled, no mounts)
agentkernel run npm test
# Restrictive: no network, read-only filesystem, all capabilities dropped
agentkernel run --profile restrictive python3 script.py
# Permissive: network, mounts, environment passthrough
agentkernel run --profile permissive cargo build
# Disable network access specifically
agentkernel run --no-network curl example.com # Will fail
| Profile | Network | Mount CWD | Mount Home | Pass Env | Read-only | |---------|---------|-----------|------------|----------|-----------| | permissive | Yes | Yes | Yes | Yes | No | | moderate | Yes | No | No | No | No | | restrictive | No | No | No | No | Yes |
Keeping Sandboxes for Debugging
Keep the sandbox after execution:
agentkernel run --keep npm test
# Later: agentkernel sandbox remove run-<id>
Persistent Sandboxes
For longer-running work:
# Create and start
agentkernel sandbox create my-sandbox
agentkernel sandbox start my-sandbox
# Execute commands
agentkernel exec my-sandbox npm test
agentkernel exec my-sandbox python -m pytest
# Clean up
agentkernel sandbox stop my-sandbox
agentkernel sandbox remove my-sandbox
Supported Languages
| Language | Commands | Docker Image |
|----------|----------|--------------|
| Python | python, python3, pip, poetry, uv, pytest | python:3.12-alpine |
| Node.js | node, npm, npx, yarn, pnpm, bun | node:22-alpine |
| Rust | cargo, rustc | rust:1.85-alpine |
| Go | go, gofmt | golang:1.23-alpine |
| Ruby | ruby, bundle, rails, rake | ruby:3.3-alpine |
| Java | java, javac, mvn, gradle | eclipse-temurin:21-alpine |
| PHP | php, composer | php:8.3-alpine |
| C/C++ | gcc, g++, make, cmake | gcc:14-bookworm |
| .NET | dotnet | mcr.microsoft.com/dotnet/sdk:8.0 |
| Terraform | terraform | hashicorp/terraform:1.10 |
| Lua | lua, luajit | nickblah/lua:5.4-alpine |
| Shell | bash, sh, zsh | alpine:3.20 |
Security Notes
- Sandboxes run in isolated containers (Docker or Podman)
- On Linux with KVM, Firecracker microVMs provide hardware-level isolation
- Three security profiles:
permissive,moderate(default),restrictive - Use
--profile restrictivefor maximum isolation (no network, read-only fs) - Use
--no-networkto disable network access specifically - Host filesystem is NOT mounted by default (use
permissiveprofile to enable) - Each sandbox gets a clean environment
Agent Compatibility Modes
Agentkernel supports compatibility modes for different AI agents. Each mode configures sandbox behavior optimally for that agent's needs:
# Claude Code compatibility (default for this plugin)
agentkernel run --compatibility-mode claude python3 script.py
# Codex compatibility (stricter isolation)
agentkernel run --compatibility-mode codex python3 script.py
# Gemini compatibility (Docker-style)
agentkernel run --compatibility-mode gemini python3 script.py
Or configure in agentkernel.toml:
[sandbox]
name = "my-project"
[agent]
preferred = "claude"
compatibility_mode = "claude" # claude, codex, gemini, or native
[security]
profile = "moderate" # Can override compatibility mode defaults
Compatibility Mode Differences
| Mode | Network Policy | Project Mount | API Access | Isolation | |------|----------------|---------------|------------|-----------| | Native | Allow all | No | None | Moderate | | Claude | Domain allowlist | Yes | Anthropic API | Moderate | | Codex | Domain allowlist | Yes | OpenAI API | Strict | | Gemini | Domain allowlist | Yes | Google API | Moderate |
Claude mode allows: api.anthropic.com, cdn.anthropic.com, common package registries.
Codex mode allows: api.openai.com, cdn.openai.com, common package registries.
Gemini mode allows: *.googleapis.com, common package registries.
All modes block cloud metadata endpoints (169.254.169.254, metadata.google.internal).
MCP Server Integration
This plugin provides an MCP (Model Context Protocol) server for direct tool integration. When enabled, the following MCP tools are available:
Command Execution
| Tool | Description |
|------|-------------|
| sandbox_run | Run a command in a temporary sandbox with security profile and compatibility mode |
| sandbox_create | Create a persistent sandbox |
| sandbox_exec | Execute a command in an existing sandbox |
| sandbox_list | List all sandboxes |
| sandbox_remove | Remove a sandbox |
File Operations
| Tool | Description |
|------|-------------|
| sandbox_file_write | Write a file into a running sandbox |
| sandbox_file_read | Read a file from a sandbox (supports binary via base64) |
Lifecycle Management
| Tool | Description |
|------|-------------|
| sandbox_start | Start a stopped sandbox |
| sandbox_stop | Stop a running sandbox |
sandbox_run Options
The sandbox_run tool accepts these parameters:
command(required): Command to execute (array of strings)profile: Security profile (restrictive,moderate,permissive)compatibility_mode: Agent mode (native,claude,codex,gemini)network: Override network access (boolean)cwd: Working directory inside sandboxenv: Environment variables (object)timeout_ms: Command timeout in milliseconds (default: 30000)
Example MCP request:
{
"method": "tools/call",
"params": {
"name": "sandbox_run",
"arguments": {
"command": ["python3", "-c", "print('hello')"],
"compatibility_mode": "claude",
"timeout_ms": 60000
}
}
}
The MCP server starts automatically when the plugin is loaded and provides these tools via JSON-RPC over stdio.
Daemon Mode (Fast Execution)
For high-performance scenarios, agentkernel can run a daemon that maintains a pool of pre-warmed sandboxes:
# Start daemon with pre-warmed pool
agentkernel daemon start
# Check status
agentkernel daemon status # Shows warm VMs per agent type
# Commands use warm pool automatically (~50ms vs ~500ms cold start)
agentkernel run python3 script.py
# Pre-warm for specific agent types
agentkernel daemon prewarm --mode claude
# Stop daemon
agentkernel daemon stop
The daemon supports per-agent pool configuration for optimal warm starts:
# Example daemon config (future)
[daemon]
min_warm = 3
max_warm = 5
[daemon.agents.claude]
min_warm = 2
runtime = "python"
[daemon.agents.codex]
min_warm = 1
runtime = "python"
Claude Code Permission Configuration
Agentkernel MCP tools are designed to run safely in isolated sandboxes. You can configure Claude Code's approval behavior for these tools in your project's .claude/settings.json:
{
"permissions": {
"allow": [
"mcp__agentkernel__sandbox_run",
"mcp__agentkernel__sandbox_exec",
"mcp__agentkernel__sandbox_list",
"mcp__agentkernel__sandbox_file_read"
],
"ask": [
"mcp__agentkernel__sandbox_file_write",
"mcp__agentkernel__sandbox_create"
],
"deny": []
}
}
Tool Risk Levels
| Tool | Risk Level | Recommendation |
|------|------------|----------------|
| sandbox_list | Low | Auto-approve (read-only) |
| sandbox_file_read | Low | Auto-approve (read from sandbox only) |
| sandbox_run | Medium | Auto-approve (sandboxed execution) |
| sandbox_exec | Medium | Auto-approve (sandboxed execution) |
| sandbox_file_write | Medium | Ask (writes files into sandbox) |
| sandbox_create | Medium | Ask (creates persistent resources) |
| sandbox_start | Medium | Auto-approve (starts existing sandbox) |
| sandbox_stop | Medium | Auto-approve (stops sandbox) |
| sandbox_remove | Medium | Ask (removes sandbox) |
All tools run in isolated sandboxes, so even "medium" risk tools cannot affect the host system. The ask recommendations are for visibility, not security.
MCP Server Configuration
Add agentkernel to your Claude Code MCP servers:
// .mcp.json (project-level)
{
"mcpServers": {
"agentkernel": {
"command": "agentkernel",
"args": ["mcp", "server"],
"env": {}
}
}
}
Or globally in ~/.claude/mcp.json:
{
"mcpServers": {
"agentkernel": {
"command": "agentkernel",
"args": ["mcp", "server"]
}
}
}
Headless/Automation Mode
For CI/CD or automated workflows, use the --allowedTools flag:
claude --allowedTools "mcp__agentkernel__*" "Run tests in sandbox"
Or configure in settings for persistent auto-approval of all agentkernel tools.
Error Handling
If a command fails, the sandbox is automatically cleaned up. Use --keep to preserve it for debugging:
agentkernel run --keep failing-command
# Inspect: docker exec -it agentkernel-run-<id> sh
# Clean up: agentkernel sandbox remove run-<id>
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/secure-sandbox-execution-mm8o533s' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/secure-sandbox-execution-mm8o533s/download' --output '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md.part' && mv '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md.part' '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && test -s '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sandbox' && cp -R '.skill-downloads/secure-sandbox-execution-mm8o533s' '.claude/skills/sandbox'Cursor
test -f '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && test -s '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/sandbox' && cp -R '.skill-downloads/secure-sandbox-execution-mm8o533s' '.cursor/skills/sandbox'Codex
test -f '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && test -s '.skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/sandbox' && cp -R '.skill-downloads/secure-sandbox-execution-mm8o533s' '.agents/skills/sandbox'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/secure-sandbox-execution-mm8o533s'openskills read 'secure-sandbox-execution-mm8o533s'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/secure-sandbox-execution-mm8o533s/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
DeFi AMM Security
Security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, donation attacks, oracle manipulation, slippage, and integer math.
Semgrep Rule Creator
Security
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Includes test-first methodology, taint mode support, and validation steps. Helps when building targeted static analysis detections.
Dev Toolbar Review Guide
Security
Safety rules for the dev toolbar, PostHog client, and feature flags. Use when reviewing changes to dev-tools and related files, covering environment guards, override cookies, and SSE stream safety.