pthreadlisted
Install: claude install-skill tomcounsell/ai
# Parallel Thread Execution (P-Thread)
Scale compute by spawning multiple agents in parallel. This skill enables autonomous horizontal scaling for independent work.
## Core Principle
When facing independent tasks, don't execute sequentially. Spawn parallel sub-agents and aggregate results. The system should make this decision autonomously based on task structure.
## When to Auto-Parallelize
The system should automatically parallelize when:
1. **Multiple independent searches** - Finding different types of files/patterns
2. **Multi-file analysis** - Reviewing separate modules that don't interact
3. **Exploration tasks** - Investigating multiple hypotheses simultaneously
4. **Fusion patterns** - Getting multiple perspectives on the same problem
## Implementation Pattern
### Using Claude Code Task Tool
```python
# Spawn parallel sub-agents for independent work
# Each agent gets focused context and clear success criteria
# Example: Parallel codebase exploration
tasks = [
{"agent": "Explore", "prompt": "Find all authentication handlers"},
{"agent": "Explore", "prompt": "Find all API endpoint definitions"},
{"agent": "Explore", "prompt": "Find all database models"},
]
# Launch all simultaneously - don't wait for sequential completion
for task in tasks:
spawn_subagent(task, run_in_background=True)
# Aggregate results when all complete
```
### Decision Logic
```
IF task has independent subtasks:
- Identify subtask boundaries
- Spawn sub-agent per