ClawExplorer logo

ClawExplorer

OpenClaw skill

docker-sandbox

An OpenClaw skill that provides a secure Docker-based sandbox for executing untrusted shell commands and code. It enforces resource limits on CPU and memory, disables network access, and uses ephemeral containers with no persistent storage. Containers are automatically cleaned up after execution.

Files

Review the files below to add this skill to your agents.

SKILL.md content

Unable to load SKILL.md content from source.

How this skill works

  • The skill executes user-provided code inside an isolated Docker container
  • It supports multiple programming languages via pre-built Docker images
  • Containers are launched with strict resource limits: 1 CPU core, 512MB RAM, 10s timeout
  • Network access is disabled (--network=none)
  • Code is written to a temporary file in /tmp inside the container
  • The container runs a specific entrypoint command based on the language
  • Stdout, stderr, and exit code are captured and returned to the agent
  • The container is always removed (--rm) after execution

When to use it

  • When executing arbitrary shell commands in an isolated Docker container
  • When running untrusted code safely without host system access
  • When testing scripts or binaries in a resource-limited environment

Best practices

  • Ensure Docker is installed and the daemon is running before using the skill
  • Configure resource limits (MAX_MEMORY, MAX_CPU, TIMEOUT) to prevent abuse
  • Use non-root user (1000:1000) inside containers for security
  • Mount /tmp as tmpfs and avoid unnecessary volume mounts
  • Disable network access (--network none) by default
  • Always use --rm flag to automatically remove containers after execution
  • Select appropriate DOCKER_IMAGE (e.g., language-specific slim variants)

Example use cases

  • Executing arbitrary commands in isolation: Run shell commands or scripts inside a Docker container to ensure host system safety, capturing stdout and stderr.
  • Running language-specific code interpreters: Execute code using Docker images like python:3.12-slim for Python scripts or node:20-alpine for JavaScript, in an ephemeral container.
  • Safe computation and data processing: Perform calculations or process data (e.g., using bc, awk, or custom scripts) without risking the host environment.

FAQs

More similar skills to explore

  • achurch

    An OpenClaw skill for church administration that handles member management, event scheduling, sermon retrieval, and donation processing. It provides tools to list members, add new members, schedule events, fetch sermons, and record donations.

  • agent-config

    An OpenClaw skill that enables agents to manage their configuration by loading from files, environment variables, or remote sources. It supports retrieving, setting, and validating configuration values. The skill allows for hot-reloading of configurations.

  • agent-council

    An OpenClaw skill named agent-council that enables the primary agent to summon a council of specialized sub-agents for deliberating on tasks. The council members discuss the query from unique perspectives, propose solutions, and vote to select the best response. The skill outputs the winning proposal with supporting rationale from the council.

  • agent-identity-kit

    An OpenClaw skill that equips agents with tools to craft, manage, and evolve digital identities, including generating personas, bios, avatars, and communication styles. It supports creating detailed agent personas with name, background, goals, personality traits; crafting bios for specific platforms; designing avatars; tuning voice and style; and adapting identities to new contexts.

  • agenticflow-skill

    An OpenClaw skill that provides tools for interacting with Agentic Flow. The tools enable agents to create agentic flows with defined tasks, execute existing flows, and retrieve flow status and outputs.

  • agentlens

    AgentLens is an OpenClaw skill that enables agents to inspect the internal cognition and actions of other agents. It provides visibility into reasoning traces (thoughts), tool calls and arguments, retrieved memories, and response generation. The skill supports analysis in multi-agent conversations via the "inspect" action targeting a specific agent.