CClaude Code Catalog
全パターン

並列タスク実行

ワークフロー上級

50ファイルのマイグレーションや20モジュールへのテスト追加のような大規模タスクでは、逐次実行は時間の無駄です。このパターンは作業を独立した単位に分解し、tmuxやバックグラウンドジョブで並列Claude Codeプロセスを起動し、結果を収集します。依存関係の検出、競合回避、進捗モニタリングの戦略を含みます。

並列同時実行tmuxパフォーマンスバッチ

パターンコード

# Parallel Task Execution Pattern ## Step 1: Decompose the task ```bash # Generate a task manifest claude -p "List all React class components in src/ that need converting to functional components. Output as JSON: [{file, component, complexity}]" > tasks.json ``` ## Step 2: Partition into independent batches ```bash # Split tasks into N batches (no cross-dependencies) cat tasks.json | jq -c '[.[] | select(.complexity != "high")]' \ | jq -c '_nwise(5)' > batches.jsonl ``` ## Step 3: Launch parallel agents ```bash #!/bin/bash # parallel-convert.sh SESSION="parallel-convert" tmux new-session -d -s $SESSION BATCH_NUM=0 while IFS= read -r batch; do if [ $BATCH_NUM -gt 0 ]; then tmux split-window -t $SESSION tmux select-layout -t $SESSION tiled fi tmux send-keys -t $SESSION.$BATCH_NUM \ "claude -p 'Convert these class components to functional: $batch Rules: use hooks, preserve prop types, keep test files passing'" Enter ((BATCH_NUM++)) done < batches.jsonl ``` ## Step 4: Monitor and collect results ```bash # Wait for all agents and verify while tmux list-panes -t parallel-convert -F '#{pane_dead}' | grep -q 0; do sleep 5 done echo "All agents complete" git diff --stat npm test ```

このパターンをプロジェクト設定にコピーして適用してください。

実行プレビュー

並列タスク実行

並列タスク実行について

Claude Codeパターンは、複雑な開発シナリオに対応するための実証済みアーキテクチャ設計とワークフロー構造です。並列タスク実行は上級レベルのワークフローパターンで、プロジェクトに合わせて応用できるテスト済みの再現可能なアプローチを提供し、より効率的で一貫した成果を実現します。

関連パターン