tmux

Control interactive terminal sessions via tmux. Use when tasks need persistent REPLs, parallel CLI agents, or any process requiring a TTY that simple shell execution cannot handle.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tmux" with this command: npx skills add vaayne/cc-plugins/vaayne-cc-plugins-tmux

tmux Skill

Use tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.

Quickstart

SOCKET_DIR="${TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/tmux-sockets}"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/tmux.sock"
SESSION=my-session

tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200

Essential Commands

ActionCommand
Send texttmux -S "$SOCKET" send-keys -t target -l -- "$cmd"
Send Enter/Ctrl-Ctmux -S "$SOCKET" send-keys -t target Enter / C-c
Capture outputtmux -S "$SOCKET" capture-pane -p -J -t target -S -200
List sessionstmux -S "$SOCKET" list-sessions
Kill sessiontmux -S "$SOCKET" kill-session -t "$SESSION"
Kill servertmux -S "$SOCKET" kill-server

Conventions

  • Socket: TMUX_SOCKET_DIR env var (default ${TMPDIR:-/tmp}/tmux-sockets)
  • Target format: session:window.pane (defaults to :0.0)
  • Python REPLs: Set PYTHON_BASIC_REPL=1 to avoid readline issues

Helper Scripts

./scripts/find-sessions.sh -S "$SOCKET"        # list sessions
./scripts/find-sessions.sh --all               # scan all sockets
./scripts/wait-for-text.sh -t sess:0.0 -p 'pattern' [-T 20] [-i 0.5]

Parallel Agents Example

SOCKET="${TMPDIR:-/tmp}/agents.sock"
for i in 1 2 3; do tmux -S "$SOCKET" new-session -d -s "agent-$i"; done
tmux -S "$SOCKET" send-keys -t agent-1 "codex --yolo 'Fix bug'" Enter

# Poll for completion
tmux -S "$SOCKET" capture-pane -p -t agent-1 -S -3 | grep -q "❯" && echo "Done"

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

python-script

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-simplifier

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

specs-dev

No summary provided by upstream source.

Repository SourceNeeds Review