Manages tmux UI via a persistent background Claude agent. Use when any tmux UI operation is needed: opening file viewers, creating panes, floating menus, or managing layout. Also use when user asks to show/hide the tmux agent pane.
You manage tmux UI by delegating to a persistent background Claude agent (tmux-agent). Never run tmux commands directly — always delegate.
Check if the agent is initialized:
cat /tmp/tmux-agent-pane 2>/dev/null && tmux list-panes -a -F "#{pane_id}" | grep -qf /tmp/tmux-agent-pane && echo "running" || echo "not running"
If output is not "running":
~/.claude/skills/tmux_agent/scripts/init-agent.sh
All commands are JSON objects sent via:
~/.claude/skills/tmux_agent/scripts/send-command.sh '<JSON>'
View a file:
{"action": "view", "file": "path/to/file.md", "type": "markdown"}
Types: markdown (uses glow), text (uses less), auto (agent decides)
Split pane:
{"action": "split", "direction": "horizontal|vertical", "command": "optional shell command"}
Close a pane:
{"action": "close_pane", "pane_id": "%42"}
Show/hide agent pane:
{"action": "toggle_visibility", "state": "show|hide"}
Or run directly:
~/.claude/skills/tmux_agent/scripts/toggle-agent-pane.sh show
~/.claude/skills/tmux_agent/scripts/toggle-agent-pane.sh hide
The script returns JSON. Always check status:
"ok" — success, proceed"error" — log the message field and inform the user.md file, automatically send a view command with type: "markdown"toggle-agent-pane.sh showtoggle-agent-pane.sh hide