Tmux — OpenClaw Skill
Remote-control tmux sessions by sending keystrokes and scraping pane output for interactive CLI management.
What This Skill Does
The Tmux skill gives your OpenClaw agent the ability to interact with tmux terminal multiplexer sessions. It can send keystrokes to interactive applications, capture and read pane output, navigate between windows and panes, and manage sessions -- all programmatically. This is essential for monitoring long-running processes, interacting with TUI applications, and orchestrating parallel work across multiple terminal sessions.
The skill supports common tmux workflows: listing sessions, capturing the last N lines of output, sending literal text and special keys (Enter, Escape, Ctrl-C), and targeting specific session:window.pane combinations. It is particularly useful for managing parallel worker sessions where your agent can check on background tasks, approve prompts, and dispatch new work.
Unlike the exec tool which runs one-off commands, the Tmux skill is designed for persistent, interactive sessions. Use it when you need to monitor Claude Code or other AI sessions in tmux, send input to running processes, or scrape output from long-running background jobs.
Example Prompts
Check what's happening in the shared tmux session -- show me the last 20 lines
Send "y" and Enter to the worker-3 session to approve the pending prompt
List all running tmux sessions and summarize what each one is doing
Send Ctrl-C to the worker-5 session to cancel the running process
Check if any of my worker sessions are waiting for input
Send the command "npm run build" to the shared:1 window
Capture the entire scrollback from the worker-2 session and find any error messages
Requirements
Binary dependency: tmux must be installed and available in PATH.
- macOS:
brew install tmux(or pre-installed via Xcode CLI tools) - Linux: Available in all major package managers (
apt install tmux,yum install tmux) - Active sessions: At least one tmux session must be running for the skill to interact with
Setup on KiwiClaw
Tmux is pre-installed on all KiwiClaw agent machines. Your agent can create, manage, and interact with tmux sessions out of the box. No configuration needed -- manage your agent from the KiwiClaw dashboard.
Setup Self-Hosted
- Install tmux via your system package manager
- Start a tmux session:
tmux new-session -d -s shared - The skill activates automatically when your agent needs to interact with tmux sessions
- Verify with:
tmux list-sessions
Related Skills
- Skill Creator -- develop and test custom skills in tmux sessions
- MCPorter -- run MCP servers in tmux for persistent tool access
- Xurl -- combine with tmux for monitoring social media workflows
- Gog -- run long Google Workspace operations in background tmux sessions
FAQ
When should I use the Tmux skill vs the exec tool?
Use the Tmux skill when you need to interact with interactive terminal applications, monitor long-running processes in existing tmux sessions, or send input to TUI apps. Use the exec tool for one-off shell commands, non-interactive scripts, or starting new background processes.
How does the Tmux skill capture output?
The skill uses tmux capture-pane -t session -p to print the visible pane content to stdout. Add -S - to capture the entire scrollback history. You can target specific panes using the session:window.pane format (e.g., shared:0.0).
Can the Tmux skill manage multiple parallel sessions?
Yes. The skill supports multiple named sessions (shared, worker-2 through worker-8) for parallel work. You can check all sessions' status at once, send tasks to specific workers, and monitor their output independently.
Does the Tmux skill work with interactive TUI applications?
Yes. For interactive TUIs, split text and Enter into separate sends to avoid paste edge cases. Use tmux send-keys -l for literal text, then a separate send-keys for Enter.