Code Executor for Openclaw

A high-performance execution environment that allows AI agents to write and run code on the fly to solve any computational or system task.

miguelguerra200022-sudo
v1.0.0
Feb 28, 2026
1
3.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install code-executor

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install code-executor using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Code Executor?

The Code Executor skill empowers your AI agent with the ability to generate and execute logic in real-time. Instead of being limited to pre-defined functions, the agent can synthesize scripts in Python, JavaScript, TypeScript, Bash, or SQL to handle unique problems. By leveraging this component of Openclaw Skills, you provide your agent with a flexible sandbox where it can calculate complex formulas, manipulate local files, or process data without manual intervention.

Built for developers who need maximum flexibility, this skill transforms the AI from a text generator into an active problem solver. It includes built-in safety features like sandboxing and confirmation prompts to ensure that code execution remains under user control while providing the 'infinite power' of a programmable environment.

Code Executor Use Cases

  • Performing complex mathematical calculations or scientific computing that exceed standard LLM capabilities.
  • Automating batch file operations, such as renaming hundreds of documents or organizing directories based on date patterns.
  • Processing and transforming large datasets using specialized libraries like Pandas or logic-heavy JavaScript functions.
  • Rapidly prototyping and testing small code snippets or debugging existing scripts within an interactive session.
  • Running system-level diagnostics or shell commands securely via the Bash runtime.

How Code Executor Works

  1. The AI agent analyzes the user's request and determines that a programmatic solution is required.
  2. The agent generates a specific script (e.g., Python or Node.js) designed to solve the problem.
  3. The generated code is passed to the Code Executor within the Openclaw Skills framework.
  4. If configured, the system requests user confirmation before proceeding with the execution.
  5. The code runs in a secure sandbox, and the resulting output or error message is returned to the agent.
  6. The agent interprets the results and provides a final answer or continues the workflow based on the output.

Code Executor Setup

To integrate this skill into your environment, ensure you have the required runtimes installed (Python 3, Node.js, etc.). Configure your security parameters in your environment settings:

# Enable the execution sandbox
export CODE_SANDBOX=true

# Set execution timeout in seconds
export CODE_TIMEOUT=30

# Require manual approval for all execution tasks
export CODE_REQUIRE_CONFIRM=true

Code Executor Data Schema & Taxonomy

The Code Executor organizes execution data and environment settings through a structured configuration. It tracks the runtime state and provides metadata for every execution event within the Openclaw Skills environment.

Runtime Command Usage Case
Python python3 Data science, math, and general automation
JavaScript node Web-related logic and JSON processing
TypeScript ts-node Strongly typed script execution
Bash bash/sh System tasks and file management
SQL sqlite3 Local database queries and data filtering

Code Executor Advanced Features

  • Interactive REPL Support: Start live Python or JavaScript sessions for step-by-step code exploration.
  • Dynamic Dependency Installation: The skill can detect missing packages and prompt to install them via pip or npm.
  • Security Hardening: Fine-grained controls for network access, filesystem permissions (read-only vs read-write), and execution timeouts.
  • Multi-Language Support: Seamlessly switch between different runtimes within the same conversation to utilize the best tool for the job.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*