Agent skill · luongnv89
tmux-agent-comms
Manage AI agents in tmux: spawn sessions, send messages, wait, capture replies, inspect fleets, and tear down safely. Use for tmux-hosted CLI agents. Don't use for SSH, GNU screen, or GUI apps.
What it needs
About 7k tokens when loaded.
What this skill does
Tmux Agent Comms Manage CLI agents in separate tmux sessions. Treat each session as one agent; orchestrate it with send-keys and capture-pane. Relay reply deltas instead of whole screens to protect the context/token budget. New sessions open in a terminal tab inside the current app by default. If the environment cannot open one, create the session detached and print the exact attach command. Never invoke attach-session from a non-TTY tool. Use herdr-agent-comms instead when agents live in Herdr. When to Use Route directly to the required mode; do not read unrelated references. Task Start --- --- Spawn an agent Phase 1 Message or steer an existing agent Phase 2 Read a pane, show status, or inspect Phase 5 Broadcast to a fleet Phase 6 Shut down an agent Phase 6 Main agent's own context is filling up Phase 7 HANDOFF Prerequisites 1. Run command -v tmux; stop with installation guidance if it fails. 2. Resolve helper scripts using references/tmux-recipes.md when messaging, waiting, or broadcasting. 3. Confirm the exact session and inspect its pane before writing to it. Critical Rules 1. Confirm destructive actions. Never send exit//quit, kill a session, or kill the server without explicit approval. 2. Fail closed before every send. Only preflight exit 0 is sendable; every other code means do not send. Codes are defined once, in the exit-code table (references/delivery-and-waiting.md). 3. Use a fresh proof cycle. Every message needs a new baseline file and split completion marker. Never reuse either for a follow-up. 4. Send text and Enter separately. For multiline/code-heavy text, use tmux paste-buffer; see references/tmux-recipes.md. 5. Bound waiting. Use a wall-clock cap or at most 2–3 re-waits. Surface a stall instead of polling forever. 6. Keep reads bounded. Start with capture-pane -S -40 and widen only when the reply is truncated. 7. Escalate blocked panes. A trust/auth/permission dialog requires a human; do not type task text into it. 8. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills luongnv89/tmux-agent-comms