smux
Control tmux panes and communicate between AI agents. Use this skill whenever the user mentions tmux panes, cross-pane communication, sending messages to other agents, reading other panes, managing tmux sessions, or interacting with processes running in tmux. Includes tmux-bridge CLI for agent-to-agent messaging and raw tmux commands for direct session control.
Security Assessment
About smux
The smux skill provides advanced control over tmux panes and facilitates communication between AI agents within a tmux environment. It is designed to streamline interactions in multi-pane setups, allowing users to manage tmux sessions, send messages between agents, read pane contents, and control processes directly. By using smux, users can automate inter-agent communication without relying on manual polling or repeated checks, ensuring more efficient workflow coordination and reducing the risk of command errors when managing complex terminal sessions.
At its core, smux offers a dual approach: high-level agent-to-agent communication via the tmux-bridge CLI and low-level session control through raw tmux commands. tmux-bridge enforces a read-before-act mechanism, ensuring every interaction follows a read → act → read cycle. This CLI supports atomic operations such as typing text, sending special keys, reading pane content, labeling panes, and resolving targets. It simplifies cross-pane messaging, automatically appending sender information and directing replies into the initiating pane, thereby eliminating the need for manual polling or verification loops. Raw tmux commands remain available for users who require direct manipulation of tmux sessions or need to interact with non-agent panes.
Typical use cases for smux include collaborative agent workflows, automated code reviews, multi-agent task orchestration, and session management in development environments. Target users are developers, DevOps engineers, and AI practitioners who leverage tmux for multi-pane terminal setups and need reliable, automated communication between agents. By integrating smux into their workflow, these users can maintain efficient pane control, ensure message integrity, and improve productivity when coordinating multiple agents or processes across tmux sessions.
FAQ
How do I send a message to another agent pane using smux?
Use tmux-bridge to send messages by first reading the target pane to satisfy the read guard, then use the 'message' command to type your text with sender information, and finally use 'keys' to submit it. Avoid polling the pane for replies, as responses appear directly in your pane.
Which operating systems are supported by smux?
smux is compatible with macOS (darwin) and Linux systems. It requires tmux and tmux-bridge to be installed on the host machine.
Can I interact with non-agent panes?
Yes, smux allows interaction with non-agent panes such as plain shells or running processes. The read-before-act cycle still applies to ensure that typed text or commands are correctly sent and verified.
What targets can I use with tmux-bridge?
Targets can be tmux native identifiers such as 'session:window.pane', pane IDs like '%3', window indices, or custom labels assigned via 'tmux-bridge name'. Labels are automatically resolved to their corresponding panes.
Are there any limitations I should be aware of?
All interactions require following the read → act → read cycle enforced by tmux-bridge. Attempting to type or send keys without reading the pane first will result in an error. Additionally, smux assumes that replies from agent panes appear directly in your own pane; it does not support active polling of target panes for responses.
Install smux
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
shawnpana/smux