Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

tmux — Claude skill: drive sessions, panes, send-keys

Lets an agent work with live tmux sessions: read pane output, send keys and text, wait for a prompt line to show up.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openclaw/openclaw --skill tmux -a claude-code
Open on GitHub

What tmux does

Reach for this skill when an interactive program is already running inside tmux and the agent has to talk to it. It lists sessions, windows and panes, dumps pane contents with tmux capture-pane -p, and sends input with send-keys. Arbitrary text goes through -l --, and Enter is a separate call, which avoids newline surprises.

Two helper scripts ship with it. scripts/find-sessions.sh discovers sessions, scripts/wait-for-text.sh blocks until the captured pane contains a given string. That second script matches echoed input and scrollback too, so the example builds a nonce marker and splits its full text across arguments in the command sent to tmux — the echoed line never carries the complete marker.

You need tmux installed, on macOS or Linux. One-shot commands don't need this skill; plain shell is enough. New non-interactive background jobs belong to background execution instead. Worth installing if you keep long interactive sessions around. If your work finishes in a single command, skip it.

What it helps with

  • read output from an interactive program running in tmux
  • send literal text plus Enter to a specific pane
  • wait for a permission prompt or a proceed line to appear
  • list sessions, windows and panes before touching anything
  • approve a prompt in another session once you understand it

Example prompts for the agent

  • check what's in pane shared:0.0 and tell me if it's waiting for input
  • send "Please continue" to worker-3 and press Enter
  • wait until shared:0.0 shows a proceed line, then show the last 20 lines

How to install tmux

1Skills CLI (Vercel)

npx skills add openclaw/openclaw --skill tmux -a claude-code

2Manually: put the files in place

~/.claude/skills/tmux/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tmux/

From the same set45

The whole set →
summarize openclaw Runs a CLI tool to summarize or transcribe web articles, YouTube videos, podcasts, and local PDF documents directly within your AI assistant. Claude Code CX Codex Cursor +1 26,900installs weather openclaw This skill fetches current conditions and forecasts for a city, region, airport code, or coordinates. Use it to check rain and temperature or plan a trip. Claude Code CX Codex Cursor +1 9,300installs gog openclaw Guides an agent using the gog CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Use it when Google Workspace tasks need to run from a terminal. Claude Code CX Codex Cursor +1 8,500installs openai-whisper openclaw This skill lets your agent call the Whisper CLI to transcribe audio on your own machine. No API key needed. Claude Code CX Codex Cursor +1 7,100installs nano-pdf openclaw Edit PDF pages with plain text instructions through the nano-pdf CLI. Useful when you need to fix a typo or swap a heading without leaving your terminal. Claude Code CX Codex Cursor +1 7,100installs skill-creator openclaw A skill for writing, repairing and reviewing other skills. It splits behaviour into branches, sets the frontmatter and sorts resources into folders. Useful once your skill folder gets crowded. Claude Code CX Codex Cursor +1 6,700installs coding-agent openclaw This skill sends large coding tasks to Codex, Claude Code, or OpenCode as background workers. Use it for refactors, PR reviews, and issue-to-PR work. Claude Code CX Codex Cursor +1 6,500installs obsidian openclaw Interacts with Obsidian vaults through the official obsidian CLI. It helps agents read, search, and update notes or tasks without leaving the chat. Claude Code CX Codex Cursor +1 6,400installs

Similar

gws-events-renew official googleworkspace Renews and reactivates Google Workspace Events subscriptions so they stop expiring. Useful when you listen to Workspace events through the CLI. Claude Code CX Codex Cursor +1 30,700installs recipe-watch-drive-changes official googleworkspace This skill subscribes to Google Drive file or folder change notifications using the gws CLI. It helps track document updates via Pub/Sub topics. Claude Code CX Codex Cursor +1 30,300installs persona-it-admin official googleworkspace A persona skill for IT admins: watches for suspicious logins, sets Drive sharing policies, and works through requests with gws. Claude Code CX Codex Cursor +1 30,000installs orca-per-workspace-env stablyai Configures, reviews, and debugs Orca per-workspace environment recipes. Useful when provisioning disposable VMs, containers, SSH hosts, or cloud sandboxes. Claude Code CX Codex Cursor +1 12,100installs wizard Matt Pocock This skill creates an interactive bash wizard for manual setup steps, CI secrets, third-party dashboards, and one-off migrations. Claude Code 553,369installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. Claude Code CX Codex Cursor +1 1,200,000installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. Claude Code 489,289installs using-git-worktrees Jesse Vincent Prepares an isolated workspace before feature work or plan execution. It checks the repository first, then uses native worktree support or Git. Claude Code CX Codex 217,153installs

Questions about tmux

How do I install the tmux skill in Claude?

Run npx skills add openclaw/openclaw --skill tmux -a claude-code. The skill lands at ~/.claude/skills/tmux/SKILL.md.

What does the tmux skill do?

It controls existing tmux sessions and panes: lists them, captures output, sends keys and text, and monitors prompts for a matching line.

What do I need for it to work?

tmux installed on macOS or Linux. For one-shot commands you don't need the skill at all — use a normal shell.

Source text

SKILL.md · MIT
---
name: tmux
description: "Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts."
metadata:
  {
    "openclaw":
      {
        "emoji": "🧵",
        "os": ["darwin", "linux"],
        "requires": { "bins": ["tmux"] },
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "tmux",
              "bins": ["tmux"],
              "label": "Install tmux (brew)",
            },
          ],
      },
  }
---

# tmux

Use for existing interactive tmux sessions. For one-shot commands, use normal shell. For new non-interactive background jobs, use background execution.

## Basics

```bash
tmux ls
tmux list-windows -t shared
tmux list-panes -t shared:0
tmux capture-pane -t shared:0.0 -p
tmux capture-pane -t shared:0.0 -p -S -
```

Target format: `session:window.pane`, e.g. `shared:0.0`.

## Send input

Literal text, then Enter:

```bash
tmux send-keys -t shared:0.0 -l -- "Please continue"
tmux send-keys -t shared:0.0 Enter
```

Special keys:

```bash
tmux send-keys -t shared:0.0 C-c
tmux send-keys -t shared:0.0 C-d
tmux send-keys -t shared:0.0 Escape
```

Use `-l --` for arbitrary text. Split text and Enter to avoid paste/newline surprises.

## Sessions

```bash
tmux new-session -d -s worker
tmux rename-session -t old new
tmux kill-session -t worker
```

## Prompt checks

```bash
tmux capture-pane -t worker-3 -p | tail -20
tmux capture-pane -t worker-3 -p | rg "proceed|permission|Yes|No|❯"
```

Approve/select only when the prompt is understood:

```bash
tmux send-keys -t worker-3 -l -- "y"
tmux send-keys -t worker-3 Enter
```

## Helpers

- `scripts/find-sessions.sh`: discover sessions.
- `scripts/wait-for-text.sh`: wait until captured pane contents contain text.

`wait-for-text.sh` searches echoed input and scrollback as well as process output. For command completion, use a unique marker whose full text is split across arguments in the command sent to tmux:

```bash
nonce="$(od -An -N8 -tx1 /dev/urandom | tr -d ' \n')"
marker="OPENCLAW_DONE_${nonce}"
tmux send-keys -t shared:0.0 -l -- "sleep 4; printf '%s%s\n' 'OPENCLAW_DONE_' '$nonce'"
tmux send-keys -t shared:0.0 Enter
scripts/wait-for-text.sh -t shared:0.0 -p "$marker" -F -T 30
```

The echoed command never contains the complete marker, and the nonce prevents an older completion line from matching.

## Notes

- `capture-pane -p` prints to stdout for scripts.
- `-S -` captures full scrollback.
- tmux sessions persist across SSH disconnects.

© openclaw · MIT · openclaw/openclaw

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor