tmux
Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.
Install via CLI (Recommended)
clawhub install openclaw/openclaw/skills/tmuxWhat This Skill Does
The tmux skill allows for the remote control of tmux (Terminal Multiplexer) sessions. This enables agents to interact with command-line interfaces (CLIs) running within tmux panes by sending keystrokes and capturing pane output. It is particularly useful for monitoring and managing interactive sessions, such as those used by AI coding assistants like Claude Code or Codex, by allowing programmatic control over their terminal environments. You can use it to check the status of long-running processes, send commands or responses to interactive applications, scrape output for analysis, and navigate between different tmux windows and panes.
Installation
To install the tmux skill, use the following command:
clawhub install openclaw/openclaw/skills/tmux
This command fetches the skill from the openclaw/openclaw repository. Ensure you have clawhub installed and configured correctly.
Use Cases
This skill is ideal for a variety of scenarios involving tmux sessions:
- Monitoring AI Coding Sessions: Keep an eye on the progress and prompts of AI coding tools like Claude Code running within
tmux. - Interactive CLI Management: Send commands and interact with any application that requires user input in a terminal.
- Scraping Process Output: Collect output from long-running scripts or processes for logging, analysis, or debugging.
- Programmatic Navigation: Move between different
tmuxwindows and panes to check on various tasks or sessions. - Automated Responses: Send predefined responses or commands to interactive prompts, such as approving a code generation step.
- Managing Worker Sessions: Control multiple parallel
tmuxsessions used for distributed tasks.
When to Use:
- Monitoring AI sessions in
tmux. - Sending input to interactive terminal applications.
- Scraping output from
tmuxprocesses. - Navigating
tmuxpanes/windows programmatically. - Checking on background work in existing
tmuxsessions.
When NOT to Use:
- Running one-off shell commands (use
execdirectly). - Starting new background processes (use
execwithbackground:true). - Non-interactive scripts (use
exectool). - Processes not running inside
tmux. - Creating new
tmuxsessions (useexecwithtmux new-session).
Example Prompts
-
Check the status of the 'shared' tmux session and display the last 5 lines of its active pane:
Check the status of the 'shared' tmux session and show the last 5 lines of output. -
Send the command 'npm run dev' followed by Enter to the 'worker-2' tmux session:
Send the command 'npm run dev' to the tmux session 'worker-2', and press Enter. -
Capture the entire scrollback buffer from pane 0 in window 0 of the 'shared' tmux session and send it to me:
Capture all output from the first pane in the 'shared' tmux session and return it.
Tips & Limitations
- Sending Input Safely: For interactive applications, especially those that might be sensitive to rapid input (like AI coding tools), it's recommended to split text and
Enterpresses into separatetmux send-keyscommands with small delays (sleep 0.1) in between. This avoids potential issues with multiline pastes or the application not being ready for the input. - Targeting: Always be specific with your
tmuxtargets (session name, window index, pane index) to ensure commands go to the correct place. For example,shared:0.1targets pane 1 of window 0 in thesharedsession. - Error Handling: The skill does not inherently provide detailed error reporting for
tmuxcommands. If atmuxcommand fails (e.g., session not found), the agent may not receive explicit feedback. It's good practice to check if sessions exist before attempting to interact with them if possible, or to anticipate potential failures. - No Session Creation: This skill is designed for controlling existing
tmuxsessions. To create new sessions, you should use theexectool with the appropriatetmux new-sessioncommand.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-openclaw-tmux": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Related Skills
skill-creator
Create, edit, audit, tidy, validate, or restructure AgentSkills and SKILL.md files.
video-frames
Extract frames or short clips from videos using ffmpeg.
trello
Manage Trello boards, lists, and cards via the Trello REST API.
mcporter
List, configure, authenticate, call, and inspect MCP servers/tools with mcporter over HTTP or stdio.
openai-whisper
Local speech-to-text with the Whisper CLI (no API key).