tmux for Openclaw

A specialized skill for remote-controlling tmux sessions to manage interactive CLI tools through keystroke injection and pane scraping.

brennerspear
v1.0.0
Feb 25, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tmux-remote-control

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tmux-remote-control using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is tmux?

The tmux skill enables AI agents to interact with terminal-based applications that require a full interactive TTY. By leveraging the power of terminal multiplexing, this skill allows for the creation of background sessions where coding agents or complex CLI tools can run persistently. It is a core component for developers using Openclaw Skills who need to bridge the gap between automated scripts and interactive terminal user interfaces (TUIs).

This integration focuses on reliability and transparency. It avoids obscure socket paths in favor of the default tmux server, making it easy for users to manually attach to and monitor sessions. By following standardized naming conventions and safe input handling, it provides a robust framework for terminal-based automation.

tmux Use Cases

  • Running interactive coding agents like Claude Code or Codex in background sessions.
  • Orchestrating multiple agents in parallel across different git worktrees.
  • Automating input for REPLs and TUI applications that do not support standard pipes.
  • Monitoring long-running terminal tasks by periodically scraping pane buffers for specific output or prompts.

How tmux Works

  1. The skill creates a new detached tmux session using the naming convention oc-project-feature to ensure it is easily identifiable as part of Openclaw Skills.
  2. Commands are sent to the session using literal key sequences to handle complex interactive inputs safely.
  3. A small delay is introduced between text input and the Enter key to prevent TUI applications from misinterpreting the sequence as a single paste event.
  4. The agent monitors the progress of the task by capturing the pane's history and analyzing the text for shell prompts or success markers.
  5. Upon completion, the session can be attached to by the user for review or killed programmatically to clean up the environment.

tmux Setup

To use this skill, ensure that tmux is installed on your host system (Darwin or Linux). No additional configuration of custom sockets is required, as Openclaw Skills utilizes the default server.

# Install tmux on macOS
brew install tmux

# Install tmux on Ubuntu/Debian
sudo apt-get update && sudo apt-get install tmux

tmux Data Schema & Taxonomy

The skill manages terminal data and session metadata using the following structure:

Attribute Specification Description
Session Prefix oc- Identifies sessions managed by Openclaw Skills to avoid user collisions.
Target Syntax session:window.pane Uses standard tmux targeting (defaulting to :0.0) for precise control.
Capture Range -S -200 to -500 Defines the scrollback buffer depth for output scraping.
Naming Convention oc-${project}-${feature} Ensures sessions are searchable via `tmux ls

tmux Advanced Features

  • Multi-agent orchestration support for running simultaneous fixes across separate git worktrees.
  • Intelligent shell prompt detection (❯ or $) to identify when background tasks have finished.
  • Environment-specific optimizations, such as setting PYTHON_BASIC_REPL=1 to ensure compatible input flows.
  • Bulk cleanup capabilities to terminate all active sessions associated with Openclaw Skills in a single command.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins tmux
Github Stars: 0
forks: 0

Featured*