Code Runner
Development Developer ToolsInstall Command
npx clawhub@latest install coderunner
Installation Guide
Make sure Node.js 22+ and OpenClaw are installed. Run openclaw --version in your terminal to verify.
Run the install command above in your terminal. ClawHub will automatically download and install Code Runner to the ~/.openclaw/skills/ directory.
Run openclaw skills list to check your installed skills and confirm Code Runner appears in the list.
Follow the configuration instructions in the description below to add skill settings to ~/.config/openclaw/openclaw.json5.
~/.openclaw/skills/ or the skills/ directory in your project root. Make sure the folder contains a SKILL.md file.
Detailed Description
Code Runner gives OpenClaw the ability to execute code, allowing the AI to not only write code but actually run it and return results.
Core Features
- Multi-Language Support: Python, JavaScript/TypeScript, Go, Rust, Ruby, Shell, and more
- Secure Sandbox: Code runs in an isolated environment without affecting the host system
- Package Management: The Python environment comes with commonly used packages pre-installed (numpy, pandas, requests, etc.), with on-demand installation available
- File I/O: Supports reading and writing files within the sandbox for data processing
- Timeout Protection: Automatically terminates code that runs too long
Configuration
{
skills: {
coderunner: {
timeout: 30, // Execution timeout (seconds)
languages: ["python", "javascript", "shell"],
sandboxType: "docker", // docker or process
maxMemory: "512m"
}
}
}
Use Cases
- Data analysis: Have the AI write a Python script to process CSV data and generate statistics
- Quick validation: Verify whether an algorithm idea is correct
- Automation scripts: Have the AI write and execute system management scripts
- Math computation: Handle complex mathematical calculations
Notes
The sandbox environment has resource limits and is not suitable for running large applications or long-duration tasks. Docker sandbox mode is recommended for the best isolation.