tmux Skill
SkillProductivityRemote control tmux sessions for interactive CLIs, background tasks, and services.
Use tmux Skill in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add tmux Skill and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the tmux Skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by dwsy/agent in skills/tmux/SKILL.md and read by ahel’s review.
Core Concepts
Socket: /tmp/pi-tmux-sockets/pi.sock (private, no conflicts with personal tmux)
Session Naming: pi-{category}-{name}-{timestamp}
- Categories:
task(temporary),service(long-running),agent(agent-specific)
Session States: running | idle | exited
Persistence: /tmp/pi-tmux-sessions.json
Auto-cleanup: Inactive sessions > 24h removed (configurable)
CLI Commands
bun ~/.pi/agent/skills/tmux/lib.ts <command>
create <name> <command> [category] # Create session, prints monitoring command
list [filter] # List sessions with status
status <id> # Session details
send <id> <keys> # Send keystrokes (literal mode, safe)
capture <id> [lines] # Capture pane output (default: 200)
kill <id> # Terminate session
cleanup [hours] # Remove old sessions (default: 24h)
attach <id> # Print attach command
sync # Sync session state with tmux
TUI: bun ~/.pi/agent/skills/tmux/tui.ts (visual management, shortcuts: r/n/c/s/a/k/q)
TypeScript API
import { TmuxManager } from "~/.pi/agent/skills/tmux/lib.ts";
const tmux = new TmuxManager({ autoCleanup: false }); // optional config
// Session lifecycle
const session = await tmux.createSession(name, command, category);
await tmux.killSession(session.id);
// Output handling
const output = await tmux.capturePane(target, lines);
const success = await tmux.waitForText(target, pattern, { timeout: 60 });
// State management
const sessions = await tmux.listSessions(filter);
const status = await tmux.getSessionStatus(id);
await tmux.sync();
await tmux.cleanup(hours);
Key Rules
-
Always print monitoring command after session creation:
tmux -S /tmp/pi-tmux-sockets/pi.sock attach -t {session-id} -
Use
sendfor interactive tools (Python REPL, gdb, databases):# Python REPL: always use PYTHON_BASIC_REPL=1 bun ~/.pi/agent/skills/tmux/lib.ts create python "PYTHON_BASIC_REPL=1 python3 -q" task bun ~/.pi/agent/skills/tmux/lib.ts send pi-task-python-* "print('Hello')" -
Category selection:
task: compilation, testing, temporary operationsservice: dev servers, databases, persistent servicesagent: training, data processing, agent-specific tasks
-
Safe key injection:
senduses literal mode (-l), no shell escaping needed -
Session recovery: Run
syncif session not found
Helper Scripts
# Wait for text pattern with timeout
./scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]
# List sessions with metadata
./scripts/find-sessions.sh -S "$SOCKET"
./scripts/find-sessions.sh --all
Requirements
- tmux (Linux/macOS)
- Bun runtime
- Bash (helper scripts)
Signals
- GitHub stars
- 23
- Forks
- 3
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
tmux-dwsy- Source
- github.com/dwsy/agent
Related picks
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythonsetup-ts-deep-modules
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptsocial
Skill · coreyhaines31
More in Productivitygws-calendar
Skill · googleworkspace
More in Productivity