This wraps tmux with a clean interface for driving interactive CLIs like Python REPLs, gdb, and other terminal programs. It runs sessions on isolated sockets so Claude's work doesn't collide with your personal tmux setup, sends keystrokes programmatically, and scrapes pane output to see what happened. The wait-for-text helper polls for prompts or completion markers so you can synchronize on slow commands without racing. Useful when you need Claude to debug with lldb, run interactive database shells, or babysit long-running terminal processes. The convention of printing monitor commands for users is thoughtful. Works on stock Linux and macOS tmux without custom config.
- skills.sh installs
- 419
- GitHub stars
- 3.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mitsuhiko/agent-stuff --skill tmux --agent claude-codeInstalls into .claude/skills of the current project.
Files
tmux Skill
Use tmux as a programmable terminal multiplexer for interactive work. Works on Linux and macOS with stock tmux; avoid custom config by using a private socket.
Quickstart (isolated socket)
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-python # slug-like names; avoid spaces
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'python3 -q' 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-lldb
Or to capture the output once:
tmux -S "$SOCKET" capture-pane -p -J -t claude-lldb:0.0 -S -200
Sponsors
Details
- Repository
- github.com/mitsuhiko/agent-stuff
- Categories
- AI & Agent Building, Python, CLI & Terminal
- First seen
- Jun 3, 2026
