tmux

Control tmux sessions by sending keystrokes and capturing pane output.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/srgaba/open-claw --skill tmux-srgaba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/srgaba/open-claw/tree/main/project/skills/tmux
Command: npx skills add https://github.com/srgaba/open-claw --skill tmux-srgaba

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tmux, and includes scripts (resource) components.

What problem does it solve? Interactive terminal applications like Claude Code or long-running processes inside tmux cannot be driven by simple one-off shell commands. This Skill lets you programmatically send keystrokes to tmux sessions and scrape pane output, so you can monitor, prompt, and manage interactive CLIs without manual terminal access. ## Core Features & Use Cases - Keystroke Injection: Send text, Enter, Escape, and control keys (C-c, C-d, C-z) to any tmux session, window, or pane. - Pane Output Scraping: Capture the last N lines or the entire scrollback of a pane for status checks and log inspection. - Session Discovery & Waiting: Use the bundled scripts to list sessions across sockets and poll a pane until a specific pattern appears. - Use Case: You have several worker tmux sessions running Claude Code. Check each session's last lines for approval prompts, then send 'y' + Enter to the ones waiting for confirmation. ## Quick Start Ask the AI to list all running tmux sessions and show the last 20 lines of output from the session named 'shared'.

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I send keystrokes to a tmux session from a script?

Use tmux send-keys with a target like session:window.pane, for example tmux send-keys -t shared "hello" Enter. For interactive TUIs, send the text with -l first, then send Enter separately to avoid paste and multiline edge cases.

How to capture output from a tmux pane?

Run tmux capture-pane -t <target> -p to print the pane contents to stdout. Add -S - to capture the entire scrollback history, or pipe through tail to get only the most recent lines.

When should I use tmux instead of running a shell command directly?

Use tmux control only for interactive or long-running processes already inside a tmux session. For one-off commands, new background processes, or non-interactive scripts, run them directly with a standard exec tool instead.

How do I wait for specific text to appear in a tmux pane?

Use the wait-for-text.sh script with a target and regex pattern, for example wait-for-text.sh -t shared -p "proceed". It polls the pane at a configurable interval and exits when the pattern matches or a timeout is reached.

Can I list tmux sessions on non-default sockets?

Yes, the find-sessions.sh script accepts -L for a socket name, -S for a socket path, or -A to scan all sockets under the configured socket directory. You can also filter session names with a case-insensitive query.