tmux

Control external processes via tmux send-keys and capture-pane for remote and background tasks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The Claude Bash tool only runs local, synchronous commands, so it cannot interact with SSH sessions, long-running dev servers, other AI agent instances, or background builds. This Skill bridges that gap by driving tmux sessions with send-keys and capture-pane. ## Core Features & Use Cases - Process Interaction: Send commands to and read output from SSH sessions, dev servers, file watchers, and other Claude/Codex instances running in tmux panes. - Idempotent Session Management: Reuse existing sessions and windows, create project-scoped sessions safely, and poll for ready signals like prompts or server startup markers. - Agent Orchestration: Run multiple Claude/Codex agents in parallel windows with git worktrees, detect completion via shell prompt return, and send multiline prompts via paste-buffer. - Use Case: You need to deploy to a remote server and watch the deployment log. The Skill opens an SSH session in tmux, polls for the shell prompt, runs the deploy command, and captures the output for you. ## Quick Start Use tmux to SSH into the production server, run the deploy script, and show me the last lines of the deployment log.

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I run commands on a remote server from Claude Code?▼

Open an SSH session inside a tmux window, poll capture-pane until the shell prompt appears, then send commands with send-keys. Read results back with capture-pane -p -J, filtering long output with grep.

How to monitor a dev server log in the background?▼

Start the dev server in a dedicated tmux window via send-keys, then poll capture-pane for ready signals like 'listening on' or 'compiled'. Use capture-pane -S -200 to read recent scrollback and grep for ERROR or WARN patterns.

Can tmux send multiline prompts to Claude Code or Codex?▼

Yes, but not with send-keys, since newlines become Enter and submit prematurely. Pipe the text into tmux load-buffer and use paste-buffer, which delivers it as a bracketed paste preserving line breaks, then send Enter separately.

Why does capture-pane return empty or missing output?▼

Empty captures happen when the pane is closed, has zero size, or capture runs before the command finishes. Check pane existence with list-panes, add a sleep after send-keys, or poll for a completion marker like __DONE__.

When should I not use tmux for running commands?▼

Skip tmux for short commands under ten seconds or when you need stdout directly in the conversation; the Bash tool handles those better. Also avoid send-keys for non-text TUIs like vim or htop, and never auto-answer SSH password or host key prompts.