tmux

Manage tmux sessions, windows, and panes non-interactively via CLI commands.

1|Updated May 4, 2026
One-click install
npx skills add https://github.com/wesbragagt/nixos-config --skill tmux-wesbragagt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tmux
Source: https://github.com/wesbragagt/nixos-config/tree/main/home/skills/tmux
Command: npx skills add https://github.com/wesbragagt/nixos-config --skill tmux-wesbragagt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long-running builds, dev servers, and background jobs often live inside tmux sessions that an agent or user cannot attach to without blocking. This Skill lets you inspect, control, and read output from tmux sessions, windows, and panes entirely non-interactively. ## Core Features & Use Cases - State Inspection: List sessions, windows, and panes with machine-parseable formats, and capture pane output including full scrollback history. - Remote Control: Send keystrokes and commands to any pane, create detached sessions and windows, and split panes without ever attaching. - Safe Lifecycle Management: Create and kill only the sessions you own, with explicit guardrails against destructive commands like tmux kill-server. - Use Case: Start a build in a detached tmux session, continue other work, then capture the pane's scrollback later to check whether the build succeeded — or send a prompt to another Claude Code instance running in a sibling window. ## Quick Start Ask the agent to list all running tmux sessions and show the recent output of the pane running your dev server.

Frequently Asked Questions about tmux

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

FAQPage Schema
How do I read tmux pane output without attaching?

Use tmux capture-pane with the -p flag to print the pane's visible screen to stdout. Add -S -2000 to include scrollback history, or -S - -E - to dump the entire scrollback buffer for the target pane.

How do I send a command to a tmux pane from a script?

Use tmux send-keys with the target pane, the quoted command text, and a final Enter argument to submit it. For literal text containing words like Enter or C-c, pass -l so they are not interpreted as key names.

Why does my tmux session disappear after the command finishes?

Panes die when their command exits, taking the output with them. Append '; exec bash' to keep the pane alive, or set remain-on-exit on for the session so capture-pane still works after the command ends.

Why does tmux send-keys not run my command?

The most common cause is forgetting the Enter key argument, which leaves the text sitting at the prompt unexecuted. Also wait briefly before capturing output, since sent commands run asynchronously.

Is it safe to run tmux kill-server to clean up sessions?

No. tmux kill-server destroys every session on the machine, including work belonging to the user. Kill only the specific panes, windows, or sessions you created using kill-pane, kill-window, or kill-session.