tmux

Send keystrokes and scrape output from tmux sessions.

1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/cryptopafi/nexusos-skills --skill tmux-cryptopafi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/cryptopafi/nexusos-skills/tree/main/tmux
Command: npx skills add https://github.com/cryptopafi/nexusos-skills --skill tmux-cryptopafi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tmux, and includes scripts (resource) components.

What problem does it solve?

Managing and interacting with long-running or remote terminal sessions is tedious and error-prone when done manually; this Skill provides deterministic ways to send input and read output from tmux panes so interactive CLIs can be automated and monitored.

Core Features & Use Cases

  • Send keystrokes reliably: split text and Enter, send special keys (Ctrl+C, Escape), and target specific session:window.pane addresses.
  • Scrape pane output: capture recent lines or entire scrollback with capture-pane for monitoring or automated parsing.
  • Session management & discovery: list sessions across sockets, inspect attached/detached state, and script common session tasks.
  • Common use cases: monitor Claude/Codex worker sessions, approve interactive prompts programmatically, check background job output, and automate interactions with TUIs.

Quick Start

Send the text y followed by Enter to the worker-3 tmux session and then capture the last 20 lines of its pane output to verify the response.

Frequently Asked Questions about tmux

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate keystrokes and send input to a tmux session programmatically?

You can automate tmux sessions by using send-keys workflows to reliably send text, split input, and dispatch special keys like Ctrl+C or Escape to specific session:window.pane addresses. This allows deterministic interaction with interactive CLIs running inside tmux.

How do I scrape and capture terminal output from a tmux pane for monitoring?

You can scrape tmux pane output using the capture-pane mechanism to retrieve recent lines or the entire scrollback buffer. This enables automated parsing and monitoring of background job output or interactive terminal sessions.

Can I use tmux session management to monitor and approve prompts from Claude or Codex workers?

Yes, tmux session management supports monitoring Claude/Codex worker sessions by scraping pane output to detect prompts and sending keystrokes to approve them programmatically. This automates interactions with persistent terminal workers.

Do I need a specific environment to control tmux sessions and scrape pane output?

You need a Unix-like environment with tmux installed and available. The workflow relies on standard tmux features including session:window.pane addressing, capture-pane for output retrieval, and send-keys for input injection.

What is the best way to list and inspect tmux sessions across different sockets?

Session management and discovery features allow you to list tmux sessions across sockets, inspect whether they are attached or detached, and script common session tasks. This provides visibility into all active terminal sessions for monitoring or automation.

Why does sending text to a tmux pane sometimes fail to execute commands properly?

Text sent to tmux panes may fail if not properly split before sending Enter, or if the target session:window.pane address is incorrect. Using reliable send-keys workflows ensures keystrokes and special keys reach the intended pane deterministically.