| name | tmux |
| description | Manage tmux sessions, windows, and panes via the tmux CLI. Use when the user asks to run background processes, set up multi-pane layouts, monitor commands, or work with tmux in any way.
|
tmux CLI Skill
Use tmux commands via Bash to manage terminal sessions, windows, and panes.
Do NOT use the tmux MCP server — use the CLI directly.
All commands below are safe to run and do not require user confirmation unless
they kill sessions or panes containing unsaved work.
Session Management
tmux list-sessions
tmux new-session -d -s myapp
tmux new-session -d -s myapp -c ~/project
tmux kill-session -t myapp
tmux rename-session -t old new
tmux has-session -t myapp 2>/dev/null
Window Management
tmux new-window -t myapp
tmux new-window -t myapp -n build
tmux new-window -t myapp -n build -c ~/src
tmux rename-window -t myapp:0 main
tmux select-window -t myapp:1
tmux kill-window -t myapp:1
tmux list-windows -t myapp
Pane Management
tmux split-window -t myapp -h
tmux split-window -t myapp -v
tmux split-window -t myapp -h -c ~/src
tmux select-pane -t myapp:0.1
tmux kill-pane -t myapp:0.1
tmux list-panes -t myapp:0
tmux resize-pane -t myapp:0.1 -R 20
tmux resize-pane -t myapp:0.1 -D 10
Command Execution
tmux send-keys -t myapp:0.0 'make build' Enter
tmux send-keys -t myapp:0.0 'echo hello'
tmux send-keys -t myapp:0.0 C-c
tmux new-window -t myapp -n tests 'go test ./...'
Content Capture
tmux capture-pane -t myapp:0.0 -p
tmux capture-pane -t myapp:0.0 -p -S -100
tmux capture-pane -t myapp:0.0 -p -S -
tmux capture-pane -t myapp:0.0 -p | tail -5
Layouts
tmux select-layout -t myapp:0 even-horizontal
tmux select-layout -t myapp:0 even-vertical
tmux select-layout -t myapp:0 main-horizontal
tmux select-layout -t myapp:0 main-vertical
tmux select-layout -t myapp:0 tiled
Target Syntax
Targets follow the pattern session:window.pane:
myapp — session named "myapp"
myapp:0 — first window in "myapp"
myapp:0.1 — second pane in first window of "myapp"
myapp:build — window named "build" in "myapp"
Common Workflows
Run a background process and check on it
tmux new-session -d -s bg
tmux send-keys -t bg 'long-running-command' Enter
tmux capture-pane -t bg -p | tail -20
Start roachdev claude in a new pane with a prompt
tmux new-session -d -s dev -c ~/project
tmux send-keys -t dev "roachdev claude --prompt 'fix the failing tests'" Enter
Monitor a long-running command
tmux new-window -t dev -n watch
tmux send-keys -t dev:watch 'watch -n 5 curl -s http://localhost:8080/health' Enter
tmux capture-pane -t dev:watch -p
Multi-pane development layout
tmux new-session -d -s work -c ~/project
tmux split-window -t work -h
tmux split-window -t work:0.1 -v
tmux send-keys -t work:0.1 'make watch' Enter
tmux send-keys -t work:0.2 'tail -f app.log' Enter
tmux select-layout -t work:0 main-vertical
Wait for a command to finish
while ! tmux capture-pane -t myapp:0.0 -p | tail -1 | grep -q '\$'; do
sleep 2
done
echo "Command finished"
tmux capture-pane -t myapp:0.0 -p | tail -20