Source: obra/superpowers-lab · Maintainer: community: Jesse Vincent · License: MIT · Checked: 24 October 2026
What is the tmux skill?
using-tmux-for-interactive-commands is an Agent Skill that lets Claude Code and other coding agents operate interactive terminal programs, like vim, a Python REPL or git rebase -i, by running them in a detached tmux session, sending keystrokes with tmux send-keys and reading the screen with tmux capture-pane.
It lives in obra/superpowers-lab, Jesse Vincent's repo of "Experimental skills for Claude Code Superpowers - new techniques and tools under active development." It is not part of the main Superpowers plugin; you install it separately.
The description reads: "Use when you need to run interactive CLI tools (vim, git rebase -i, Python REPL, etc.) that require real-time input/output - provides tmux-based approach for controlling interactive sessions through detached sessions and send-keys."
Its skills.sh page listed 503 installs (snapshot, 24 October 2026). The skill folder was last changed in October 2025.
What does it do?
The SKILL.md starts from one problem: "Interactive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal." Its example of what fails is running vim file.txt through bash -c, which hangs.
The fix is a loop the skill spells out in six steps:
- Create a detached session running the interactive command.
- Wait briefly, 100 to 500 ms depending on the command.
- Send input with
send-keys, including special keys. - Capture the current screen with
capture-pane -p. - Repeat steps 3 and 4 as needed.
- Kill the session when done.
Quick reference from the skill:
| Task | Command |
|---|---|
| Start session | tmux new-session -d -s <name> <command> |
| Send input | tmux send-keys -t <name> 'text' Enter |
| Capture output | tmux capture-pane -t <name> -p |
| Stop session | tmux kill-session -t <name> |
| List sessions | tmux list-sessions |
The skill lists tmux key names the agent should use, including Enter, Escape, C-c, C-x, the arrow keys, Space and BSpace, and shows how to start a session in a specific directory with -c.
When to use it, per the skill: text editors like vim or nano, REPLs (Python, Node), interactive git commands such as git rebase -i and git add -p, full-screen terminal apps like htop, and anything that needs terminal control codes or readline.
When not to: simple non-interactive commands, commands that take input through stdin redirection, and one-shot commands.
What does a session look like?
The skill's Python REPL pattern:
tmux new-session -d -s python python3 -i
tmux send-keys -t python 'import math' Enter
tmux send-keys -t python 'print(math.pi)' Enter
tmux capture-pane -t python -p
tmux kill-session -t python
It gives similar patterns for editing in vim and for an interactive rebase, where the agent captures the rebase editor, moves the cursor, types squash and saves with :wq.
What's in the folder?
SKILL.md: the pattern, key names, common patterns and mistakes.tmux-wrapper.sh: a small Bash script withstart,send,captureandstopactions.startandsendwait briefly and then print the current screen, which saves a separate capture call.
How do you install it?
First install tmux itself. The superpowers-lab README says "tmux must be installed on your system" and that its skills are tested on Linux and macOS.
Claude Code, through the Superpowers marketplace. The superpowers-marketplace lists a superpowers-lab plugin ("Experimental skills for Superpowers: tmux automation for interactive CLIs, MCP server discovery, duplicate function detection, headless Windows VM"). Add the marketplace, then install the plugin by name, using the plugin@marketplace form from Claude Code's plugin docs:
/plugin marketplace add obra/superpowers-marketplace
/plugin install superpowers-lab@superpowers-marketplace
That installs all four lab skills: this one, finding-duplicate-functions, mcp-cli and windows-vm. Plugin skills appear as /<plugin>:<skill>, so this one is /superpowers-lab:using-tmux-for-interactive-commands.
Just this skill, in any agent. The skills CLI copies the folder for Claude Code, Codex, Cursor and many other agents:
npx skills add https://github.com/obra/superpowers-lab --skill using-tmux-for-interactive-commands
Add -g for all projects or -a claude-code to target one agent. See Codex skills and Cursor skills for how those agents discover skill folders.
How do you use it?
The skill is model-invoked: the agent should reach for it when a task needs an interactive program. Naming it helps. Example prompts (suggestions, not quotes from the repo):
Squash my last three commits into one with git rebase -i. Use tmux so you can drive the editor.Start a Python REPL in a tmux session, load data/orders.csv with pandas, and show me the first five rows.Run git add -p on src/api.ts and stage only the hunks that touch validation.Open htop in tmux, capture the screen, and tell me which process is using the most memory.Kill any tmux sessions you started in this conversation.
Tips and limits
- Fix the wrapper path. The SKILL.md points to the helper at
/home/jesse/git/interactive-command/tmux-wrapper.sh, a path on the author's machine. The script ships in the skill folder astmux-wrapper.sh; tell the agent to use that copy, or edit the path in your saved version. - Wait before capturing. The skill's first common mistake is capturing right after
new-session, which shows a blank screen. It recommends a short sleep first. - Send Enter as its own argument.
'text\n'doesn't work;'text' Enterdoes. - Clean up. Orphaned sessions accumulate. The skill says to kill sessions when done or check for one with
tmux has-session. - It is experimental. The lab README describes its skills as functional but still being refined. The README's own install line is not one of Claude Code's documented commands, so use the marketplace route above.
- Mind what it can reach. Sending keys to a shell or editor is as powerful as typing them yourself. Review your Claude Code permission settings before letting an agent drive interactive tools unattended.
- Security audit. On 24 October 2026, the skills.sh page showed Gen Agent Trust Hub: Pass, Socket: Pass and Snyk: Pass.
If you run Claude Code itself inside tmux, our terminal setup guide covers the tmux settings that matter there; that is a separate topic from this skill.
Save it in your Kipt library
Under the MIT License you can copy and change the skill as long as you keep the copyright notice. In Kipt, open Skills and paste the folder's GitHub link; Kipt imports the SKILL.md and tmux-wrapper.sh together, and for a repo with many skills it shows a list to pick from. Your saved copy is the natural place to fix the wrapper path. Kipt keeps your skills as Markdown in a private GitHub repo you own and installs them into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Jesse Vincent or obra/superpowers-lab.
Similar skills
- Superpowers skills: the main library from the same author.
- Using git worktrees skill: Superpowers' skill for isolated workspaces, useful before an agent rewrites history with an interactive rebase.
- Playwright CLI skill: the same idea for browsers, driving pages through a CLI.
- Agent browser skill: Vercel Labs' CLI for clicking through sites from an agent.
- Git commit skill: GitHub's skill for staging related files and writing the message.