agent/skills/tmux/SKILL.md
Manages background processes, captures command output, and handles session multiplexing. Use when running long-running commands, capturing output from detached processes, or managing concurrent tasks in headless environments.
npx skillsauth add knoopx/pi tmuxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Terminal multiplexer for background processes, output capture, and session management. Every process runs in a named session you can inspect later.
Start a command in a named detached session:
tmux new-session -d -s myserver 'python -m http.server 8080'
tmux new-session -d -s build -c /path/to/project 'make build'
Keep a session alive after the command completes:
tmux new-session -d -s task 'command; exec bash'
Only create if it doesn't exist:
tmux has -t myserver || tmux new-session -d -s myserver 'command'
Get the output from a running session:
tmux capture-pane -t mysession -p # Visible output only
tmux capture-pane -t mysession -p -S - # Full scrollback history
tmux capture-pane -t mysession -p -S -100 # Last 100 lines
tmux capture-pane -t mysession -p > file.txt # Save to file
Send keystrokes to a session:
tmux send-keys -t mysession 'echo hello' Enter # Type and press Enter
tmux send-keys -t mysession C-c # Send Ctrl+C
Signal when a job finishes, then wait for it:
tmux new-session -d -s job 'command; tmux wait-for -S job-done'
tmux wait-for job-done
tmux ls # List all sessions
tmux kill-session -t myserver # Kill specific session
tmux kill-server # Kill all sessions
Development servers:
tmux new-session -d -s backend 'bun run backend'
tmux new-session -d -s frontend 'bun run frontend'
Run and capture output in a script:
tmux new-session -d -s job 'command'
sleep 0.5
output=$(tmux capture-pane -t job -p)
echo "$output"
-c /path to set working directory when creating a sessionexec bash to keep sessions alive after commands finish-S - with capture-pane to get full scrollback historytools
Inform the user what is happening — skip passive lookups
development
Renders markdown to self-contained HTML with a custom dark stylesheet and opens in browser. Use when previewing markdown documents, generating styled HTML from README or report files.
testing
Programmatic hunk selection for Jujutsu — split, commit, or squash specific hunks without interactive prompts. Use when making partial commits or selective squashes.
content-media
Manage version control with Jujutsu (jj) — no staging area, immediate changes, smart rebasing. Use when navigating history, squashing, or pushing to Git remotes.