Automated summary
This skill explains how to use tmux from the Bash tool to launch and drive concurrent processes—servers, long builds, other agents—in separate windows or panes.
Strengths
- Covers creating named detached windows and sending commands without blocking the main channel
- Clearly separates plain send-keys, literal -l mode, and load-buffer/paste-buffer for multi-line text
- Shows how to read output with capture-pane, including full scrollback history
- Includes a quick reference table and tmux command chaining in a single invocation
Limitations
- Assumes you are already inside tmux; commands fail silently or unexpectedly when $TMUX is empty
- Depends entirely on the Bash tool and valid pane/window targets, with no error-handling guidance
- Does not address persistence across restarts or safety of instructions sent to other agents
Use it when you need to start a dev server, watch a long build, or deliver multi-line instructions to another agent in a tmux pane.
Skip it when the environment is not running inside a tmux session or when a simple background Bash call is enough.
Security analysis
CautionThe skill uses tmux for legitimate process management and inter-pane communication. While it can send commands to other panes, including other AI agents, it does not instruct destructive actions, exfiltration, or obfuscation. The main risk is unintended command injection into other terminal sessions, which warrants caution rather than a safe rating.
- •Uses Bash to execute tmux commands that can send arbitrary keystrokes to other panes, potentially affecting other agents or processes.
- •Instructs writing multi-line content to /tmp files and loading them into tmux buffers, which is a legitimate but powerful mechanism for injecting input into terminals.
Examples
Start the Next.js dev server in a detached tmux window called "dev-server" so it keeps running, then show me the last 50 lines of its log.Paste these multi-line refactor instructions into the tmux pane running the other Claude instance using load-buffer and paste-buffer, then press Enter.Look at the output of the "test-watcher" tmux window, and if the tests are passing, send Ctrl+C and kill that window.name: tmux description: Manage concurrent processes using tmux. Use when running servers, long tasks, or orchestrating multiple agents in separate panes. Essential for sending multi-line text or instructions to other tmux panes safely. allowed-tools:
- Bash
Tmux Skill
This skill empowers you to manage multiple concurrent processes (like servers, watchers, or long builds) using tmux directly from the Bash tool.
Since you are likely already running inside a tmux session, you can spawn new windows or panes to handle these tasks without blocking your main communication channel.
1. Verify Environment & Check Status
First, verify you are running inside tmux:
echo $TMUX
If this returns empty, you are not running inside tmux and these commands will not work as expected.
Once verified, check your current windows:
tmux list-windows
2. Spawn a Background Process
To run a command (e.g., a dev server) in a way that persists and can be inspected:
-
Create a new detached window with a specific name. This keeps it isolated and easy to reference.
tmux new-window -n "server-log" -d(Replace "server-log" with a relevant name for your task)
-
Send the command to that window.
tmux send-keys -t "server-log" "npm start" C-m(
C-msimulates the Enter key)
3. Sending Text to Panes
Warning: send-keys interprets control sequences. Multi-line text or text with special characters can trigger tmux modes (like C-r for search). Use the right method:
| Content Type | Method |
|--------------|--------|
| Simple shell command | send-keys "cmd" C-m |
| Single line, may have special chars | send-keys -l "text" then send-keys C-m |
| Multi-line text or instructions | load-buffer + paste-buffer |
Literal mode (-l flag) prevents interpreting escape sequences:
tmux send-keys -l -t "target" "text with C-r and other chars"
tmux send-keys -t "target" C-m
Multi-line content — always use load-buffer:
cat > /tmp/msg.txt << 'EOF'
Your multi-line content here.
Can include any characters safely.
EOF
tmux load-buffer /tmp/msg.txt && tmux paste-buffer -t "target"
tmux send-keys -t "target" C-m
4. Interacting with Other Agents
When sending instructions to another Claude instance running in a tmux pane:
cat > /tmp/instructions.txt << 'EOF'
Fix the authentication bug in src/auth.ts:
1. The token validation is missing null checks
2. Add proper error handling for expired tokens
EOF
tmux load-buffer /tmp/instructions.txt && tmux paste-buffer -t %31
tmux send-keys -t %31 C-m
Never use send-keys directly for prompts or instructions — the text will likely contain characters that trigger tmux modes.
5. Inspect Output (Read Logs)
You can read the output of that pane at any time without switching your context.
Get the current visible screen:
tmux capture-pane -p -t "server-log"
Get the entire history (scrollback):
tmux capture-pane -p -S - -t "server-log"
Use this if the output might have scrolled off the screen.
6. Interact with the Process
If you need to stop or restart the process:
Send Ctrl+C (Interrupt):
tmux send-keys -t "server-log" C-c
Kill the window (Clean up):
tmux kill-window -t "server-log"
7. Advanced: Chaining Commands
You can chain multiple tmux commands in a single invocation using ';' (note the quotes to avoid interpretation by the shell). This is faster and cleaner than running multiple tmux commands.
Example: Create window and start process in one go:
tmux new-window -n "server-log" -d ';' send-keys -t "server-log" "npm start" C-m
Quick Reference
| Task | Command |
|------|---------|
| Create window | tmux new-window -n "ID" -d |
| Run command | tmux send-keys -t "ID" "cmd" C-m |
| Send literal text | tmux send-keys -l -t "ID" "text" |
| Send multi-line | tmux load-buffer file && tmux paste-buffer -t "ID" |
| Read output | tmux capture-pane -p -t "ID" |
| Interrupt | tmux send-keys -t "ID" C-c |
| Kill window | tmux kill-window -t "ID" |
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/concurrent-process-management-with-tmux-mmlj2ny1/download' --output '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md.part' && mv '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md.part' '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Quick Reference
| Task | Command |
|---|---|
| Create window | tmux new-window -n "ID" -d |
| Run command | tmux send-keys -t "ID" "cmd" C-m |
| Send literal text | tmux send-keys -l -t "ID" "text" |
| Send multi-line | tmux load-buffer file && tmux paste-buffer -t "ID" |
| Read output | tmux capture-pane -p -t "ID" |
| Interrupt | tmux send-keys -t "ID" C-c |
| Kill window | tmux kill-window -t "ID" |
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.claude/skills/tmux'Cursor
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.cursor/skills/tmux'Codex
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.agents/skills/tmux'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1'openskills read 'concurrent-process-management-with-tmux-mmlj2ny1'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.