Agent skill

Tmux

by nicknisi in nicknisi/claude-plugins

Read and drive other tmux panes when Claude runs inside tmux.

MITAuto-check passedTesting & QA

Install Tmux

skills CLI
$ npx skills add nicknisi/claude-plugins --skill tmux -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nicknisi/claude-plugins tmux --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nicknisi/claude-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/tmux/skills/tmux .claude/skills/tmux && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tmux
GitHub stars
114
Token cost
~3.1k tokens
SKILL.md length
1,468 words
Files
7 (incl. scripts)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Read and drive other tmux panes when Claude runs inside tmux.

  • The user points at something running in another pane/split/window — their dev server
  • SKILL.md covers Mode A — observe & control the…, Writing into the user's panes, Quickstart (isolated socket) and Socket convention, plus 9 more sections
  • Runs Shell scripts from its folder; calls node, tsx and vitest
  • Another shell — e.g

What it does

Tmux is an agent skill from nicknisi/claude-plugins. Read and drive other tmux panes when Claude runs inside tmux. Use whenever the user points at something running in another pane/split/window — their dev server, test watcher, build, logs, REPL, or another shell — e.g. "errors in my dev server", "read/tail my other pane", "is my server up and on what port", "run this in my other split", "restart the watcher". Also for driving interactive/long-running CLIs (Node REPL, vite/next dev, vitest, node inspect) and spawning isolated background tmux sessions.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts (for example `scripts/find-panes.sh`, `scripts/find-sessions.sh` and `scripts/run-in-pane.sh`).

It sits in Testing & QA, covering Unit testing. It works with tmux and Vitest. The repository describes itself as: Nick's own marketplace of Claude Plugins. The licence is MIT.

When your agent uses it

  • The user points at something running in another pane/split/window — their dev server
  • Another shell — e.g

Example prompts

  • “errors in my dev server”
  • “read/tail my other pane”
  • “is my server up and on what port”
  • “/tmux”

Requirements

  • Node.js
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 6a6decd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • tsx
    • vitest
    • tsc
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tmux loads about 3.1k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 1,468 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nicknisi/claude-plugins at commit 6a6decd, republished under its MIT licence (© nicknisi). 1,468 words, ~3,109 tokens.

Download SKILL.mdSave it as .claude/skills/tmux/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
tmux
description
Read and drive other tmux panes when Claude runs inside tmux. Use whenever the user points at something running in another pane/split/window — their dev server, test watcher, build, logs, REPL, or another shell — e.g. "errors in my dev server", "read/tail my other pane", "is my server up and on what port", "run this in my other split", "restart the watcher". Also for driving interactive/long-running CLIs (Node REPL, vite/next dev, vitest, node inspect) and spawning isolated background tmux sessions.
license
Vibecoded

tmux Skill

Use tmux as a programmable terminal multiplexer — both to drive the panes the user is already watching (their dev server, test watcher, REPL, logs) and to run your own isolated sessions. Works on Linux and macOS with stock tmux.

If you were launched from inside tmux, a SessionStart hook will already have told you so and listed the visible panes — which means Mode A below is available. When in doubt, prefer acting on the surfaces the user can actually see; that's usually what they mean.

Mode A — observe & control the user's tmux

This is the high-value mode when you're running inside the user's tmux: you can read and drive the same panes they're looking at, instead of spinning up a sandbox they can't see.

Confirm you're inside their tmux and find the server ($TMUX is socket,pid,session; the socket is the first field):

bash
[ -n "$TMUX" ] && echo "in tmux — socket=${TMUX%%,*} pane=$TMUX_PANE"

Plain tmux ... already targets that server; tmux -S "${TMUX%%,*}" ... is the explicit form. The user usually works one window per project, so the panes sharing your window are the relevant ones. The bundled scripts cover the common operations — prefer them over hand-rolling:

bash
./scripts/find-panes.sh -p                    # panes in YOUR window + listening ports
./scripts/find-panes.sh --session -p          # widen to the whole session

Never assume :0.0. The user's tmux may set base-index 1 / pane-base-index 1, so targets can be 1-based. Always use the exact session:win.pane reported by find-panes.sh (or the SessionStart hook, or $TMUX_PANE for your own pane).

Read a pane's output — safe, do it freely:

bash
tmux capture-pane -p -J -t projects:1.2 -S -200   # scrape a dev server's recent log

Run a one-off in the user's shell pane and get just its output back (waits for completion, prompt-agnostic, exits with the command's code):

bash
./scripts/run-in-pane.sh -t projects:1.3 -- pnpm vitest run src/auth

Send keystrokes into a pane through the guard, which refuses editors/pagers (read the safety rules below first):

bash
./scripts/safe-send.sh -t projects:1.2 --enter -- 'rs'   # type 'rs' + Enter (e.g. nodemon restart)
./scripts/safe-send.sh -t projects:1.2 --keys  -- C-c    # control keys

Writing into the user's panes

Reading with capture-pane never disturbs anything — reach for it first and often. send-keys is different: the keystrokes land in whatever currently has focus in that pane, so a careless send can corrupt the user's editor or kill a process they care about. Before any send-keys into a pane you didn't create:

  • Check what's running first (the [command] from the list above). Don't send keystrokes into an editor (nvim, vim, emacs), a pager (less, man), or any stateful interactive program unless the user explicitly asked you to drive it.
  • Prefer your own surface for new work. To run something long-lived, open a window the user can watch rather than hijacking a pane: tmux new-window -n claude-task (or a fresh session), then drive that. They still see it; you don't clobber their work.
  • Send deliberately. Use -l for literal text; send control keys (C-c, Enter) as separate calls. Then capture-pane to confirm the effect before moving on.
  • Say what you touched. Tell the user which pane you sent to and give them a capture-pane/attach command to verify.
  • Confirm destructive sends. Interrupting a server they're running, or sending input that changes state, deserves a heads-up first unless they've already told you to go ahead.

safe-send.sh enforces the editor/pager check for you, and run-in-pane.sh is the safe way to run a one-off in a shell pane and capture its output — prefer them over raw send-keys.


The rest of this skill is Mode B — spinning up your own isolated sessions on a private socket, kept cleanly separate from the user's tmux. Use it for throwaway processes the user doesn't need to watch.

Quickstart (isolated socket)

bash
SOCKET_DIR=${TMPDIR:-/tmp}/claude-tmux-sockets  # well-known dir for all agent sockets
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/claude.sock"                # keep agent sessions separate from your personal tmux
SESSION=claude-node                             # slug-like names; avoid spaces
tmux -S "$SOCKET" -f /dev/null new -d -s "$SESSION" -n shell  # -f /dev/null = stock config, so :0.0 indexing is predictable
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'node' Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200  # watch output
tmux -S "$SOCKET" kill-session -t "$SESSION"                   # clean up

After starting a session ALWAYS tell the user how to monitor the session by giving them a command to copy paste:

To monitor this session yourself:
  tmux -S "$SOCKET" attach -t claude-node

Or to capture the output once:
  tmux -S "$SOCKET" capture-pane -p -J -t claude-node:0.0 -S -200

This must ALWAYS be printed right after a session was started and once again at the end of the tool loop. But the earlier you send it, the happier the user will be.

Socket convention

  • Agents MUST place tmux sockets under CLAUDE_TMUX_SOCKET_DIR (defaults to ${TMPDIR:-/tmp}/claude-tmux-sockets) and use tmux -S "$SOCKET" so we can enumerate/clean them. Create the dir first: mkdir -p "$CLAUDE_TMUX_SOCKET_DIR".
  • Default socket path to use unless you must isolate further: SOCKET="$CLAUDE_TMUX_SOCKET_DIR/claude.sock".

Targeting panes and naming

  • Target format: {session}:{window}.{pane}. With the stock config from -f /dev/null (above) indices are 0-based, so :0.0 is the first pane. On the user's own server (Mode A) indices may be 1-based — discover them with find-panes.sh, never assume. Keep session names short (e.g., claude-node, claude-vitest).
  • Use -S "$SOCKET" consistently to stay on the private socket path.
  • Inspect: tmux -S "$SOCKET" list-sessions, ./scripts/find-panes.sh -S "$SOCKET" -A.

Finding sessions

  • List sessions on your active socket with metadata: ./scripts/find-sessions.sh -S "$SOCKET"; add -q partial-name to filter.
  • List panes with command, cwd, and ports: ./scripts/find-panes.sh -S "$SOCKET" -A -p.
  • Scan all sockets under the shared directory: ./scripts/find-sessions.sh --all (uses CLAUDE_TMUX_SOCKET_DIR or ${TMPDIR:-/tmp}/claude-tmux-sockets).

Sending input safely

  • Prefer literal sends to avoid shell splitting: tmux -S "$SOCKET" send-keys -t target -l -- "$cmd"
  • When composing inline commands, use single quotes or ANSI C quoting to avoid expansion: tmux ... send-keys -t target -- $'npx serve -l 8000'.
  • To send control keys: tmux ... send-keys -t target C-c, C-d, C-z, Escape, etc.

Watching output

  • Capture recent history (joined lines to avoid wrapping artifacts): tmux -S "$SOCKET" capture-pane -p -J -t target -S -200.
  • For continuous monitoring, poll with the helper script (below) instead of tmux wait-for (which does not watch pane output).
  • You can also temporarily attach to observe: tmux -S "$SOCKET" attach -t "$SESSION"; detach with Ctrl+b d.
  • When giving instructions to a user, explicitly print a copy/paste monitor command alongside the action don't assume they remembered the command.
Show full SKILL.md (628 more words)Show less

Spawning Processes

Some special rules for processes:

  • When asked to debug Node/TypeScript, reach for node inspect (or node --inspect-brk + a client) by default. It's a line-oriented CLI debugger, so it drives cleanly over send-keys. Reserve lldb/gdb for native or compiled binaries.
  • Screen-repainting tools — dev servers and watchers like vite, next dev, vitest, tsx watch — render into the alternate screen buffer and repaint with ANSI escapes. That corrupts send-keys input and leaves capture-pane scrollback noisy or empty. Quiet them down so the pane is scrapeable: export CI=1 (makes vitest run once instead of watching, and drops most spinners/animations) and NO_COLOR=1 (or FORCE_COLOR=0) to strip color codes. When you only need a tool's output, prefer its one-shot mode (vitest run, tsc --noEmit) over its watch mode.

Synchronizing / waiting for prompts

  • To just run a command and capture its output, run-in-pane.sh does the send/wait/capture in one step — reach for it first.
  • To wait for a specific signal yourself, poll with wait-for-text.sh instead of guessing at sleeps:
    bash
    ./scripts/wait-for-text.sh -t "$SESSION":0.0 -p '^> ' -T 15                    # Node REPL ready
    ./scripts/wait-for-text.sh -t web:1.2 -p 'Local:' -e 'EADDRINUSE|Error' -T 30  # dev server up, or fail fast
    ./scripts/wait-for-text.sh -t build:0.0 --idle 3 -T 120                        # wait for a noisy build to go quiet
  • Good ready/completion signals: "Local:" / "ready in" (Vite/Next), "waiting for file changes" (watcher), a test summary like "Tests ", or --idle when there's no reliable string.

Interactive tool recipes

  • Node REPL: tmux ... send-keys -- 'node' Enter; wait for ^> ; send code with -l; for multi-line input enter .editor, send the block, then C-d to run it; interrupt a hung evaluation with C-c; exit with .exit or two C-c. Use tsx instead of node when you need a TypeScript-aware REPL.
  • node inspect (the gdb analog): tmux ... send-keys -- 'node inspect ./dist/app.js' Enter (or node inspect $(npx --no-install which tsx) ./src/app.ts); wait for debug> ; drive with cont/c, next/n, step/s, out/o, and repl to inspect state; set breakpoints with setBreakpoint('file.js', 42) or a debugger; statement; pause a running program with C-c; quit via .exit.
  • Dev servers & watchers (vite, next dev, tsx watch, vitest): start the process, poll for its ready line (see above), then read the visible pane rather than deep scrollback — these repaint, so capture-pane without -S is usually cleaner. Remember CI=1/NO_COLOR=1 to tame the output.
  • Other TTY apps (psql, redis-cli, prisma studio CLI prompts, bash): same pattern—start the program, poll for its prompt, then send literal text and Enter.

Cleanup

  • Kill a session when done: tmux -S "$SOCKET" kill-session -t "$SESSION".
  • Kill all sessions on a socket: tmux -S "$SOCKET" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S "$SOCKET" kill-session -t.
  • Remove everything on the private socket: tmux -S "$SOCKET" kill-server.

Bundled scripts

All live in ./scripts/, work on Linux/macOS (bash + tmux + grep; find-panes -p also needs lsof/pgrep), and take -S <socket> to target a private socket (omit to use $TMUX/default). Run any with -h for full options.

  • find-panes.sh — list panes with location, command, cwd, and (with -p) listening ports. Defaults to your current window; --session / -A widen the scope. Answers "which pane is my :3000 server?"
  • run-in-pane.sh — -t target -- <cmd>: send a command to a shell pane, wait for it to finish (prompt-agnostic sentinel), print only that command's output, and exit with its exit code. Refuses non-shell panes unless --force.
  • wait-for-text.sh — poll a pane until a condition is met: -p success regex (exit 0, prints the match), -e error regex (exit 3, fail fast), and/or --idle N (exit 0 once output is quiet for N seconds). -T overall timeout (exit 1); -F for fixed strings.
  • safe-send.sh — guarded send-keys: refuses editors/pagers/TUIs (where keystrokes aren't commands) unless --force. --enter appends Enter to literal text; --keys sends key names (C-c, Escape). REPLs and shells are allowed.
  • find-sessions.sh — list sessions on a socket, or --all to scan every socket under CLAUDE_TMUX_SOCKET_DIR (Mode B discovery/cleanup).

© nicknisi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts) in plugins/tmux/skills/tmux of nicknisi/claude-plugins.

  • SKILL.md
  • scripts/find-panes.sh
  • scripts/find-sessions.sh
  • scripts/run-in-pane.sh
  • scripts/safe-send.sh
  • scripts/test-scripts.sh
  • scripts/wait-for-text.sh

Open the folder on GitHubat commit 6a6decd

Compare with similar skills

Tmux next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tmux compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tmux this skillnicknisi/claude-plugins114—~3.1kAutomated safety check: PassMIT
Test Writing WorkflowiOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Vitestsupabase/supabase111k12 repos~1.1kAutomated safety check: PassApache-2.0
Test GuardamElnagdy/guard-skills1.3k2 repos~2.1kAutomated safety check: PassMIT
Adding LLM MCP ToolsTriliumNext/Trilium38k—~2.5kAutomated safety check: PassAGPL-3.0
Concept Page Test Writerleonardomso/33-js-concepts67k—~5.5kAutomated safety check: PassMIT

Similar skills

  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Vitest

    supabase/supabase

    Official

    Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering.

    111k GitHub starsUsed in 12 repos~1.1k tokens
    Testing & QAAuto-check passed
  • Test Guard

    amElnagdy/guard-skills

    Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.

    1.3k GitHub starsUsed in 2 repos~2.1k tokens
    Testing & QAAuto-check passed
  • Adding LLM MCP Tools

    TriliumNext/Trilium

    A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…

    38k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Concept Page Test Writer

    leonardomso/33-js-concepts

    Generates Vitest tests for every runnable code example on a JavaScript concept documentation page, following a four-phase extraction and conversion process.

    67k GitHub stars~5.5k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Archestra Dev Testing

    archestra-ai/archestra

    A skill your agent uses for test selection and quality across backend, frontend, and e2e; load its backend reference for Vitest projects, mocking, DB fixtures, and performance.

    4.4k GitHub stars~3.2k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from nicknisi/claude-plugins

All 12 skills in this repo
  • Blog Post Writer

    nicknisi/claude-plugins

    Turn Nick Nisi's raw material into a blog post draft in his voice.

    114 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Image Gen

    nicknisi/claude-plugins

    Generate or edit images via Google Gemini (nano-banana-pro) or OpenAI gpt-image-2.

    114 GitHub stars~502 tokensUpdated 2 mo ago
    Auto-check passed
  • Prototype

    nicknisi/claude-plugins

    Build a throwaway prototype to answer a design question before committing to real implementation.

    114 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Squad Review

    nicknisi/claude-plugins

    Review the current branch with six specialist lenses (security, correctness, conventions, tests, architecture, duplication), then put every finding through an adversarial verifier that tries to…

    114 GitHub stars~751 tokensUpdated 2 mo ago
    Auto-check passed
  • Youtube Notes

    nicknisi/claude-plugins

    Pull captions from a YouTube video and turn them into chapter-aligned notes where every claim carries a clickable timestamp.

    114 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Conference Talk Builder

    nicknisi/claude-plugins

    Create conference talk outlines and slide-by-slide content plans using narrative frameworks.

    114 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Tmux

What does Tmux do?

Read and drive other tmux panes when Claude runs inside tmux. Tmux is an agent skill from nicknisi/claude-plugins. Read and drive other tmux panes when Claude runs inside tmux.

When should I use Tmux?

Tmux fits situations like: the user points at something running in another pane/split/window — their dev server; another shell — e.g.

How do I install Tmux in Claude Code?

Run `npx skills add nicknisi/claude-plugins --skill tmux -a claude-code`. Or copy the skill folder (plugins/tmux/skills/tmux in nicknisi/claude-plugins) into .claude/skills/tmux in your project. Claude Code loads it when a task matches its description.

How do I install Tmux in Codex?

Run `npx skills add nicknisi/claude-plugins --skill tmux -a codex`. Or copy the skill folder (plugins/tmux/skills/tmux in nicknisi/claude-plugins) into .agents/skills/tmux in your project. Codex loads it when a task matches its description.

Can I use Tmux in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nicknisi/claude-plugins --skill tmux -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tmux, .gemini/skills/tmux, .github/skills/tmux and .opencode/skills/tmux in your project.

What does Tmux need to run?

Going by SKILL.md and its folder, Tmux needs a shell for the scripts in its folder and the command-line tools its instructions call (node, tsx, vitest, tsc and npx). Our summary lists: Node.js; A Bash shell.

Does Tmux access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Tmux safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Tmux use?

Tmux is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tmux use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tmux?

Skills that share tags, products or a category with Tmux: Test Writing Workflow (iOfficeAI/AionUi, 33k stars), Vitest (supabase/supabase, 111k stars), Test Guard (amElnagdy/guard-skills, 1.3k stars) and Adding LLM MCP Tools (TriliumNext/Trilium, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tmux?

nicknisi (a GitHub user) maintains it in nicknisi/claude-plugins, which has 114 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 11, 2026.

Source: nicknisi/claude-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.