tmux-send
Skill0 starsChanged 7 months agoUnlicenseView on GitHub
Use when an agent needs to send a short one-line command, trigger alias, or handoff message to another agent running in a local or remote tmux session, or when installing, validating, or troubleshooting scripts/tmux-send.sh.
In this repository8 other files it gives its agents.
- code-reviewSkill
- issue-checkSkill
- merge-syncSkill
- pr-feedbackSkill
- pr-recheckSkill
- pr-reviewSkill
- review-notifySkill
- spellsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Read the consuming repository's agent docs before dispatching.
- Distinctive: line 43
Use a project-local mapping when present.
- Distinctive: line 57
If no mapping exists, ask the human for the target host/session before sending anything.
- Distinctive: line 67
Use the role and message semantics from the consuming project.
- Distinctive: line 76
Treat any non-zero exit as a dispatch failure.
- Distinctive: line 78
Do not continue as if the peer was notified.
- Distinctive: line 82
Use these only for transport troubleshooting or human observation.
- Distinctive: line 91
Do not kill a session unless it is clearly stale or the project/human asked for cleanup.
- Very specific: line 112
Prefer default verification.
- Very specific: line 126
Never replace the script with bare tmux send-keys for agent dispatch.
- Distinctive: line 130
After copying or editing the script, run:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tmux Send
Overview
Use tmux only as a transport for short, one-line signals between already-running agent sessions. Do not use tmux pane contents as the source of truth for decisions, findings, or status; durable project systems such as PR comments, issues, commits, and logs must hold the actual record.
This skill provides scripts/tmux-send.sh, a safer wrapper around tmux paste/send-keys that verifies the text reaches the target TUI input line before pressing Enter.
This skill assumes the target agent sessions already exist. It borrows only the lightweight tmux operations that are useful for persistent sessions: list sessions, capture recent output for troubleshooting, attach when a human needs to watch live, and kill stale sessions when the project explicitly allows it. It does not introduce a generic agent spawner or model launcher.
Boundary
This skill owns:
- Sending one-line messages to a tmux target.
- Remote dispatch over SSH to a tmux target on another host.
- Installing and validating
tmux-send.sh. - Transport troubleshooting.
This skill does not own:
- Spawning new agent sessions.
- Choosing model providers or local/cloud execution modes.
- The meaning of messages such as
review 12,pr 12, ormerged 12. - PR review rules, issue handling rules, or merge sync rules.
- Reading another agent's conclusions from a tmux pane.
Configuration
Read the consuming repository's agent docs before dispatching. Look for:
- Agent role names and target tmux sessions.
- Hostnames for remote sessions.
- Allowed message names or trigger aliases.
- Fallback commands for status checks.
- Whether tmux transport is allowed for the task.
Use a project-local mapping when present. A typical mapping looks like:
agents:
dev:
host: dev-machine
session: project-dev
review:
host: review-machine
session: project-review
transport:
script: scripts/tmux-send.shIf no mapping exists, ask the human for the target host/session before sending anything.
Dispatch Workflow
Confirm the durable state is already written.
Examples: PR comment submitted, commit pushed, issue created, or review posted. Do not dispatch first and write the durable state later.
Choose the target from the project mapping.
Use the role and message semantics from the consuming project. Do not invent new trigger aliases unless the project explicitly asks for them.
Send exactly one line.
skills/tmux-send/scripts/tmux-send.sh <session> "<message>" skills/tmux-send/scripts/tmux-send.sh --host <host> <session> "<message>"Treat any non-zero exit as a dispatch failure.
Do not continue as if the peer was notified. Inspect the error, run the fallback status command if the project defines one, and report the failed dispatch in the durable project record when it matters.
Session Checks
Use these only for transport troubleshooting or human observation. They are not substitutes for PR comments, issues, commits, or logs.
tmux list-sessions
tmux capture-pane -t <session> -p -S -50
tmux attach -t <session>
tmux kill-session -t <session>Do not kill a session unless it is clearly stale or the project/human asked for cleanup.
Script Contract
scripts/tmux-send.sh accepts:
scripts/tmux-send.sh [--host HOST] [--tmux PATH] [--prompt-regex ERE] [--prompt-regex=ERE] [--no-verify] TARGET TEXTExit codes:
0: sent. With default verification, the text was confirmed submitted.2: usage error.3: text did not fully land in the input line or remained stuck after submit.143: deadline exceeded — the dispatch body (bounded atTMUX_SEND_TIMEOUT, enforced on the remote host for--hostsends so a wedged peer is cancelled there) or the ssh transport (+15s local backstop) was killed by the watchdog. Deterministic: returned whenever a deadline fired, regardless of how the killed tree died.- Other non-zero: propagated from
ssh,tmux, or the shell.
Constraints:
TEXTmust be a non-empty single line, and cannot be whitespace-only.- Prefer default verification. Use
--no-verifyonly for explicit fire-and-forget cases. - The default tmux binary is
tmuxfromPATH, with/opt/homebrew/bin/tmuxas a fallback when present. Use--tmuxfor hosts with a different tmux location. - The default prompt matcher recognizes
>,$,›, and❯. Use--prompt-regexwhen the target TUI uses a different prompt token. Use--prompt-regex=EREwhen the pattern itself starts with--. - The dispatch is hard-bounded: the body self-enforces
TMUX_SEND_TIMEOUT(positive integer seconds, default 45) with TERM → 2s grace → KILL on its own side, and the local caller adds a +15s transport backstop. RaiseTMUX_SEND_TIMEOUTfor very slow links. - For remote dispatch, bootstrap SSH host keys interactively before relying on non-interactive sends.
Troubleshooting
Host key verification failed: SSH to the target host once interactively and accept the host key.tmux target not found: verify the session name and the tmux binary path.- Exit
143: a deadline killed the dispatch. Check that the target host is reachable and its tmux server responds (tmux list-sessions). Before retrying, capture the target pane as with exit3— the timeout may have struck between Enter and the post-verify, so confirm whether the message already submitted; unsubmitted leftover text is cleared by the next dispatch's C-u. - Exit
3: capture the target pane and check whether the TUI prompt is blocked, not focused, or needs a project-specific--prompt-regex. - Text appears typed but not submitted: rerun without
--no-verify, then inspect the pane.
Never replace the script with bare tmux send-keys for agent dispatch. Bare sends can race agent TUIs and silently submit partial or stale text.
Validation
After copying or editing the script, run:
skills/tmux-send/scripts/tmux-send.sh --help
skills/tmux-send/scripts/tests/test-tmux-send.shThe smoke tests require local tmux and python3.
Does 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.

