tmux

A tool for controlling tmux, a terminal program that keeps command-line sessions running and split into panes. It can send keystrokes and read text shown in those panes.

In plain words
What is it for?
Starting and monitoring interactive command-line programs, sending input to them, and reading their terminal output.
Why use it?
It lets an agent work with interactive command-line programs that need a live terminal, while keeping the session available for monitoring.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hkuds/nanobot/tmux
Any agent
npx skills add HKUDS/nanobot --skill tmux
Clone the repo
git clone --depth 1 https://github.com/HKUDS/nanobot

Made for: Claude Code, Codex.

Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01278
Opus 5 $0.00011 $0.00639
Sonnet 5 $0.00004 $0.00256
Haiku 4.5 $0.00002 $0.00128

Measured yesterday against content hash 906a130fb461, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tmux scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/find-sessions.sh, scripts/wait-for-text.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

8 near-identical copies found in the catalogue:

  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
  • tmux — 100% identical, 0 lines differ
nanobot/skills/tmux/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tmux Skill

Use tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.

Quickstart (isolated socket, exec tool)

SOCKET_DIR="${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/nanobot.sock"
SESSION=nanobot-python

tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200

After starting a session, always print monitor commands:

To monitor:
  tmux -S "$SOCKET" attach -t "$SESSION"
  tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200

Socket convention

  • Use NANOBOT_TMUX_SOCKET_DIR environment variable.
  • Default socket path: "$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock".

Targeting panes and naming

  • Target format: session:window.pane (defaults to :0.0).
  • Keep names short; avoid spaces.
  • Inspect: tmux -S "$SOCKET" list-sessions, tmux -S "$SOCKET" list-panes -a.

Finding sessions

  • List sessions on your socket: {baseDir}/scripts/find-sessions.sh -S "$SOCKET".
  • Scan all sockets: {baseDir}/scripts/find-sessions.sh --all (uses NANOBOT_TMUX_SOCKET_DIR).

Sending input safely

  • Prefer literal sends: tmux -S "$SOCKET" send-keys -t target -l -- "$cmd".
  • Control keys: tmux -S "$SOCKET" send-keys -t target C-c.

Watching output

  • Capture recent history: tmux -S "$SOCKET" capture-pane -p -J -t target -S -200.
  • Wait for prompts: {baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'.
  • Attaching is OK; detach with Ctrl+b d.

Spawning processes

  • For python REPLs, set PYTHON_BASIC_REPL=1 (non-basic REPL breaks send-keys flows).

Windows / WSL

  • tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.
  • This skill is gated to darwin/linux and requires tmux on PATH.

Orchestrating Coding Agents (Codex, Claude Code)

Read the full file on GitHub · 122 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 122 lines · 22 tokens per session scan A 906a130fb461

Subscribe to this mod's changes

tmux is a skill published in the GitHub repository HKUDS/nanobot (47,535 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,278 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deliveroo-order

Turn collected lunch orders into a clean per-person order list for a human to place on Deliveroo. Use in step 2 of the lunch run, after orders are collected. The live menu is fetched automatically by the lobu-team-lunch-finalize reaction (via the Owletto Chrome extension) — this skill never places an order or touches…

lobu-ai/lobu · 75 tokens

playwright-uitest

Generate Playwright UI tests and visual smoke reports for delivery POC frontends.

DemonDamon/AgenticX · 21 tokens

actionbook

MUST USE AUTOMATICALLY when user sends URLs from x.com, twitter.com, or any site that webfetch fails on. Do NOT ask the user — just load this skill and use it. Browser automation and web scraping with anti-detection stealth mode. Capabilities: (1) Scrape Twitter/X content without login, (2) Extract data from…

longzhi/clawhive · 134 tokens

resourceful-problem-solving

Always-on guidance for solving tasks resourcefully. Teaches agents to escalate through skills, CLI tools, and custom scripts instead of refusing. Applies to any request where the agent lacks a dedicated tool.

swarmclawai/swarmclaw · 45 tokens

browser

Управление браузером: открытие страниц, взаимодействие, история, закладки.

Rayan55050/progressive-agent · 19 tokens

save-as-pdf

Reformat the current HTML design into a paginated, paper-ready PDF. The "Instant" export already gives the user a PDF at the design's native pixel size — this path is for when they want real pages.

asgeirtj/system_prompts_leaks · 9 tokens