tmux
Skill0 starsChanged 8 months agoMITView on GitHub
Terminal multiplexer patterns for controlling interactive applications. Use when: running interactive REPLs (python, node), debugging with gdb/lldb, running dev servers, working with vim/git rebase, or monitoring Claude Code sessions.
69 other projects use a version of this, 19 of them edited.
Adopted by
Most recently taken up by
- insight68/Skillstheir own version, first seen Nov 8, 2026
- QVerisAI/QVerisBotedited, first seen Nov 1, 2026
- jav-ed/skill_Managtheir own version, first seen Nov 1, 2026
- bks-lab/open-bridgetheir own version, first seen Nov 1, 2026
- gabrielkoerich/skillstheir own version, first seen Nov 1, 2026
- jellydn/my-ai-toolstheir own version, first seen Oct 18, 2026
Used with
Projects with it also use taskflow-inbox-triage, session-logs and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AtomicBot-aiSkilltaskflow-inbox-triage
Also in 6 projects that use this
seedprodSkillsession-logs
Search and analyze your own session logs (older/parent conversations) using jq.
Also in 20 projects that use this
seedprodSkillvoice-call
Start voice calls via the OpenClaw voice-call plugin.
Also in 18 projects that use this
AtomicBot-aiSkilltaskflow
Also in 7 projects that use this
jiulingyunSkillBlueBubbles
为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。
Also in 16 projects that use this
hkyutongSkillopenclaw-release-maintainer
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
Also in 4 projects that use this
- +5 more from seedprod
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 19
- spinabot/brigade★ 11k24% same
- the-open-agent/openagent★ 5.7k19% same
- casibase/casibase★ 5.7k19% same
- linuxhsj/openclaw-zero-token★ 5.2k24% same
- higress-group/himarket★ 1.3k24% same
- OpenBMB/EdgeClaw★ 1.2k24% same
- understudy-ai/understudy★ 46124% same
- AtomicBot-ai/atomicbot★ 32524% same
- QVerisAI/QVerisBot★ 18424% same
- cohen-liel/hivemind★ 10824% same
9 more not listed
Wrote their own version · 50
- moltbot/clawdbot★ 394ksame name
- steipete/warelay★ 394ksame name
- steipete/clawdis★ 394ksame name
- moltbot/moltbot★ 394ksame name
- clawdbot/clawdbot★ 394ksame name
- openclaw/openclaw★ 394ksame name
- molt-bot/clawdbot★ 391ksame name
- OpenBMB/PilotDeck★ 5ksame name
- mitsuhiko/agent-commands★ 3.2ksame name
- mitsuhiko/agent-stuff★ 3.2ksame name
40 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ccswitchSkill
- code-rulesSkill
- leanmgr-cache-managerSkill
- learn-math-by-lean-notebookSkill
- lmfdb-cliSkill
- mathlib-styleSkill
- mathlib-workflowSkill
- openclaw-rssSkill
- pre-initSkill
- pr-worktree-workflowSkill
- sshSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 64 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use tmux to control interactive terminal applications by sending keystrokes and capturing output.
- Distinctive: line 53
Always derive session name from the project:
- Distinctive: line 334
Always: verify session name before kill operations
- Distinctive: line 339
After starting a session, ALWAYS tell the user:
“Common” is measured: kept by at least 6 in 10 of the 64 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tmux Skill
Overview
Use tmux to control interactive terminal applications by sending keystrokes and capturing output. This skill provides patterns for managing REPLs, dev servers, debuggers, and Claude Code sessions.
When to Use
Use tmux when:
- Running interactive REPLs (python, node, psql)
- Debugging with gdb/lldb
- Running dev servers and file watchers
- Interactive CLI tools (vim, git rebase -i)
- Claude Code session monitoring
- Any process requiring TTY interaction
Don't use for:
- Simple one-shot commands (<10s)
- Non-interactive scripts
- Commands with stdin redirection
Core Pattern
# Create detached session with interactive shell
tmux new-session -d -s "$SESSION" -n main
# Send commands (use send-keys, not inline command)
tmux send-keys -t "$SESSION:main" 'python3 -i' Enter
# Capture output
tmux capture-pane -t "$SESSION" -p
# Wait for prompt (poll)
for i in {1..30}; do
output=$(tmux capture-pane -t "$SESSION" -p)
if echo "$output" | grep -q ">>>"; then break; fi
sleep 0.5
done
# Cleanup
tmux kill-session -t "$SESSION"Session Naming Convention
Always derive session name from the project:
SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename "$PWD")Idempotent Process Start
Always check before creating sessions:
SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename "$PWD")
# Create session only if it doesn't exist
if ! tmux has-session -t "$SESSION" 2>/dev/null; then
tmux new-session -d -s "$SESSION" -n main
tmux send-keys -t "$SESSION:main" '<command>' Enter
else
echo "Session $SESSION already exists"
fiMultiple Processes (Windows)
For multiple processes in one project, use windows not separate sessions:
SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename "$PWD")
# Create session if needed
if ! tmux has-session -t "$SESSION" 2>/dev/null; then
tmux new-session -d -s "$SESSION" -n server
tmux send-keys -t "$SESSION:server" 'npm run dev' Enter
fi
# Add window if it doesn't exist
if ! tmux list-windows -t "$SESSION" -F '#{window_name}' | grep -q "^tests$"; then
tmux new-window -t "$SESSION" -n tests
tmux send-keys -t "$SESSION:tests" 'npm run test:watch' Enter
fiCommon Commands
Session Management
# List sessions
tmux list-sessions
tmux ls
# Check if session exists
tmux has-session -t "$SESSION" 2>/dev/null
# Kill session (only this project's session)
tmux kill-session -t "$SESSION"
# Kill specific window
tmux kill-window -t "$SESSION:tests"
# Never use: tmux kill-server (kills ALL sessions)Sending Input
# Send text + Enter
tmux send-keys -t "$SESSION" 'y' Enter
# Send text without Enter
tmux send-keys -t "$SESSION" -l -- 'some text'
# Send special keys
tmux send-keys -t "$SESSION" Enter
tmux send-keys -t "$SESSION" Escape
tmux send-keys -t "$SESSION" C-c # Ctrl+C
tmux send-keys -t "$SESSION" C-d # Ctrl+D (EOF)
tmux send-keys -t "$SESSION" C-z # Ctrl+Z (suspend)
tmux send-keys -t "$SESSION" Space
tmux send-keys -t "$SESSION" BSpace # Backspace
# For Claude Code prompts, split Enter to avoid paste issues
tmux send-keys -t "$SESSION" -l -- 'text to send'
sleep 0.1
tmux send-keys -t "$SESSION" EnterCapture Output
# Last 20 lines of pane
tmux capture-pane -t "$SESSION" -p | tail -20
# Entire scrollback
tmux capture-pane -t "$SESSION" -p -S -
# Specific pane in window
tmux capture-pane -t "$SESSION:0.0" -pWindow/Pane Navigation
# Select window
tmux select-window -t "$SESSION:0"
# Select pane
tmux select-pane -t "$SESSION:0.1"
# List windows
tmux list-windows -t "$SESSION"
# Rename session
tmux rename-session -t old newInteractive Shell Requirement
Use send-keys pattern for reliable shell initialization:
# WRONG - inline command bypasses shell init, breaks PATH/direnv
tmux new-session -d -s "$SESSION" -n main 'npm run dev'
# CORRECT - create session, then send command to interactive shell
tmux new-session -d -s "$SESSION" -n main
tmux send-keys -t "$SESSION:main" 'npm run dev' EnterCommon Patterns
Python REPL
tmux new-session -d -s python python3 -i
tmux send-keys -t python 'import math' Enter
tmux send-keys -t python 'print(math.pi)' Enter
tmux capture-pane -t python -p
tmux kill-session -t pythonDebugging with lldb
tmux new-session -d -s lldb 'lldb ./a.out'
tmux send-keys -t lldb 'set pagination off' Enter
# break with C-c, issue bt, info locals
tmux send-keys -t lldb 'bt' Enter
tmux send-keys -t lldb 'quit' EnterVim Editing
tmux new-session -d -s vim vim /tmp/file.txt
sleep 0.3
tmux send-keys -t vim 'i' 'Hello World' Escape ':wq' EnterInteractive Git Rebase
tmux new-session -d -s rebase -c /repo/path 'git rebase -i HEAD~3'
sleep 0.5
tmux capture-pane -t rebase -p
tmux send-keys -t rebase 'Down' 'squash' Escape
tmux send-keys -t rebase ':wq' EnterChecking Process Status
# Check session exists
tmux has-session -t "$SESSION" 2>/dev/null && echo "exists" || echo "none"
# List windows and their commands
tmux list-windows -t "$SESSION" -F '#{window_name}: #{pane_current_command}'
# Check for specific window
tmux list-windows -t "$SESSION" -F '#{window_name}' | grep -q "^server$"
# Check for ready indicators
tmux capture-pane -p -t "$SESSION:server" -S -50 | rg -i "listening|ready|started"
# Check for errors
tmux capture-pane -p -t "$SESSION" -S -100 | rg -i "error|fail|exception"Claude Code Session Patterns
Check if Session Needs Input
tmux capture-pane -t worker-3 -p | tail -10 | grep -E "❯|Yes.*No|proceed|permission"Approve Claude Code Prompt
tmux send-keys -t worker-3 'y' Enter
# Or select numbered option
tmux send-keys -t worker-3 '2' EnterCheck All Sessions
for s in shared worker-2 worker-3 worker-4; do
echo "=== $s ==="
tmux capture-pane -t $s -p 2>/dev/null | tail -5
doneRestarting a Process
# Send Ctrl+C then restart
tmux send-keys -t "$SESSION:server" C-c
sleep 1
tmux send-keys -t "$SESSION:server" 'npm run dev' EnterCommon Mistakes
Not Waiting After Session Start
# Problem: Capturing immediately shows blank
tmux new-session -d -s sess command
tmux capture-pane -t sess -p # Too early!
# Fix: Add brief sleep
tmux new-session -d -s sess command
sleep 0.3
tmux capture-pane -t sess -pForgetting Enter Key
# Problem: Command typed but not executed
tmux send-keys -t sess 'print("hello")' # Missing Enter!
# Fix: Add Enter
tmux send-keys -t sess 'print("hello")' EnterUsing Wrong Key Names
# Problem: \n doesn't work
tmux send-keys -t sess 'text\n'
# Fix: Use tmux key names
tmux send-keys -t sess 'text' EnterNot Cleaning Up Sessions
# Fix: Always kill when done
tmux kill-session -t session_name
# Or check first
tmux has-session -t name 2>/dev/null && tmux kill-session -t nameWait for Ready Pattern
for i in {1..30}; do
if tmux capture-pane -p -t "$SESSION:server" -S -20 | rg -q "listening|ready"; then
echo "Server ready"
break
fi
sleep 1
doneWhen to Use tmux
| Scenario | Use tmux? |
Dev server (npm run dev, rails s) | Yes |
File watcher (npm run watch) | Yes |
Test watcher (npm run test:watch) | Yes |
| Database server | Yes |
tilt up | Yes |
One-shot build (npm run build) | No |
| Quick command (<10s) | No |
| Need stdout in conversation | No |
Isolation Rules
- Never use
tmux kill-server - Never kill sessions not matching current project
- Always derive session name from git root or pwd
- Always verify session name before kill operations
- Other Claude Code instances may have their own sessions
User Notification
After starting a session, ALWAYS tell the user:
To monitor: tmux attach -t $SESSION
To capture: tmux capture-pane -t $SESSION -p
To stop: tmux kill-session -t $SESSIONDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

