Automates CLI interactions within tmux by scraping output and sending input programmatically.

Install

mkdir -p .claude/skills/tmux && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/574" && unzip -o skill.zip -d .claude/skills/tmux && rm skill.zip

Installs to .claude/skills/tmux

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.
111 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Capture terminal output from specific panes
  • Inject arbitrary text or complex key sequences
  • Monitor terminal state for pattern matching
  • Manage lifecycle of tmux sessions and windows

How it works

Uses tmux CLI utilities to send standard input sequences to detached or attached sessions and reads current pane buffer contents via standard output.

Inputs & outputs

You give it
Target session/pane identifier and command/keystroke sequence
You get back
Captured stdout or terminal pane state text

When to use tmux

  • Automating CLI workflows in tmux
  • Capturing output from remote terminal panes
  • Monitoring terminal prompts for agent feedback
  • Sending automated inputs to interactive shells

About this skill

tmux

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

Basics

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:

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

Special keys:

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

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

Prompt checks

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:

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 pane output contains text.

Notes

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

When not to use it

  • One-shot commands that do not require state
  • Non-interactive background jobs

Prerequisites

tmux

Limitations

  • Cannot access windows or panes in a locked or restricted user environment
  • Requires an existing tmux session to be running

How it compares

Automates interaction with persistent terminal environments rather than executing commands in temporary, isolated subshells.

Compared to similar skills

tmux side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
tmux (this skill)202moReviewIntermediate
worktree-status16moReviewBeginner
tmux03moReviewIntermediate
worktree-parallel07moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

worktree-status

MoonshotAI

Audit all git worktrees in the current project. Use when the user asks about worktree status, which branches are merged, which have uncommitted changes, or which worktrees can be safely cleaned up.

13

tmux

Anhvu1107

ALWAYS use this when the request matches Tmux: Expert tmux session, window, and pane management for terminal multiplexing, persistent remote workflows, and shell scripting automation.

00

worktree-parallel

noah-rivard

Create and manage a git worktree for parallel feature development, then open the new worktree in the editor (code/Cursor) for a second Codex session. Use when the user asks to work on another feature simultaneously, spin up a parallel workspace, or open a new worktree even if they do not mention wor

00

bash-linux

davila7

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

753

create-worktree-skill

disler

Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.

213

domain-dns-ops

steipete

Domain/DNS ops across Cloudflare, DNSimple, Namecheap for Peter. Use for onboarding zones to Cloudflare, flipping nameservers, setting redirects (Page Rules/Rulesets/Workers), updating redirect-worker mappings, and verifying DNS/HTTP. Source of truth: ~/Projects/manager.

27

Search skills

Search the agent skills registry