Agent Skills › fastclaw-ai/fastclaw › code-runner

code-runner

GitHub

在沙箱中执行 Python、Shell、Node.js 等多语言代码。支持自动安装依赖、即时运行脚本及失败后自动修复错误,适用于用户请求运行、测试或调试代码的场景。

skills/code-runner/SKILL.md fastclaw-ai/fastclaw

触发场景

用户要求运行代码片段 需要测试代码逻辑 请求调试并修复代码错误

安装

npx skills add fastclaw-ai/fastclaw --skill code-runner -g -y
更多选项

不安装直接使用

npx skills use fastclaw-ai/fastclaw@code-runner

指定 Agent (Claude Code)

npx skills add fastclaw-ai/fastclaw --skill code-runner -a claude-code -g -y

安装 repo 全部 skill

npx skills add fastclaw-ai/fastclaw --all -g -y

预览 repo 内 skill

npx skills add fastclaw-ai/fastclaw --list

SKILL.md

Frontmatter
{
    "name": "code-runner",
    "metadata": {
        "fastclaw": {
            "always": true
        }
    },
    "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."
}

Code Runner Skill

Execute code using the exec tool in the sandbox environment.

Available Languages

Python 3

python3 -c "print('hello')"
# Or write to file and run:
python3 script.py

Install packages with: pip install package_name

Shell/Bash

echo "hello" && ls -la

Node.js (install first if needed)

# 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

版本历史

  • beee30c 当前 2026-07-25 08:17

同 Skill 集合

internal/agent/bundled_skills/camoufox-cli/SKILL.md
internal/agent/bundled_skills/local-coding-agents/SKILL.md
internal/agent/bundled_skills/skill-creator/SKILL.md
skills/agent-integration/SKILL.md
skills/data-analysis/SKILL.md
skills/fastclaw-skill-guide/SKILL.md
skills/fastclaw-skill-learner/SKILL.md
skills/image-gen/SKILL.md
skills/local-coding-agents/SKILL.md
skills/skill-creator/SKILL.md
skills/translation/SKILL.md
skills/web-search/SKILL.md
skills/image-to-editable-html/SKILL.md
internal/agent/bundled_skills/find-skills/SKILL.md
skills/find-skills/SKILL.md

元信息

文件数
0
版本
45a7f8b
Hash
dd731e9c
收录时间
2026-07-25 08:17

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-18 15:28
浙ICP备14020137号-1