Use when you need to run multiple AI CLI agents (claude, codex, gemini) in parallel on independent subtasks — spawns visible tmux split panes for real-time monitoring
From menpx claudepluginhub baleen37/bstack --plugin bstackThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Implements Clean Architecture in Android and Kotlin Multiplatform projects: module layouts, dependency rules, UseCases, Repositories, domain models, and data layers with Room, SQLDelight, Ktor.
Spawn AI CLI workers in visible tmux split panes. Fire-and-forget — no blocking, no result collection.
| Agent | Command | Notes |
|---|---|---|
| claude | cat "$TASK_FILE" | claude -p --dangerously-skip-permissions | pipe task via stdin |
| codex | codex exec --full-auto - < "$TASK_FILE" | stdin redirect |
| gemini | gemini -p '' --yolo < "$TASK_FILE" | stdin redirect |
# 1. Unique ID & task file
ID="$(date +%s)-$$-1"
TASK_FILE="/tmp/tmux-worker-$ID.txt"
printf '%s' "$TASK" > "$TASK_FILE"
# 2. Split pane & capture pane ID
PANE_ID=$(tmux split-window -h -c "$CWD" -PF '#{pane_id}')
# 3. Send command (pick agent from table above)
tmux send-keys -t "$PANE_ID" -l -- "cat \"$TASK_FILE\" | claude -p --dangerously-skip-permissions; rm -f \"$TASK_FILE\""
tmux send-keys -t "$PANE_ID" Enter
# 4. Done. No waiting.
For additional workers, split vertically from the first worker pane:
PANE_ID2=$(tmux split-window -v -t "$PANE_ID" -c "$CWD" -PF '#{pane_id}')
tmux send-keys -t "$PANE_ID2" -l -- "codex exec --full-auto - < \"$TASK_FILE2\"; rm -f \"$TASK_FILE2\""
tmux send-keys -t "$PANE_ID2" Enter
┌──────────────────┬──────────────────┐
│ │ Worker 1 │
│ Leader ├──────────────────┤
│ (current) │ Worker 2 │
│ ├──────────────────┤
│ │ Worker 3 │
└──────────────────┴──────────────────┘
split-window -h (right side)split-window -v -t $FIRST_WORKER_PANE (stack vertically)%3, %7), not index# Option 1: tmux -c flag (preferred)
tmux split-window -h -c "/path/to/project" -PF '#{pane_id}'
# Option 2: codex -C flag
codex exec --full-auto -C /path/to/project - < "$TASK_FILE"
# List all panes with status
tmux list-panes -F '#{pane_id} #{pane_current_command} #{pane_dead}'
# Preview worker output (replace %3 with actual pane ID)
tmux capture-pane -t %3 -p | tail -10
# Kill a specific worker
tmux kill-pane -t %3
| Mistake | Fix |
|---|---|
codex instead of codex exec | Opens interactive TUI and hangs forever |
send-keys without -l flag | Special chars interpreted as tmux keybindings, not literal input |
| Pane index instead of pane ID | Use pane ID (e.g., %3) from -PF '#{pane_id}' — stable across window switches |
| Task inlined in command string | Special chars and quotes break. Always write to temp file first |
Missing -PF on split-window | Cannot capture pane ID for later reference |
| Running outside tmux | Check $TMUX env var. If unset, start with tmux new-session first |
claude without --dangerously-skip-permissions | Worker stalls at permission prompt with no human to approve |
| More than 4-5 workers in one window | Panes become too small. Use a separate tmux window for overflow |
| Forgetting task file cleanup | Add ; rm -f "$TASK_FILE" at end of worker command |
$TASK to a temp file — never inline in the commandsend-keys -l -- for literal input, then send-keys Enter separately$(date +%s)-$$-N where N is the worker number; rm -f "$TASK_FILE" for cleanup$TMUX unset), create a session first