🤖
Local Task Runner
Executes Node.js code snippets or scripts locally with isolation, cleanup, and timeout, serving as a lightweight alternative to spawning subagents.
安全通过
💬Prompt
技能说明
Local Task Runner
This skill provides a mechanism to execute Node.js code snippets or full scripts locally on the host machine. It is the default execution method when subagent spawning is unavailable or inefficient.
Purpose
- Replace Subagents: Instead of spawning a full subagent for simple tasks, use this skill to run code directly.
- Safety: Isolates execution logic, handles cleanup, and enforces timeouts.
- Convenience: No manual file management required (
write+exec+rm).
Usage
When you need to perform a calculation, check system status, or run a utility script:
- Construct the Node.js code as a string.
- Call
run_task(or execute via CLI) with the code.
Command Line Interface
# Execute a task
node skills/local-task-runner/index.js run --code "console.log('Hello World')"
# Execute with timeout (ms)
node skills/local-task-runner/index.js run --code "while(true){}" --timeout 5000
Response Format
Success:
[TASK: <id>] Completed in 123ms
--- STDOUT ---
...
Error:
[TASK: <id>] Failed in 123ms
Error: ...
--- STDERR ---
...
如何使用「Local Task Runner」?
- 打开小龙虾AI(Web 或 iOS App)
- 点击上方「立即使用」按钮,或在对话框中输入任务描述
- 小龙虾AI 会自动匹配并调用「Local Task Runner」技能完成任务
- 结果即时呈现,支持继续对话优化