agentleFS
jellydnjellydn/my-ai-tools/skills/tmux/SKILL.md

tmux

Skill127 starsChanged 27 days agoMITView on GitHub

Control tmux sessions remotely — send commands, capture output, manage panes

  • Installs packages

69 other projects use a version of this.

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

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

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 2

    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 LogPilot for automatic output capture + AI analysis:

    line 21
  2. Very specific:

    Add to Claude Code: claude mcp add --scope user logpilot -- logpilot mcp-server

    line 35
  3. Distinctive:

    Use isolated sockets to avoid conflicts with personal tmux:

    line 41

“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 Skill

Control tmux sessions programmatically to run interactive terminal applications (REPLs, debuggers, databases) without blocking.


📋 Quickstart (Easy Way)

Use LogPilot for automatic output capture + AI analysis:

# Install LogPilot
cargo install logpilot

# Watch your tmux session
logpilot watch mysession --pane mysession:0.0

# Ask AI about what's happening
logpilot ask "What errors appeared?"
logpilot summarize --last 5m

Add to Claude Code: claude mcp add --scope user logpilot -- logpilot mcp-server


📋 Manual Control (Raw tmux)

Use isolated sockets to avoid conflicts with personal tmux:

# Setup socket
export SOCKET="${TMPDIR:-/tmp}/ai-tmux-sockets/agent.sock"
mkdir -p "$(dirname "$SOCKET")"

# Create session and run
SESSION=agent-py
tmux -S "$SOCKET" new -d -s "$SESSION"
tmux -S "$SOCKET" send-keys -t "$SESSION" 'python3 -q' Enter

# Capture output manually
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION" -S -100

# Cleanup
tmux -S "$SOCKET" kill-session -t "$SESSION"

📋 Core Commands

ActionCommand
New sessiontmux -S "$SOCKET" new -d -s NAME
Send keystmux -S "$SOCKET" send-keys -t NAME 'cmd' Enter
Send literaltmux -S "$SOCKET" send-keys -t NAME -l 'text'
Capture outputtmux -S "$SOCKET" capture-pane -p -J -t NAME -S -N
List sessionstmux -S "$SOCKET" list-sessions
Kill sessiontmux -S "$SOCKET" kill-session -t NAME

Control keys: C-c (SIGINT), C-d (EOF), C-z (suspend), Escape


📋 Interactive Recipes

🔁 Python REPL

SESSION=agent-py
SOCKET="${TMPDIR:-/tmp}/ai-tmux-sockets/agent.sock"
tmux -S "$SOCKET" new -d -s "$SESSION"
tmux -S "$SOCKET" send-keys -t "$SESSION" 'PYTHON_BASIC_REPL=1 python3 -q' Enter
sleep 1
tmux -S "$SOCKET" send-keys -t "$SESSION" -l 'print(2+2)'
tmux -S "$SOCKET" send-keys -t "$SESSION" Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION" -S -10
tmux -S "$SOCKET" kill-session -t "$SESSION"

🔁 GDB Debugger

SESSION=agent-gdb
SOCKET="${TMPDIR:-/tmp}/ai-tmux-sockets/agent.sock"
tmux -S "$SOCKET" new -d -s "$SESSION"
tmux -S "$SOCKET" send-keys -t "$SESSION" 'gdb --quiet ./program' Enter
tmux -S "$SOCKET" send-keys -t "$SESSION" 'set pagination off' Enter
tmux -S "$SOCKET" send-keys -t "$SESSION" 'run' Enter
# ... later ...
tmux -S "$SOCKET" send-keys -t "$SESSION" C-c
tmux -S "$SOCKET" send-keys -t "$SESSION" 'bt' Enter
tmux -S "$SOCKET" send-keys -t "$SESSION" 'quit' Enter 'y' Enter

Node.js / psql / etc.

Same pattern: new → send-keys → capture-pane → kill-session


📋 LogPilot Reference

TaskCommand
Watch sessionlogpilot watch SESSION
Watch panelogpilot watch SESSION --pane TARGET
AI summarylogpilot summarize --last 10m
Ask questionlogpilot ask "Why is it failing?"
With logslogpilot ask "Explain" --include-logs
Statuslogpilot status

MCP Setup

{
	"mcpServers": {
		"logpilot": {
			"command": "logpilot",
			"args": ["mcp-server"]
		}
	}
}

Or: claude mcp add --scope user --transport stdio logpilot -- logpilot mcp-server


🎨 Best Practices

  1. Use LogPilot — easiest way to capture and analyze output
  2. Always use -S "$SOCKET" — prevents conflicts with user tmux
  3. Use -l flag — literal text, no shell expansion issues
  4. PYTHON_BASIC_REPL=1 — required for interactive Python
  5. Kill sessions when done — prevents resource leaks

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.