Skip to content
Back to skills

Tmux

ASecurity

Run long-lived commands in detached tmux sessions; send keys; scrape pane output.

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 14, 2026
ai-agentsrustshell

Works with

  • cli

Security analysis

A100/100

Scanned June 14, 2026

npx -y skills add lordmacu/nexo-rs --skill tmux --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tmux?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tmux
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lordmacu-tmux/badge)](https://www.skillsdirectory.com/skills/lordmacu-tmux)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tmux
description: Run long-lived commands in detached tmux sessions; send keys; scrape pane output.
requires:
  bins: [tmux]
  env: []
---

# tmux

Use this skill when a command would block the agent loop: dev servers,
builds, watchers, SSH sessions, interactive tools. The agent creates a
detached session, feeds it keystrokes over time, and reads back
whatever is visible in the pane.

## Use when

- "Start the build in background and tell me when it's done"
- "Run the dev server and check for errors every 30s" (pair with heartbeat)
- "Tail this log" (periodic `capture_pane`)
- Interactive CLIs that need stdin (migrations, wizards)

## Do not use when

- A one-shot command — use a normal shell tool if you add one
- You need PTY reattach / interactive human control
- Running untrusted code — the session inherits the agent's own shell env

## Tools

### `status`
Returns bin path and socket location. Useful to confirm the extension is alive.

### `new_session { name, command? }`
Creates detached session. Names are `[A-Za-z0-9_-]{1,64}` — anything else
returns `-32602`. Initial command is optional.

### `send_keys { session, keys, enter? }`
Sends literal `keys`. `enter` defaults true (appends Enter). Useful for
feeding password prompts, REPL input, etc.

### `capture_pane { session, lines? }`
Reads the last N lines of the active pane (1..2000, default 200).
Returns one big string under `output`.

### `list_sessions`
Returns `[{name, created_unix, windows}, ...]`. Empty when the server
isn't running (not an error).

### `kill_session { session }`
Terminates the session. Idempotent-ish: calling twice errors on the second.

## Execution guidance

- Use short session names (`build`, `watch-42`) — makes operator
  inspection clean (`tmux -S <sock> attach -t build`).
- After `send_keys`, wait at least 200–500ms before `capture_pane` so the
  pane buffer has the response.
- `capture_pane` gives you *visible* text — ANSI escapes included. If the
  user only wants "did the build succeed?", grep for strings rather than
  dumping the whole buffer into the prompt.
- Kill old sessions explicitly: tmux doesn't auto-reap.
- The socket lives at `$TMUX_REMOTE_SOCKET` (default `/tmp/agent-rs-tmux.sock`);
  operator can tail with `tmux -S /tmp/agent-rs-tmux.sock ls`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.