Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
arjunmahishi avatar

Tmux

  • 4 installs
  • 12 repo stars
  • Updated July 21, 2026
  • arjunmahishi/dotfiles

tmux is a skill that manages tmux sessions, windows, and panes via the tmux CLI to run background processes and multi-pane layouts.

About

A skill for managing tmux sessions, windows, and panes through the tmux CLI. It creates detached sessions, splits panes, sends commands, captures pane output, and applies layouts. A developer uses it to run background processes, set up multi-pane development layouts, and monitor long-running commands, driving the CLI directly rather than a tmux MCP server.

  • Manages tmux sessions, windows, and panes via the CLI (not the tmux MCP)
  • Runs and monitors background processes with send-keys and capture-pane
  • Provides multi-pane dev-layout and wait-for-command-to-finish workflows

Tmux by the numbers

  • 4 all-time installs (skills.sh)
  • Ranked #431 of 550 CLI & Terminal skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

tmux capabilities & compatibility

Capabilities
orchestration
From the docs

What tmux says it does

Use `tmux` commands via Bash to manage terminal sessions, windows, and panes. Do NOT use the tmux MCP server — use the CLI directly.
SKILL.md
# Capture visible pane content tmux capture-pane -t myapp:0.0 -p
SKILL.md
npx skills add https://github.com/arjunmahishi/dotfiles --skill tmux

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4
repo stars12
Last updatedJuly 21, 2026
Repositoryarjunmahishi/dotfiles

What it does

Manage tmux sessions, windows, and panes via the CLI to run background processes, build multi-pane layouts, and monitor commands.

Who is it for?

Running and monitoring background processes and multi-pane dev layouts from the terminal.

Skip if: Using the tmux MCP server, which the skill explicitly tells the agent to avoid.

When should I use this skill?

When the user asks to run background processes, set up multi-pane layouts, or monitor commands with tmux.

What you get

tmux sessions, panes, and background commands are created, monitored, and captured from the CLI.

  • Managed tmux sessions, panes, and monitored background processes

Files

SKILL.mdMarkdownGitHub ↗

tmux CLI Skill

Use tmux commands via Bash to manage terminal sessions, windows, and panes. Do NOT use the tmux MCP server — use the CLI directly.

All commands below are safe to run and do not require user confirmation unless they kill sessions or panes containing unsaved work.

Session Management

tmux list-sessions                          # list all sessions (alias: tmux ls)
tmux new-session -d -s myapp                # create detached session
tmux new-session -d -s myapp -c ~/project   # create with working directory
tmux kill-session -t myapp                  # kill a session (confirm first)
tmux rename-session -t old new              # rename a session
tmux has-session -t myapp 2>/dev/null       # check if session exists (exit code)

Window Management

tmux new-window -t myapp                    # new window in session
tmux new-window -t myapp -n build           # new window with name
tmux new-window -t myapp -n build -c ~/src  # with name and working directory
tmux rename-window -t myapp:0 main          # rename window
tmux select-window -t myapp:1               # switch to window by index
tmux kill-window -t myapp:1                 # kill a window (confirm first)
tmux list-windows -t myapp                  # list windows in a session

Pane Management

tmux split-window -t myapp -h               # split horizontally (side by side)
tmux split-window -t myapp -v               # split vertically (top/bottom)
tmux split-window -t myapp -h -c ~/src      # split with working directory
tmux select-pane -t myapp:0.1               # select pane (session:window.pane)
tmux kill-pane -t myapp:0.1                 # kill a pane
tmux list-panes -t myapp:0                  # list panes in a window
tmux resize-pane -t myapp:0.1 -R 20         # resize pane right by 20 cells
tmux resize-pane -t myapp:0.1 -D 10         # resize pane down by 10 cells
# Resize directions: -U (up), -D (down), -L (left), -R (right)

Command Execution

# Send a command to a specific pane
tmux send-keys -t myapp:0.0 'make build' Enter

# Send keys without pressing Enter (useful for partial input)
tmux send-keys -t myapp:0.0 'echo hello'

# Send Ctrl-C to interrupt a running process
tmux send-keys -t myapp:0.0 C-c

# Run a command in a new window directly
tmux new-window -t myapp -n tests 'go test ./...'

Content Capture

# Capture visible pane content
tmux capture-pane -t myapp:0.0 -p

# Capture with scrollback history (last 100 lines)
tmux capture-pane -t myapp:0.0 -p -S -100

# Capture entire scrollback
tmux capture-pane -t myapp:0.0 -p -S -

# Check if a command is still running (look for shell prompt in output)
tmux capture-pane -t myapp:0.0 -p | tail -5

Layouts

tmux select-layout -t myapp:0 even-horizontal  # equal columns
tmux select-layout -t myapp:0 even-vertical     # equal rows
tmux select-layout -t myapp:0 main-horizontal   # large top, small bottom panes
tmux select-layout -t myapp:0 main-vertical     # large left, small right panes
tmux select-layout -t myapp:0 tiled             # equal grid

Target Syntax

Targets follow the pattern session:window.pane:

  • myapp — session named "myapp"
  • myapp:0 — first window in "myapp"
  • myapp:0.1 — second pane in first window of "myapp"
  • myapp:build — window named "build" in "myapp"

Common Workflows

Run a background process and check on it

tmux new-session -d -s bg
tmux send-keys -t bg 'long-running-command' Enter
# ... later ...
tmux capture-pane -t bg -p | tail -20    # check output

Start roachdev claude in a new pane with a prompt

tmux new-session -d -s dev -c ~/project
tmux send-keys -t dev "roachdev claude --prompt 'fix the failing tests'" Enter

Monitor a long-running command

tmux new-window -t dev -n watch
tmux send-keys -t dev:watch 'watch -n 5 curl -s http://localhost:8080/health' Enter
# Check on it later:
tmux capture-pane -t dev:watch -p

Multi-pane development layout

tmux new-session -d -s work -c ~/project
tmux split-window -t work -h              # editor | terminal
tmux split-window -t work:0.1 -v          # editor | terminal / logs
tmux send-keys -t work:0.1 'make watch' Enter
tmux send-keys -t work:0.2 'tail -f app.log' Enter
tmux select-layout -t work:0 main-vertical

Wait for a command to finish

# Poll until the shell prompt reappears
while ! tmux capture-pane -t myapp:0.0 -p | tail -1 | grep -q '\$'; do
  sleep 2
done
echo "Command finished"
tmux capture-pane -t myapp:0.0 -p | tail -20

Related skills

FAQ

Should I use the tmux MCP server?

No. The skill says to use the tmux CLI directly, not the MCP server.

How do I check a background command's output?

Use tmux capture-pane -t <target> -p, optionally with -S for scrollback history.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.