Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

tmux-cli

/tmux-cli

Obsługuje długotrwałe interaktywne sesje CLI i komunikację z innymi agentami CLI przez tmux, na przykład przy połączeniach ssh ze zdalnymi maszynami.

Repozytorium
agentic-coding ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Obsługuje długotrwałe interaktywne sesje CLI i komunikację z innymi agentami CLI przez tmux, na przykład przy połączeniach ssh ze zdalnymi maszynami.

Oryginalny opis (EN)

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.

Jak działa

  1. Instructions
  2. Remote SSH hosts (default pattern)
  3. Key Commands
  4. Tips
Sekcje z nagłówków SKILL.md, w oryginale · 51 linii, 547 słów
Podgląd SKILL.md
---
name: tmux-cli
description: 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

## 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`.
  - 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 `ssh` needs the environment's SSH auth). A sandboxed `capture` returns empty. Allow-list `tmux-cli` once to avoid repeated approval prompts.
- 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.

1. 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 only `tmux-cli launch "zsh"` if none exists. Note the returned pane id.
2. Arm auto-cleanup on the pane BEFORE connecting, so nothing lingers if the task is abandoned:
   - Idle timeout: `export TMOUT=1800` in 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 named `remote-cli-session` on the default socket, so raw `tmux` can target it. `&!` backgrounds and disowns so it survives the shell exiting.
3. Connect with keepalive so a dropped link tears itself down: `ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no user@host`.
4. After connecting, set the same idle timeout on the remote shell (busybox `ash` and `bash` both honour it): `export TMOUT=1800`.
5. Run work with `send` + `wait_idle` + `capture`. Only the pane's `ssh` uses the network / SSH auth; tmux-cli itself only talks to the local tmux socket.
6. Tear it down explicitly when done: `tmux-cli cleanup` kills 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:

```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.

## Tips

- For communicating with another Claude Code instance, use `send` + `wait_idle` + `capture` instead.
- 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, use `run_in_background: true`.

Wersje

RepozytoriumWynikLicencja
Ta strona · sammcj/agentic-coding100Apache-2.0
pchalasani/claude-code-tools100MIT

Migawka bazy z 13.11.2026 · wersja paczki 0aac12633e73 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95using-tmux-for-interactive-commands
    Steruje interaktywnymi narzędziami CLI, takimi jak vim, git rebase -i czy REPL Pythona, przez odłączone sesje tmux.
  • 100smux
    Steruje panelami tmux i komunikuje się między agentami, czytając inne panele i wysyłając wiadomości.
  • 96tmux
    Steruje sesją tmux i interaktywnym terminalem, gdy zadanie w linii poleceń wymaga stałego okna.
  • 95tmux-cli-test
    Testuje zachowanie interaktywnych interfejsów CLI i TUI w tmux: nawigację klawiaturą, monity i ponowne rysowanie ekranu.
  • 100tmux-automation
    Uruchamia testy aplikacji CLI w izolowanych sesjach tmux lub byobu, wysyła klawisze, przechwytuje wynik i monitoruje przebieg przez ai-monitor.
  • 100workmux
    Zarządza agentami terminalowymi, git worktree i sesjami tmux przez workmux: otwiera agentów w projekcie, sprawdza ich postęp i obsługuje równoległe przepływy agentów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.