tmux-cli
БесплатноБез исполняемых скриптовНе проверенCLI utility to help when running ongoing interactive CLI sessions or using tmux to communicate with other CLI Agents. Use when you are asked to ssh to remote…
от sammcj★ 175 звёзд на GitHubОб этом скилле
tmux-cli
Instructions
- Use the
tmux-clicommand to communicate with other CLI Agents or Scripts in other tmux panes. Dotmux-cli --helpto 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. - When using tmux-cli to connect to remote machines you must run it outside the sandbox (the tmux socket is outside the sandbox's allowed paths, and the pane's
sshneeds the environment's SSH auth). A sandboxedcapturereturns empty. Allow-listtmux-clionce to avoid repeated approval prompts.
- This command depends on installing the
- When you are finished with all tasks that you need tmux-cli for clean up the session.
Remote SSH hosts (default pattern)
When you need to run more than one command on a remote host over SSH, do NOT issue repeated one-off ssh host 'cmd' calls - each re-authenticates and needs its own approval. Open ONE persistent session and drive it. This is the default for any multi-command remote work.
- Reuse an existing session rather than spawning a new one each task (windows accumulate otherwise): check
tmux-cli status/tmux-cli list_panes, reuse its pane if healthy, and onlytmux-cli launch "zsh"if none exists. Note the returned pane id. - Arm auto-cleanup on the pane BEFORE connecting, so nothing lingers if the task is abandoned:
- Idle timeout:
export TMOUT=1800in the launched zsh (self-exits after 30 min idle at a prompt). - Hard cap watchdog (zsh):
( sleep 5400 && tmux kill-session -t remote-cli-session ) &!- kills the whole session after 90 min regardless of activity. tmux-cli's remote session is namedremote-cli-sessionon the default socket, so rawtmuxcan target it.&!backgrounds and disowns so it survives the shell exiting.
- Idle timeout:
- Connect with keepalive so a dropped link tears itself down:
ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no user@host. - After connecting, set the same idle timeout on the remote shell (busybox
ashandbashboth honour it):export TMOUT=1800. - Run work with
send+wait_idle+capture. Only the pane'ssshuses the network / SSH auth; tmux-cli itself only talks to the local tmux socket. - Tear it down explicitly when done:
tmux-cli cleanupkills the managed session;tmux-cli kill --pane=<id>kills a single pane. Do not leave idle sessions behind - the timeouts above are a backstop, not a substitute for cleanup.
Key Commands
Execute with Exit Code Detection
Use tmux-cli execute when you need to know if a shell command succeeded or failed:
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.
Tips
- For communicating with another Claude Code instance, use
send+wait_idle+captureinstead. - To wait for a condition, use Monitor with an until-loop (e.g.
until <check>; do sleep 2; done), to wait for a command you started, userun_in_background: true.
Установить tmux-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tmux-cli?
CLI utility to help when running ongoing interactive CLI sessions or using tmux to communicate with other CLI Agents. Use when you are asked to ssh to remote machines, or need to use interactive CLI tools that require ongoing input.
Как установить скилл tmux-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tmux-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic