Kipt

tmux skill for Claude Code: drive vim, REPLs and git rebase -i

The using-tmux-for-interactive-commands skill lets your agent run vim, REPLs and git rebase -i in detached tmux sessions. How it works and how to install it.

By the Kipt team · Updated 24 October 2026

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:

  1. Create a detached session running the interactive command.
  2. Wait briefly, 100 to 500 ms depending on the command.
  3. Send input with send-keys, including special keys.
  4. Capture the current screen with capture-pane -p.
  5. Repeat steps 3 and 4 as needed.
  6. 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 with start, send, capture and stop actions. start and send wait 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 as tmux-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' Enter does.
  • 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

Questions

What is the using-tmux-for-interactive-commands skill?

It is an Agent Skill in Jesse Vincent's superpowers-lab repo (MIT License). It teaches a coding agent to run interactive terminal programs, such as vim, Python or Node REPLs and git rebase -i, inside a detached tmux session, then type into them with tmux send-keys and read the screen with tmux capture-pane.

How do I install the tmux skill in Claude Code?

Add the Superpowers marketplace with /plugin marketplace add obra/superpowers-marketplace, then install the superpowers-lab plugin, which bundles this skill with three other experimental ones. To copy only this skill, run npx skills add https://github.com/obra/superpowers-lab --skill using-tmux-for-interactive-commands.

Why can't Claude Code run vim or git rebase -i directly?

The skill explains that interactive tools need a real terminal, so running them through a plain shell command hangs waiting for input. A detached tmux session supplies that terminal, and the agent controls it from outside by sending keys and capturing what is on screen.

Does the tmux skill need anything installed?

Yes. tmux must be installed on your system, and the superpowers-lab README says its skills are tested on Linux and macOS. The skill itself has no other dependencies; the folder includes an optional tmux-wrapper.sh script.

When should the agent not use tmux?

The skill says not to use it for simple non-interactive commands, for commands that accept input through stdin redirection, or for one-shot commands that don't need interaction. A normal shell command is simpler in those cases.

More in Skill directory

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.