Ultrawork — Parallel AI Task Execution

Runs multiple independent tasks simultaneously by routing each to an appropriate AI model tier for faster parallel execution and combined results.

Audits

Pass

Install

openclaw skills install nerua1-ultrawork

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

# 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

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:

TierModelUse ForCostSpeed
LOWqwen3-coderSimple lookups, type exports$⚡ Fast
STANDARDqwen3.5-35bNormal implementation$$🚀 Normal
THOROUGHkimi-k2.5Complex analysis, security$$$🐢 Slow

Tier Selection Examples

# 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

#!/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:

## 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

# 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)

# 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

ScenarioSequentialUltraworkSpeedup
3 simple tasks30s10s3x
5 type fixes50s12s4x
2 complex refactors10min6min1.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 GitHub: github.com/nerua1