ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Community Verified developer tools Safety 4/5

tmux

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

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/openclaw/skills/tmux
Or

What 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 tmux windows 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 tmux sessions used for distributed tasks.

When to Use:

  • Monitoring AI sessions in tmux.
  • Sending input to interactive terminal applications.
  • Scraping output from tmux processes.
  • Navigating tmux panes/windows programmatically.
  • Checking on background work in existing tmux sessions.

When NOT to Use:

  • Running one-off shell commands (use exec directly).
  • Starting new background processes (use exec with background:true).
  • Non-interactive scripts (use exec tool).
  • Processes not running inside tmux.
  • Creating new tmux sessions (use exec with tmux new-session).

Example Prompts

  1. 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.
    
  2. 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.
    
  3. 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 Enter presses into separate tmux send-keys commands 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 tmux targets (session name, window index, pane index) to ensure commands go to the correct place. For example, shared:0.1 targets pane 1 of window 0 in the shared session.
  • Error Handling: The skill does not inherently provide detailed error reporting for tmux commands. If a tmux command 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 tmux sessions. To create new sessions, you should use the exec tool with the appropriate tmux new-session command.

Metadata

Author@openclaw
Stars348905
Views66
Updated2026-04-05
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-openclaw-tmux": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#tmux#cli#automation#terminal#monitoring
Safety Score: 4/5