agentleFS
gitt510gitt510/agent-skills/skills/tmux/SKILL.md

tmux

Skill0 starsChanged 3 months agoMITView on GitHub

Control tmux panes for interactive CLIs: capture pane output and send keys/text. Targets the current window by default.

69 other projects use a version of this, 11 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, session-logs and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • seedprodSkill

    session-logs

    Search and analyze your own session logs (older/parent conversations) using jq.

    Also in 20 projects that use this

  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 18 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 7 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 16 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • +5 more from seedprod

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for existing interactive tmux sessions.

    line 24
  2. Very specific:

    Use -l -- for arbitrary literal text.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 64 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tmux

Use for existing interactive tmux sessions. For one-shot commands, use normal shell. For new non-interactive background jobs, use background execution.

Target

Target the window where this session runs — not the session's active window.

A bare relative target like .1 is a trap. tmux fills the omitted window with the session's current (active) window — whatever window the attached client is showing — which is usually NOT the window Claude runs in. $TMUX_PANE only fixes the session, never the window. So .1 silently drifts to another window's pane 1 whenever the user is looking elsewhere.

Anchor to Claude's own pane instead. $TMUX_PANE is set in this session's env; resolve it to a session:window prefix and build an absolute target:

W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}')
# then target panes as "$W.1", "$W.2", ...

Each Bash call is a fresh shell, so set W in the same command block where you use it.

To reach a different window or session on purpose, use an explicit session:window.pane, e.g. shared:0.0.

List the panes in Claude's window:

W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}')
tmux list-panes -t "$W"

See

W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}')
tmux capture-pane -t "$W.1" -p          # current screen
tmux capture-pane -t "$W.1" -p -S -     # full scrollback
tmux capture-pane -t "$W.1" -p | tail -20

-p prints to stdout. -S - includes scrollback (bounded by history-limit). Full-screen apps (vim, less) show only the current screen, not past output.

Send

Send literal text and Enter separately, to avoid paste/newline surprises:

W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}')
tmux send-keys -t "$W.1" -l -- "Please continue"
tmux send-keys -t "$W.1" Enter

Special keys (set W first, as above):

tmux send-keys -t "$W.1" C-c
tmux send-keys -t "$W.1" C-d
tmux send-keys -t "$W.1" Escape

Use -l -- for arbitrary literal text. Approve or select a prompt only after reading it:

W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}')
tmux capture-pane -t "$W.1" -p | tail -20   # read first
tmux send-keys -t "$W.1" -l -- "y"
tmux send-keys -t "$W.1" Enter

Notes

  • Target format is session:window.pane. A bare .pane resolves the omitted window to the session's active window, NOT to $TMUX_PANE's window — so it drifts. Always anchor with W=$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_index}') and target "$W.pane".
  • capture-pane -p prints to stdout. -S - captures full scrollback.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.