tmux
What it does
It guides an AI agent through reading the output of tmux sessions and sending input to them, especially interactive tools that are already running. It is for developers who keep long-running terminal tasks in tmux.
When to use it
- ✓When you want to see what a running terminal tool is printing.
- ✓When a tool in a tmux session is waiting for input and needs a reply.
- ✓When you need to start, rename, or close a tmux session.
Skill link
https://github.com/openclaw/openclaw/blob/main/skills/tmux/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Check the tmux session called worker and tell me what it is printing right now.”
5 new skills a week. 1 minute to read.
How it works
The skill lists the sessions and panes, reads the recent output, and sends text or keys when you ask. It confirms that a prompt is understood before approving or choosing anything.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
tmux
Use for existing interactive tmux sessions. For one-shot commands, use normal shell. For new non-interactive background jobs, use background execution.
Basics
tmux ls
tmux list-windows -t shared
tmux list-panes -t shared:0
tmux capture-pane -t shared:0.0 -p
tmux capture-pane -t shared:0.0 -p -S -
Target format: session:window.pane, e.g. shared:0.0.
Send input
Literal text, then Enter:
tmux send-keys -t shared:0.0 -l -- "Please continue"
tmux send-keys -t shared:0.0 Enter
Special keys:
tmux send-keys -t shared:0.0 C-c
tmux send-keys -t shared:0.0 C-d
tmux send-keys -t shared:0.0 Escape
Use -l -- for arbitrary text. Split text and Enter to avoid paste/newline surprises.
Sessions
tmux new-session -d -s worker
tmux rename-session -t old new
tmux kill-session -t worker
Prompt checks
tmux capture-pane -t worker-3 -p | tail -20
tmux capture-pane -t worker-3 -p | rg "proceed|permission|Yes|No|❯"
Approve/select only when the prompt is understood:
tmux send-keys -t worker-3 -l -- "y"
tmux send-keys -t worker-3 Enter
Helpers
scripts/find-sessions.sh: discover sessions.scripts/wait-for-text.sh: wait until captured pane contents contain text.
wait-for-text.sh searches echoed input and scrollback as well as process output. For command completion, use a unique marker whose full text is split across arguments in the command sent to tmux:
nonce="$(od -An -N8 -tx1 /dev/urandom | tr -d ' \n')"
marker="OPENCLAW_DONE_${nonce}"
tmux send-keys -t shared:0.0 -l -- "sleep 4; printf '%s%s\n' 'OPENCLAW_DONE_' '$nonce'"
tmux send-keys -t shared:0.0 Enter
scripts/wait-for-text.sh -t shared:0.0 -p "$marker" -F -T 30
The echoed command never contains the complete marker, and the nonce prevents an older completion line from matching.
Notes
capture-pane -pprints to stdout for scripts.-S -captures full scrollback.- tmux sessions persist across SSH disconnects.
FAQ
Will it send commands without asking?
It approves a prompt only when the prompt is understood and the action is clear.
Is tmux for one-off commands?
No. For one-off commands the normal shell is simpler, and tmux is for existing interactive sessions.
Can it wait for a task to finish?
Yes. A helper script can wait until a pane shows certain text, although a unique marker works best.
Details
Original description by the author
Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.
repo: openclaw/openclaw
Popularity
- GitHub stars
- 394k
- Ranking position
- #86
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
discord-user-post
394kLets your agent post a message you have approved to Discord as you, through the Discord desktop app, after confirming the exact channel.
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
graincrawl
394kLets your agent search your saved Granola meeting notes and transcripts, check how fresh they are, and count them over a period.
Similar skills
wizard
310kWalks you through setup steps only you can do, such as adding credentials or changing dashboard settings, with a guided script.
git-guardrails-claude-code
310kSets up a safety hook that blocks risky git commands, such as push, hard reset, and forced branch deletion, before they can run.
setup-pre-commit
310kSets up automatic checks that format, type-check, and test your code each time you make a git commit.