code-runner · git:20260416.d3b0b2c · 2026-04-16 · sha256 dd731e9c49ad743b

code-runner git:20260416.d3b0b2cA

Immutable. This exact content never changes and is served at /api/v1/blob/dd731e9c49ad743b.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_xphaudodyjff4lyl/dd731e9c49ad743b20b3912b5b248725a51e2d2e74c314f86847c26a9d8769c9.json

Then /plugin install code-runner@markdownregistry-xphaudodyjff4lyl in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: code-runner
description: Execute code in multiple programming languages. Use when the user asks to run, test, or debug code in Python, JavaScript, shell, or other languages.
metadata:
  fastclaw:
    always: true
---

# Code Runner Skill

Execute code using the `exec` tool in the sandbox environment.

## Available Languages

### Python 3
```bash
python3 -c "print('hello')"
# Or write to file and run:
python3 script.py
```
Install packages with: `pip install package_name`

### Shell/Bash
```bash
echo "hello" && ls -la
```

### Node.js (install first if needed)
```bash
# Install node if not available
apt-get update && apt-get install -y nodejs npm 2>/dev/null || apk add nodejs npm 2>/dev/null
node -e "console.log('hello')"
```

## Guidelines

- **Always execute code immediately** — don't just show it
- For multi-line scripts, use `write_file` to save then `exec` to run
- Install missing packages automatically without asking
- Show the complete output to the user
- If code fails, analyze the error and fix it automatically
- For Python one-liners, use `python3 -c "..."`
- For complex scripts, write to a `.py` file first

## Error Handling
- If a command fails, check the error and try to fix it
- Common issues: missing packages (install them), syntax errors (fix them), permission denied (use appropriate paths)
- Always retry at least once after fixing the issue