# Parallel Processing

> Parallel Processing is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Run multiple tasks in parallel using tmux windows or Agent Teams

- Skill name: `parallel-processing`
- Category: [Productivity](https://www.openparable.com/skill/productivity/1)
- Source: https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/orchestration/parallel-processing-kamushadenes-nix-2/SKILL.md
- Repository: majiayu000/claude-skill-registry (498 GitHub stars when collected)

## SKILL.md

# Parallel Processing

Use tmux for background tasks, Agent Teams for multi-instance parallel work.

## Agent Teams (Preferred for Multi-Task Work)

For 2+ independent tasks that each need a full Claude session:

```
Create an Agent Team with one teammate per task.
Each teammate gets a spawn prompt with their task details.
Teammates can discuss findings across domains.
```

Use `/delegate-tasks` to automate team creation for task-master tasks.

## Recommended: Use Subagents for Context Efficiency

**For simple parallel commands**, launch multiple `tmux-runner` subagents in parallel:

```python
# Launch all three in parallel (single message with multiple Task calls)
Task(subagent_type="tmux-runner", description="Run tests",
     prompt="Run 'npm test' and return results", model="haiku")
Task(subagent_type="tmux-runner", description="Run lint",
     prompt="Run 'npm run lint' and return results", model="haiku")
Task(subagent_type="tmux-runner", description="Run build",
     prompt="Run 'npm run build' and return results", model="haiku")
```

This saves context in the main conversation - you only see the results, not all the intermediate tmux operations.

## Pattern: Background Task (Direct)

For long-running servers you need to monitor:

```python
# Start background task
window_id = tmux_new_window(command="npm run dev", name="dev-server")

# Continue working...

# Check later
output = tmux_capture(target=window_id, lines=50)

# Clean up
tmux_kill(target=window_id)
```

## Pattern: With Notification

```python
window_id = tmux_new_window(command="npm run build", name="build")
status = tmux_wait_idle(target=window_id, timeout=300)
notify(title="Build Complete", message=f"Status: {status}")
```

## Pattern: Multiple Parallel (Direct)

When you need to manage windows yourself:

```python
test_win = tmux_new_window(command="npm test", name="tests")
lint_win = tmux_new_window(command="npm run lint", name="lint")
build_win = tmux_new_window(command="npm run build", name="build")

for w in [test_win, lint_win, build_win]:
    tmux_wait_idle(target=w, timeout=120)
```

---

Source: https://www.openparable.com/skill/productivity/parallel-processing (OpenParable). Cite the canonical URL above.
