Runs multiple independent tasks simultaneously by routing each to an appropriate AI model tier for faster parallel execution and combined results.
---
> **Why this exists:** "openclaw sessions spawn" sounded great in theory. In practice, it doesn't exist. This skill provides real PID-based process tracking for actual task execution.
name: ultrawork
description: Parallel execution engine - run multiple tasks simultaneously for speed
version: 1.0.0
author: Rook (adapted from oh-my-codex)
---
# Ultrawork Skill for OpenClaw
Parallel execution engine that runs multiple agents **simultaneously** for independent tasks. Speed through parallelism.
## What It Does
Ultrawork is a **parallelism layer**:
- Takes multiple independent tasks
- Fires them all at once (not sequentially)
- Routes each to appropriate model/tier
- Waits for all to complete
- Returns combined results
**Why wait in line when you can use all lanes?**
## Usage
```bash
# Multiple independent tasks
/ultrawork "add types to auth.ts" "fix bug in utils.ts" "update README"
# With explicit count
/ultrawork 3 "task1" "task2" "task3"
# Parallel file processing
/ultrawork "analyze src/*.ts" "generate docs" "run tests"
```
Or say: "ulw", "ultrawork", "run in parallel", "do these at once"
## When to Use
✅ **Use Ultrawork when:**
- Multiple independent tasks can run simultaneously
- Tasks don't depend on each other
- You want to reduce total execution time
- You need to delegate to multiple agents at once
❌ **Don't use Ultrawork when:**
- Tasks have dependencies (B needs A to finish)
- Only one sequential task
- You need guaranteed completion with verification → use `/ralph`
- You want full autonomous pipeline → use higher-level skill
## How It Works
### Parallel Execution Model
```
Sequential (slow): Parallel (fast):
┌─────────┐ ┌─────────┐
│ Task A │ ──10s──> │ Task A │ ──┐
├─────────┤ ├─────────┤ │
│ Task B │ ──10s──> │ Task B │ ──┼──10s──> Done
├─────────┤ ├─────────┤ │
│ Task C │ ──10s──> │ Task C │ ──┘
└─────────┘ └─────────┘
Total: 30s Total: 10s
```
### Execution Flow
```bash
1. PARSE TASKS
↓
2. CLASSIFY INDEPENDENCE
↓
3. ROUTE TO TIERS
- Simple → LOW tier (fast, cheap)
- Standard → STANDARD tier
- Complex → THOROUGH tier (slow, expensive)
↓
4. FIRE ALL AT ONCE
- Spawn subagents in parallel
- No waiting between spawns
↓
5. WAIT FOR COMPLETION
- All tasks finish
- Collect results
↓
6. VERIFY
- Build passes
- No new errors
↓
7. RETURN RESULTS
```
## Tier Routing
Ultrawork routes tasks to appropriate tiers:
| Tier | Model | Use For | Cost | Speed |
|------|-------|---------|------|-------|
| LOW | qwen3-coder | Simple lookups, type exports | $ | ⚡ Fast |
| STANDARD | qwen3.5-35b | Normal implementation | $$ | 🚀 Normal |
| THOROUGH | kimi-k2.5 | Complex analysis, security | $$$ | 🐢 Slow |
### Tier Selection Examples
```bash
# LOW tier - trivial tasks
/ultrawork "add export type Config" "fix typo in comment"
# STANDARD tier - normal work
/ultrawork "implement caching layer" "add error handling"
# THOROUGH tier - complex work
/ultrawork "refactor auth to OAuth2" "debug race condition"
```
## Implementation
```bash
#!/bin/bash
# <workspace>/skills/ultrawork/ultrawork.sh
# Parse tasks from arguments
TASKS=("$@")
NUM_TASKS=${#TASKS[@]}
echo "=== ULTRAWORK: Parallel Execution ==="
echo "Tasks: $NUM_TASKS"
echo ""
# Create temp directory for results
RESULTS_DIR=$(mktemp -d)
trap "rm -rf $RESULTS_DIR" EXIT
# Function to execute task in background
execute_task() {
local task_id=$1
local task_desc=$2
local output_file="$RESULTS_DIR/task-$task_id.json"
# Determine tier based on task complexity
local tier="STANDARD"
local model="lmstudio/qwen3.5-35b-a3b-uncensored-hauhaucs-aggressive"
if [[ "$task_desc" =~ (simple|lookup|typo|export|add type) ]]; then
tier="LOW"
model="lmstudio/qwen3-coder-30b-a3b-instruct-mlx"
elif [[ "$task_desc" =~ (complex|refactor|security|architect|debug.*race) ]]; then
tier="THOROUGH"
model="moonshot/kimi-k2.5"
fi
echo " [Task $task_id] Tier: $tier | Model: $model"
# Spawn subagent for task
openclaw sessions spawn \
--task "$task_desc" \
--model "$model" \
--runtime subagent \
--mode run \
--output "$output_file" \
2>/dev/null &
# Save PID
echo $! > "$RESULTS_DIR/task-$task_id.pid"
}
# Fire all tasks simultaneously
echo "Launching tasks..."
for i in "${!TASKS[@]}"; do
task_id=$((i + 1))
execute_task "$task_id" "${TASKS[$i]}"
done
echo ""
echo "Waiting for completion..."
# Wait for all background jobs
for pid_file in "$RESULTS_DIR"/*.pid; do
if [[ -f "$pid_file" ]]; then
pid=$(cat "$pid_file")
wait $pid 2>/dev/null || true
fi
done
echo ""
echo "=== Results ==="
# Collect and display results
SUCCESS_COUNT=0
FAIL_COUNT=0
for result_file in "$RESULTS_DIR"/task-*.json; do
if [[ -f "$result_file" ]]; then
task_id=$(basename "$result_file" | sed 's/task-//' | sed 's/.json//')
# Check if result exists and parse
if [[ -s "$result_file" ]]; then
echo " [Task $task_id] ✅ Complete"
SUCCESS_COUNT=$((SUCCESS_COUNT + 1))
else
echo " [Task $task_id] ❌ Failed"
FAIL_COUNT=$((FAIL_COUNT + 1))
fi
fi
done
echo ""
echo "Summary: $SUCCESS_COUNT succeeded, $FAIL_COUNT failed"
# Lightweight verification
echo ""
echo "Verifying..."
# Check build if applicable
if [[ -f "package.json" ]]; then
if npm run build > /dev/null 2>&1; then
echo "✅ Build passes"
else
echo "⚠️ Build has errors"
fi
fi
# Check for new errors
if [[ -f "package.json" ]]; then
if npm test > /dev/null 2>&1; then
echo "✅ Tests pass"
else
echo "⚠️ Tests have failures"
fi
fi
echo ""
echo "=== ULTRAWORK: Complete ==="
```
## Integration with OpenClaw
Add to `AGENTS.md`:
```markdown
## Parallel Execution
When you have multiple independent tasks:
Use `/ultrawork "task1" "task2" "task3"` to run them in parallel.
Ultrawork will:
- Route each task to appropriate tier
- Fire all simultaneously
- Collect results
- Verify nothing broke
Faster than sequential execution for independent work.
```
## Examples
### Good Parallel Tasks
```bash
# Independent file changes
/ultrawork "add types to auth.ts" "fix bug in utils.ts" "update README"
# Parallel analysis
/ultrawork "analyze performance" "check security" "review accessibility"
# Batch processing
/ultrawork "process file1" "process file2" "process file3"
```
### Bad Parallel Tasks (Dependencies)
```bash
# DON'T - Task B needs Task A
/ultrawork "create database schema" "add API endpoints using schema"
# DO - Sequential instead
/ralph "create database schema, then add API endpoints"
```
## Performance
| Scenario | Sequential | Ultrawork | Speedup |
|----------|-----------|-----------|---------|
| 3 simple tasks | 30s | 10s | **3x** |
| 5 type fixes | 50s | 12s | **4x** |
| 2 complex refactors | 10min | 6min | **1.6x** |
## Relationship to Other Skills
```
ralph (persistence wrapper)
└─ includes: ultrawork (parallel execution)
└─ provides: parallelism only
autopilot (full autonomous)
└─ includes: ralph
└─ includes: ultrawork
Use directly:
- ultrawork → just parallelism
- ralph → parallelism + persistence + verification
- autopilot → full pipeline
```
## Stop Conditions
Ultrawork stops when:
- ✅ All parallel tasks complete
- ❌ User says "cancel"
- ⚠️ Critical failure in any task (optional)
## Output Format
```
=== ULTRAWORK: Parallel Execution ===
Tasks: 3
Launching tasks...
[Task 1] Tier: LOW | Model: qwen3-coder
[Task 2] Tier: STANDARD | Model: qwen3.5-35b
[Task 3] Tier: LOW | Model: qwen3-coder
Waiting for completion...
=== Results ===
[Task 1] ✅ Complete
[Task 2] ✅ Complete
[Task 3] ✅ Complete
Summary: 3 succeeded, 0 failed
Verifying...
✅ Build passes
✅ Tests pass
=== ULTRAWORK: Complete ===
```
## Dependencies
- `openclaw` CLI with subagent support
- Background job support (`&`, `wait`)
- Standard POSIX tools
## Version History
- 1.0.0: Initial implementation based on oh-my-codex ultrawork skill
---
If this saved you time: [☕ PayPal.me/nerudek](https://www.paypal.me/nerudek)
GitHub: [github.com/nerua1](https://github.com/nerua1)
don't have the plugin yet? install it then click "run inline in claude" again.