claude-tmux for Openclaw

A specialized skill for managing and interacting with Claude Code instances running inside tmux sessions using native CLI commands.

paulrahul
v1.0.0
Feb 11, 2026
0
2.7k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install claude-tmux

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 claude-tmux 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 claude-tmux?

The claude-tmux skill enables AI agents to seamlessly interact with Claude Code sessions hosted within tmux environments. By utilizing standard tmux commands rather than relying on external scripts, this skill provides a robust and portable way to monitor and prompt Claude across different project sessions. It is designed to be a core part of the Openclaw Skills collection for developers who need to bridge the gap between their terminal-based AI assistants and their broader automation workflows.

This skill excels at identifying specific Claude panes, capturing recent conversation history, and injecting new prompts directly into the terminal. Whether you are managing multiple projects or just want to automate the maintenance of your Claude context, this tool integrates directly into your existing CLI setup to ensure consistency and speed.

claude-tmux Use Cases

  • Monitoring Claude Code outputs across multiple project-specific tmux sessions without switching windows.
  • Automating the /compact command to maintain Claude context efficiency during long development tasks.
  • Programmatically sending prompts to an active Claude session from an external agent or script.
  • Debugging Claude interactions by retrieving raw scrollback buffers for deep technical analysis.

How claude-tmux Works

  1. The skill identifies the target tmux session and locates a pane specifically titled 'claude' to ensure command accuracy.
  2. It captures the recent pane buffer (typically the last 200 lines) to parse the current state of the conversation.
  3. Using the capture-pane command, it identifies the latest user prompt and Claude response based on standard visual markers.
  4. Prompts or commands are injected into the session via the tmux send-keys function, followed by a simulated Enter key.
  5. The skill optionally polls the buffer to wait for a response, ensuring the agent receives the full output before proceeding.

claude-tmux Setup

To prepare your environment for this skill, ensure your tmux panes are correctly labeled so they can be discovered by the Openclaw Skills framework:

# Name your window 'claude' within a session
tmux rename-window -t <session_name> claude

# Or set a specific pane title
tmux select-pane -T claude

# Verify the pane is discoverable via CLI
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_title}' | grep -i claude

claude-tmux Data Schema & Taxonomy

Component Description
Session Name The unique tmux session identifier (e.g., 'backend-api').
Target Pane The specific window and pane index where Claude is running.
Prompt Marker The Unicode character ❯ used to identify user inputs.
Response Marker The Unicode character ⏺ used to identify Claude output.
Scrollback Buffer The number of lines (200-400) captured for context retrieval.

claude-tmux Advanced Features

  • Custom Socket Support: Prefix commands with custom tmux sockets using the -S flag for remote or restricted environments.
  • Automated Polling: Includes intelligent wait loops that monitor the buffer for new Claude output with configurable timeouts.
  • Multi-Session Coordination: Ability to switch between and manage several independent Claude Code instances simultaneously using the Openclaw Skills logic.
  • Native Integration: Operates entirely through pure tmux commands, ensuring zero dependencies and high compatibility across different terminal setups.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*