skills/tmux-interactive-processes/SKILL.md
Use tmux instead of background bash for long-running, interactive, inspectable, or user-attachable terminal processes. Use for development servers, watch-mode tests, REPLs, debuggers, interactive CLIs, log tailing, and commands that may run indefinitely or need later input/inspection.
npx skillsauth add adampoit/ai tmux-interactive-processesInstall 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.
Use tmux when a command needs to keep running, accept later input, show ongoing output, or remain available for human attachment.
Prefer tmux over raw background shell patterns because the process stays visible, inspectable, attachable, and controllable.
Do not use these patterns for long-running or interactive work:
command &
nohup command &
command > log.txt 2>&1 &
disown
tail -f log.txt
Use normal shell execution only when the command runs to completion and prints final output.
Use stable, descriptive names:
agent-<repo-or-project>-<purpose>
Examples:
agent-myapp-dev
agent-myapp-tests
agent-myapp-debug
agent-myapp-repl
Check existing sessions before creating a new one:
tmux list-sessions
Reuse a matching session when appropriate.
Create a detached session from the current working directory:
tmux new-session -d -s agent-myapp-dev -c "$PWD" 'npm run dev'
For commands with tricky quoting, start a shell first:
tmux new-session -d -s agent-myapp-dev -c "$PWD" bash
tmux send-keys -t agent-myapp-dev 'npm run dev' C-m
Inspect the pane after startup before claiming success.
Capture recent output:
tmux capture-pane -pt agent-myapp-dev -S -200
Capture more history:
tmux capture-pane -pt agent-myapp-dev -S -1000
Use capture-pane to verify readiness, failures, prompts, and current state.
Send text followed by Enter:
tmux send-keys -t agent-myapp-dev 'help' C-m
Send control keys:
tmux send-keys -t agent-myapp-dev C-c
Use send-keys for REPLs, debuggers, prompts, and graceful shutdown.
When useful, report the session name and attach command:
tmux attach -t agent-myapp-dev
Prefer graceful shutdown first:
tmux send-keys -t agent-myapp-dev C-c
Inspect after shutdown:
tmux capture-pane -pt agent-myapp-dev -S -100
Remove the session only when it is no longer needed:
tmux kill-session -t agent-myapp-dev
tmux list-sessions.capture-pane before making claims about state.send-keys when input is needed.If a command is expected to run continuously, wait for input, display ongoing output, or require later interaction, use tmux.
If a command runs to completion and only prints final output, use normal shell execution.
tools
Use Jujutsu (`jj`) for version control operations including status, history, diffs, commits, rebases, splits, squashes, and Git interop. Use when a repository is initialized for jj or the user asks for jj/Jujutsu workflows.
tools
Manage tasks with the `task` (Taskwarrior) CLI. Use when the user asks to review tasks, get task summaries, add work items, or complete tasks.
business
Search Slack messages and read Slack threads. Use when the user asks to search Slack, find messages, look up conversations, read thread replies, or retrieve Slack content. Triggers on requests involving Slack message lookup, conversation history, or thread reading.
tools
Guide for creating effective agent skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends an AI agent's capabilities with specialized knowledge, workflows, or tool integrations.