tmux-driver

Control tmux sessions, windows, and panes to drive shell interactions programmatically.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/ciaran-slow/MellowMaker --skill tmux-driver-ciaran-slow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux-driver
Source: https://github.com/ciaran-slow/MellowMaker/tree/main/.claude/skills/tmux-driver
Command: npx skills add https://github.com/ciaran-slow/MellowMaker --skill tmux-driver-ciaran-slow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Driving shell commands inside tmux panes is error-prone: tmux may resolve to a shell alias instead of the real binary, pane indices shift, and keystrokes sent to the wrong pane can interrupt running processes. This Skill provides a safe, verified workflow for discovering, targeting, and interacting with tmux panes. ## Core Features & Use Cases - Environment Discovery: List sessions, windows, and panes with IDs, commands, PIDs, and dimensions to identify the right target. - Safe Command Injection: Send keystrokes with a mandatory destructive-action preflight that verifies session, window, pane, and working directory before any process-control action. - Output Capture & Monitoring: Capture pane scrollback and poll for command completion to monitor background processes. - Use Case: You have a dev server running in one tmux pane and want to run tests in another. Use this Skill to find the idle shell pane, verify its working directory, send the test command, and capture the results. ## Quick Start Ask the assistant to list your current tmux sessions and panes, then send a command to a specific pane and show its output.

Frequently Asked Questions about tmux-driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send a command to a specific tmux pane?

Use tmux send-keys with the pane ID: first send the command text, then send a separate C-m keystroke to submit it. Verify the target pane's session, window, and working directory before sending to avoid interrupting the wrong process.

How do I capture output from a tmux pane?

Use tmux capture-pane with the -p flag to print pane content to stdout. Add -S -50 for the last 50 lines or -S - for the entire scrollback history of the target pane.

Why does tmux fail with command not found in a non-interactive shell?

Some plugin setups wrap tmux in a shell function or alias that does not exist in non-interactive shells. Resolve the real binary path with command -v tmux or use explicit paths like /opt/homebrew/bin/tmux or /usr/bin/tmux.

How do I find which tmux pane is running a shell?

List panes with tmux list-panes using format specifiers like #{pane_current_command} and #{pane_active}. Look for panes running zsh, bash, or fish, and prefer inactive panes that are not busy with long-running processes.

What is the difference between tmux pane IDs and pane indices?

Pane IDs like %42 are stable for the session lifetime, while pane indices (0, 1, 2) can change when panes are closed. Prefer full session:window.pane targets or stable pane IDs for reliable automation.