Local Task Runner
by @d-wwei
Executes Node.js code snippets or scripts locally with isolation, cleanup, and timeout, serving as a lightweight alternative to spawning subagents.
clawhub install local-task-runnerπ About This Skill
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
write + exec + rm).Usage
When you need to perform a calculation, check system status, or run a utility script:
1. Construct the Node.js code as a string.
2. 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: ] Completed in 123ms
--- STDOUT ---
...
Error:
[TASK: ] Failed in 123ms
Error: ...
--- STDERR ---
...
π‘ Examples
When you need to perform a calculation, check system status, or run a utility script:
1. Construct the Node.js code as a string.
2. 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: ] Completed in 123ms
--- STDOUT ---
...
Error:
[TASK: ] Failed in 123ms
Error: ...
--- STDERR ---
...