Agent Skills
› fastclaw-ai/fastclaw
› code-runner
code-runner
GitHub用于在沙箱环境中执行和调试多种编程语言代码的 Skill。支持 Python、Shell 和 Node.js,具备自动安装依赖、即时执行及错误自动修复功能。
Trigger Scenarios
用户要求运行代码片段
用户请求测试脚本输出
需要调试或排查代码执行错误
Install
npx skills add fastclaw-ai/fastclaw --skill code-runner -g -y
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_fileto save thenexecto 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
.pyfile 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
Version History
- beee30c Current 2026-07-25 08:17


