tmux — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited tmux (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use tmux as a programmable terminal for interactive CLIs that do not fit plain exec commands. This skill is for Linux, macOS, and WSL. Native Windows terminals are out of scope.
No authentication is required. Attempt the tmux command first. If it fails, diagnose missing tmux, missing WSL, a dead socket, or a stale session.
Use the host shell tool to run tmux directly. Do not add helper scripts. Keep sessions on a private socket so agent-controlled panes stay separate from the user's personal tmux server.
Platform mapping:
tmux commands.exec_command for tmux commands and write_stdin only for host PTY sessions, not tmux panes.Always create a socket directory and use tmux -S "$SOCKET":
TMUX_SOCKET_DIR="${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/agent-tmux-sockets}"
mkdir -p "$TMUX_SOCKET_DIR"
SOCKET="$TMUX_SOCKET_DIR/terminal.sock"
SESSION="agent-python"
tmux -S "$SOCKET" new-session -d -s "$SESSION" -n shellAfter starting a session, tell the user how to monitor it:
tmux -S "$SOCKET" attach -t "$SESSION"
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":. -S -200Repeat the monitor command again when leaving a long-running session open.
Use "$SESSION":. for the active pane unless you have inspected pane indexes. This avoids failures on user configs that start window indexes at 1.
List sessions on the private socket:
tmux -S "$SOCKET" list-sessionsList panes with targets:
tmux -S "$SOCKET" list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_current_command} #{pane_title}'Capture recent output from a pane:
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":. -S -200For full-screen TUIs where style escape codes matter during diagnosis, add -e:
tmux -S "$SOCKET" capture-pane -p -e -J -t "$SESSION":. -S -200Scan all known agent sockets:
find "${CLAUDE_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/agent-tmux-sockets}" -type s -maxdepth 1 -printStart a new session:
tmux -S "$SOCKET" new-session -d -s "$SESSION" -n shellSend literal text, then press Enter:
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'python3 -q'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterSend control keys:
tmux -S "$SOCKET" send-keys -t "$SESSION":. C-c
tmux -S "$SOCKET" send-keys -t "$SESSION":. C-dPoll for prompt text without a helper script:
deadline=$((SECONDS + 15))
while (( SECONDS < deadline )); do
pane="$(tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":. -S -200)"
printf '%s\n' "$pane" | grep -Eq '^>>>' && break
sleep 0.5
done
printf '%s\n' "$pane" | grep -Eq '^>>>'Kill one session when the interactive task is done:
tmux -S "$SOCKET" kill-session -t "$SESSION"Kill the private server only after confirming no useful sessions remain:
tmux -S "$SOCKET" kill-serverAsk before killing sessions that the user may be monitoring.
Python REPL:
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'PYTHON_BASIC_REPL=1 python3 -q'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterDebugger:
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'gdb --quiet ./a.out'
tmux -S "$SOCKET" send-keys -t "$SESSION":. Enter
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'set pagination off'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterGeneric TTY program:
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'psql "$DATABASE_URL"'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterUse tmux for nested agent CLIs only as an experiment. It can work for observing and steering codex or claude sessions, but it is more brittle than native subagent tools because prompts, permission flows, and screen updates are text scraped from a terminal pane.
Start a nested Codex session:
SESSION="agent-codex"
tmux -S "$SOCKET" new-session -d -s "$SESSION" -n codex
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'codex'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterStart a nested Claude Code session:
SESSION="agent-claude"
tmux -S "$SOCKET" new-session -d -s "$SESSION" -n claude
tmux -S "$SOCKET" send-keys -t "$SESSION":. -l -- 'claude'
tmux -S "$SOCKET" send-keys -t "$SESSION":. EnterRules for nested agents:
If tmux is missing, tell the user to install it. On Windows, recommend WSL with tmux installed inside the Linux environment.
If a session is missing, run:
tmux -S "$SOCKET" list-sessionsIf the pane target is wrong, run:
tmux -S "$SOCKET" list-panes -aIf a poll times out, capture the pane and reason from the visible state instead of blindly sending more input.
send-keys -l -- for literal text.capture-pane -p -J before deciding the next keystroke.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.