home / skills / pchalasani / claude-code-tools / tmux-cli
This skill helps you coordinate and automate tasks across tmux panes using the tmux-cli tool, enabling seamless cross-pane communication.
npx playbooks add skill pchalasani/claude-code-tools --skill tmux-cliReview the files below or copy the command above to add this skill to your agents.
---
name: tmux-cli
description: CLI utility to communicate with other CLI Agents or Scripts in other tmux panes; use it only when user asks you to communicate with other CLI Agents or Scripts in other tmux panes.
---
# tmux-cli
## Instructions
Use the `tmux-cli` command to communicate with other CLI Agents or Scripts in
other tmux panes. Do `tmux-cli --help` to see how to use it!
This command depends on installing the `claude-code-tools`. If you get an error
indicating that the command is not available, ask the user to install it using:
`uv tool install claude-code-tools`.
## Key Commands
### Execute with Exit Code Detection
Use `tmux-cli execute` when you need to know if a shell command succeeded or
failed:
```bash
tmux-cli execute "make test" --pane=2
# Returns JSON: {"output": "...", "exit_code": 0}
tmux-cli execute "npm install" --pane=ops:1.3 --timeout=60
# Returns exit_code=0 on success, non-zero on failure, -1 on timeout
```
This is useful for:
- Running builds and knowing if they passed
- Running tests and detecting pass/fail
- Multi-step automation that should abort on failure
**Note**: `execute` is for shell commands only, not for agent-to-agent chat.
For communicating with another Claude Code instance, use `send` + `wait_idle` +
`capture` instead.
This skill provides a CLI utility to communicate with other CLI agents or scripts running in different tmux panes. It exposes commands to execute shell commands remotely and to coordinate with other agent instances for messaging and output capture. Use it only when you need direct pane-to-pane interaction inside tmux.
The tool issues commands into specified tmux panes and returns structured results such as captured output and exit codes. For shell commands use the execute command, which returns JSON with output and exit_code and supports timeouts. For agent-to-agent messaging, use a sequence of send, wait_idle, and capture to deliver messages and retrieve responses.
What does tmux-cli execute return?
It returns JSON with the captured output and an exit_code (0 for success, nonzero for failure, -1 on timeout).
What if the tmux-cli command is not available?
Install the runtime tools required by the environment (for example, the claude-code-tools package via your environment's tool installer) and retry.