Back to Skills

tmux

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

370,946stars76,694forksUpdated 5/12/2026

Security Assessment

Safe(100/100)
Security Score100/100

About tmux

The tmux skill enables automated control of tmux sessions by sending keystrokes and capturing pane outputs. It is designed to facilitate interaction with remote or local terminal sessions, particularly for monitoring and controlling long-running or interactive CLI applications. By programmatically interfacing with tmux, this skill eliminates the need for manual terminal management, allowing users to automate tasks such as sending input to interactive programs, scraping output, and navigating panes or windows efficiently.

Key capabilities of this skill include listing active tmux sessions, capturing outputs from specific panes or entire scrollback histories, sending text and special keystrokes to sessions, and managing windows and panes. Users can create, rename, or kill sessions, as well as navigate between windows and panes programmatically. Additionally, the skill provides safe input handling for interactive terminal applications by separating text input from Enter keystrokes, preventing common paste or multiline issues. It also supports monitoring patterns for prompts or approvals in interactive sessions, enabling automated decision-making within terminal workflows.

This skill is particularly useful for developers and system administrators who need to manage interactive or long-running tasks in tmux, such as supervising Claude Code or Codex sessions. It is ideal for automating routine terminal operations, checking on background work, or orchestrating multiple parallel sessions. Target users include those working in environments where persistent sessions are critical, remote server management is common, or automation of terminal-based workflows is desired. It is best suited for macOS and Linux users with tmux installed, and it complements other tools that handle non-interactive scripting or one-off command execution.

FAQ

Which operating systems are supported by the tmux skill?

The skill is compatible with macOS (darwin) and Linux systems, provided that tmux is installed.

Can this skill start new tmux sessions?

No, the skill is intended for controlling existing tmux sessions. To start new sessions, use the exec tool with tmux commands.

How does the skill handle interactive input safely?

For interactive applications, text input and the Enter key are sent separately with a short delay to avoid issues with multiline pastes or TUI interactions.

Can I capture the entire output of a pane or only the last few lines?

You can capture both: the last N lines using standard tail commands, or the entire scrollback by using the -S - option with capture-pane.

What should I use if my task is non-interactive or one-off?

For non-interactive scripts or one-off commands, it is recommended to use the exec tool directly instead of this tmux skill.

All Files

3 files
SKILL.md3.7 KB
View
scripts/wait-for-text.sh2.1 KB
View
scripts/find-sessions.sh2.9 KB
View

Install tmux

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill