code-runner

Executes JavaScript, TypeScript, Python, and shell snippets with timeout protection and output capture.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/sahiixx/moltworker --skill code-runner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-runner
Source: https://github.com/sahiixx/moltworker/tree/main/skills/code-runner
Command: npx skills add https://github.com/sahiixx/moltworker --skill code-runner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Code Runner skill enables you to execute arbitrary code snippets across JavaScript, TypeScript, Python, and shell, with built-in timeout protection and output capture to support testing, prototyping, and automation workflows.

Core Features & Use Cases

  • Multi-language execution: Run code snippets in JS, TS (via TSX), Python, and shell from a single tool.
  • Deterministic execution with safety: Enforce timeouts and capture stdout and stderr for reliable automation and benchmarking.
  • Use Case: Validate a function across runtimes, benchmark a snippet, or prototype a script before integrating into a larger workflow.

Quick Start

Use the code-runner skill to execute a simple JavaScript snippet like console.log('Hello') or a Python snippet like print('Hello'), and verify the outputs.

Frequently Asked Questions about code-runner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute Python and JavaScript code snippets safely for benchmarking?

You can run multi-language code snippets safely using a sandboxed execution environment with built-in timeout protection. This ensures deterministic execution by isolating the runtime and capturing stdout and stderr outputs for reliable benchmarking and testing workflows.

Can I run TypeScript code using a shell command and capture the output?

Yes, you can execute TypeScript code via TSX command support within a shell environment. The runner captures both stdout and stderr outputs while enforcing deterministic execution, allowing you to validate functions or prototype scripts directly from the command line.

What is the best way to automate multi-language code execution for testing?

The best way to automate multi-language code execution is using a unified tool that runs JS, TS, Python, and shell scripts with deterministic execution. It enforces timeouts and captures output, meeting the requirements for reliable automation and quick function validation.

Does the code runner support timeout protection for shell scripts?

Yes, the code runner supports timeout protection for shell scripts, as well as for JavaScript, TypeScript, and Python. This safety feature isolates execution and prevents long-running processes from blocking your automation or testing workflows.

Why does my code snippet execution hang during automation workflows?

Code snippet execution may hang if runtime limits are not enforced. Using a runner with built-in timeout protection ensures that long-running or infinite loops in JavaScript, Python, or shell scripts are safely terminated, preventing workflow blockages.

When do I need a sandbox to execute code snippets across different runtimes?

You need a sandbox to execute code snippets across different runtimes when performing automated benchmarking or prototyping. Safe isolation prevents arbitrary code from affecting the host system, while timeout protection ensures deterministic and reliable execution across JS, TS, Python, and shell.