Loading...
Loading...
Control tmux panes and communicate between AI agents. Use this skill whenever the user mentions tmux panes, cross-pane communication, sending messages to other agents, reading other panes, managing tmux sessions, or interacting with processes running in tmux. Includes tmux-bridge CLI for agent-to-agent messaging and raw tmux commands for direct session control.
npx skill4agent add shawnpana/smux smuxtmux-bridgetypekeysread[tmux-bridge from:...]typekeystmux-bridge read <target>tmux-bridge type/keys <target>typekeys$ tmux-bridge type codex "hello"
error: must read the pane before interacting. Run: tmux-bridge read codex| Command | Description | Example |
|---|---|---|
| Show all panes with target, pid, command, size, label | |
| Type text without pressing Enter | |
| Type text with auto sender info and reply target | |
| Read last N lines (default 50) | |
| Send special keys | |
| Label a pane (visible in tmux border) | |
| Print pane target for a label | |
| Print this pane's ID | |
session:window.paneshared:0.1%30tmux-bridge nametmux-bridge read codex 20 # 1. READ — satisfy read guard
tmux-bridge message codex 'Please review src/auth.ts'
# 2. MESSAGE — auto-prepends sender info, no Enter
tmux-bridge read codex 20 # 3. READ — verify text landed
tmux-bridge keys codex Enter # 4. KEYS — submit
# STOP. Do NOT read codex for a reply. The agent replies into YOUR pane.tmux-bridge read worker 10 # 1. READ — see the prompt
tmux-bridge type worker "y" # 2. TYPE
tmux-bridge read worker 10 # 3. READ — verify
tmux-bridge keys worker Enter # 4. KEYS — submit
tmux-bridge read worker 20 # 5. READ — see the resultmessage[tmux-bridge from:claude pane:%4 at:3:0.0] Please review src/auth.tsfrompaneat# 1. Label yourself
tmux-bridge name "$(tmux-bridge id)" claude
# 2. Discover other panes
tmux-bridge list
# 3. Send a message (read-act-read)
tmux-bridge read codex 20
tmux-bridge message codex 'Please review the changes in src/auth.ts'
tmux-bridge read codex 20
tmux-bridge keys codex Entertmux-bridge read codex 20
tmux-bridge message codex 'What is the test coverage for src/auth.ts?'
tmux-bridge read codex 20
tmux-bridge keys codex Enter[tmux-bridge from:claude pane:%4 at:3:0.0] What is the test coverage for src/auth.ts?tmux-bridge read %4 20
tmux-bridge message %4 '87% line coverage. Missing the OAuth refresh token path (lines 142-168).'
tmux-bridge read %4 20
tmux-bridge keys %4 Entertmux capture-pane -t shared -p | tail -20 # Last 20 lines
tmux capture-pane -t shared -p -S - # Entire scrollback
tmux capture-pane -t shared:0.0 -p # Specific panetmux send-keys -t shared -l -- "text here" # Type text (literal mode)
tmux send-keys -t shared Enter # Press Enter
tmux send-keys -t shared Escape # Press Escape
tmux send-keys -t shared C-c # Ctrl+C
tmux send-keys -t shared C-d # Ctrl+D (EOF)tmux send-keys -t shared -l -- "Please apply the patch"
sleep 0.1
tmux send-keys -t shared Enter# Create panes (prefer over new windows)
tmux split-window -h -t SESSION # Horizontal split
tmux split-window -v -t SESSION # Vertical split
tmux select-layout -t SESSION tiled # Re-balance
# Navigate
tmux select-window -t shared:0
tmux select-pane -t shared:0.1
tmux list-windows -t sharedtmux list-sessions
tmux new-session -d -s newsession
tmux kill-session -t sessionname
tmux rename-session -t old new# Check if session needs input
tmux capture-pane -t worker-3 -p | tail -10 | grep -E "❯|Yes.*No|proceed|permission"
# Approve a prompt
tmux send-keys -t worker-3 'y' Enter
# Check all sessions
for s in shared worker-2 worker-3 worker-4; do
echo "=== $s ==="
tmux capture-pane -t $s -p 2>/dev/null | tail -5
donetypekeystypekeys%Ntypereadcapture-pane -psession:window.paneshared:0.0