tmux
Installation
SKILL.md
tmux
Interact with tmux sessions using the tmux CLI and the bundled read-tmux and send-tmux helper scripts. The scripts live at {baseDir}/scripts/ — substitute the skill's base directory when invoking them.
Resolve pane_id first
Before doing anything with a pane, resolve its pane_id. This stable, unambiguous handle survives window/session renames — and since a recreated pane gets a new pane_id, using it automatically treats recreated panes as new sessions.
# From a user-supplied index (e.g. "pane 1" in the current window)
PANE_ID=$(tmux display-message -t :.1 -p '#{pane_id}') # → %42
# From a full target
PANE_ID=$(tmux display-message -t 0:2.1 -p '#{pane_id}')