Agent skill

Using Tmux For Interactive Commands

by obra in obra/superpowers-lab

A skill your agent uses 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…

MITAuto-check passedDevelopment

Install Using Tmux For Interactive Commands

skills CLI
$ npx skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install obra/superpowers-lab using-tmux-for-interactive-commands --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/obra/superpowers-lab.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/using-tmux-for-interactive-commands .claude/skills/using-tmux-for-interactive-commands && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
using-tmux-for-interactive-commands
GitHub stars
430
Used in
2 other repos
Token cost
~1.3k tokens
SKILL.md length
368 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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…

  • Works in 6 steps: Create detached session with the… → Wait briefly for initialization… → Send input using send-keys (can send… → …
  • You need to run interactive CLI tools (vim
  • SKILL.md covers Overview, When to Use, Quick Reference and Core Pattern, plus 4 more sections
  • Runs Shell scripts from its folder; calls git and bash

What it does

Using Tmux For Interactive Commands is an agent skill from obra/superpowers-lab. 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 SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `tmux-wrapper.sh`).

It sits in Development. It works with tmux, Git and Python. The repository describes itself as: Experimental skills for Claude Code Superpowers - new techniques and tools. The licence is MIT.

When your agent uses it

  • You need to run interactive CLI tools (vim

Example prompts

  • “/using-tmux-for-interactive-commands”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Create detached session with the interactive command
  2. Wait briefly for initialization (100-500ms depending on command)
  3. Send input using send-keys (can send special keys like Enter, Escape)
  4. Capture output using capture-pane -p to see current screen state
  5. Repeat steps 3-4 as needed
  6. Terminate session when done

What it can do on your machine

Read from SKILL.md and the folder at commit 51111f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Using Tmux For Interactive Commands loads about 1.3k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 368 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from obra/superpowers-lab at commit 51111f7, republished under its MIT licence (© obra). 368 words, ~1,268 tokens.

Download SKILL.mdSave it as .claude/skills/using-tmux-for-interactive-commands/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
using-tmux-for-interactive-commands
description
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

Using tmux for Interactive Commands

Overview

Interactive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal. tmux provides detached sessions that can be controlled programmatically via send-keys and capture-pane.

When to Use

Use tmux when:

  • Running vim, nano, or other text editors programmatically
  • Controlling interactive REPLs (Python, Node, etc.)
  • Handling interactive git commands (git rebase -i, git add -p)
  • Working with full-screen terminal apps (htop, etc.)
  • Commands that require terminal control codes or readline

Don't use for:

  • Simple non-interactive commands (use regular Bash tool)
  • Commands that accept input via stdin redirection
  • One-shot commands that don't need interaction

Quick Reference

TaskCommand
Start sessiontmux new-session -d -s <name> <command>
Send inputtmux send-keys -t <name> 'text' Enter
Capture outputtmux capture-pane -t <name> -p
Stop sessiontmux kill-session -t <name>
List sessionstmux list-sessions

Core Pattern

Before (Won't Work)
bash
# This hangs because vim expects interactive terminal
bash -c "vim file.txt"
After (Works)
bash
# Create detached tmux session
tmux new-session -d -s edit_session vim file.txt

# Send commands (Enter, Escape are tmux key names)
tmux send-keys -t edit_session 'i' 'Hello World' Escape ':wq' Enter

# Capture what's on screen
tmux capture-pane -t edit_session -p

# Clean up
tmux kill-session -t edit_session

Implementation

Basic Workflow
  1. Create detached session with the interactive command
  2. Wait briefly for initialization (100-500ms depending on command)
  3. Send input using send-keys (can send special keys like Enter, Escape)
  4. Capture output using capture-pane -p to see current screen state
  5. Repeat steps 3-4 as needed
  6. Terminate session when done
Special Keys

Common tmux key names:

  • Enter - Return/newline
  • Escape - ESC key
  • C-c - Ctrl+C
  • C-x - Ctrl+X
  • Up, Down, Left, Right - Arrow keys
  • Space - Space bar
  • BSpace - Backspace
Show full SKILL.md (136 more words)Show less
Working Directory

Specify working directory when creating session:

bash
tmux new-session -d -s git_session -c /path/to/repo git rebase -i HEAD~3
Helper Wrapper

For easier use, see /home/jesse/git/interactive-command/tmux-wrapper.sh:

bash
# Start session
/path/to/tmux-wrapper.sh start <session-name> <command> [args...]

# Send input
/path/to/tmux-wrapper.sh send <session-name> 'text' Enter

# Capture current state
/path/to/tmux-wrapper.sh capture <session-name>

# Stop
/path/to/tmux-wrapper.sh stop <session-name>

Common Patterns

Python REPL
bash
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  # See output
tmux kill-session -t python
Vim Editing
bash
tmux new-session -d -s vim vim /tmp/file.txt
sleep 0.3  # Wait for vim to start
tmux send-keys -t vim 'i' 'New content' Escape ':wq' Enter
# File is now saved
Interactive Git Rebase
bash
tmux new-session -d -s rebase -c /repo/path git rebase -i HEAD~3
sleep 0.5
tmux capture-pane -t rebase -p  # See rebase editor
# Send commands to modify rebase instructions
tmux send-keys -t rebase 'Down' 'Home' 'squash' Escape
tmux send-keys -t rebase ':wq' Enter

Common Mistakes

Not Waiting After Session Start

Problem: Capturing immediately after new-session shows blank screen

Fix: Add brief sleep (100-500ms) before first capture

bash
tmux new-session -d -s sess command
sleep 0.3  # Let command initialize
tmux capture-pane -t sess -p
Forgetting Enter Key

Problem: Commands typed but not executed

Fix: Explicitly send Enter

bash
tmux send-keys -t sess 'print("hello")' Enter  # Note: Enter is separate argument
Using Wrong Key Names

Problem: tmux send-keys -t sess '\n' doesn't work

Fix: Use tmux key names: Enter, not \n

bash
tmux send-keys -t sess 'text' Enter  # ✓
tmux send-keys -t sess 'text\n'      # ✗
Not Cleaning Up Sessions

Problem: Orphaned tmux sessions accumulate

Fix: Always kill sessions when done

bash
tmux kill-session -t session_name
# Or check for existing: tmux has-session -t name 2>/dev/null

Real-World Impact

  • Enables programmatic control of vim/nano for file editing
  • Allows automation of interactive git workflows (rebase, add -p)
  • Makes REPL-based testing/debugging possible
  • Unblocks any tool that requires terminal interaction
  • No need to build custom PTY management - tmux handles it all

© obra, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/using-tmux-for-interactive-commands of obra/superpowers-lab.

  • SKILL.md
  • tmux-wrapper.sh

Open the folder on GitHubat commit 51111f7

Used in 2 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in obra/superpowers-lab, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Using Tmux For Interactive Commands next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Using Tmux For Interactive Commands compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Using Tmux For Interactive Commands this skillobra/superpowers-lab4302 repos~1.3kAutomated safety check: PassMIT
Git History Bug Auditben-manes/caffeine18k—~3.3kAutomated safety check: PassApache-2.0
Pypi ReleasealchemiststudiosDOTai/tunacode125—~2.2kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Skyvern Version BumpSkyvern-AI/skyvern23k—~1kAutomated safety check: NotesAGPL-3.0
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause

Similar skills

  • Git History Bug Audit

    ben-manes/caffeine

    Audits a module by walking its git history commit by commit, tracking unresolved issues forward, and reporting the ones that survive to HEAD as findings.

    18k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Pypi Release

    alchemiststudiosDOTai/tunacode

    This skill should be used when releasing tunacode-cli to PyPI.

    125 GitHub stars~2.2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Skyvern Version Bump

    Skyvern-AI/skyvern

    Walks through a Skyvern open-source release bump: update the version, rebuild the Python and TypeScript SDKs with Fern, commit, and open a pull request.

    23k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check: notes
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    DevelopmentAuto-check passed
  • Commitizen

    commitizen-tools/commitizen

    A skill your agent uses for tasks involving Conventional Commits, commit message validation, Commitizen configuration, semantic version bumps, changelog generation, or CI/release automation with the…

    3.5k GitHub stars~839 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from obra/superpowers-lab

  • Finding Duplicate Functions

    obra/superpowers-lab

    A skill your agent uses when auditing a codebase for semantic duplication - functions that do the same thing but have different names or implementations.

    430 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed

Works with

Categories

Questions about Using Tmux For Interactive Commands

What does Using Tmux For Interactive Commands do?

A skill your agent uses 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…. Using Tmux For Interactive Commands is an agent skill from obra/superpowers-lab.

When should I use Using Tmux For Interactive Commands?

Using Tmux For Interactive Commands fits situations like: you need to run interactive CLI tools (vim.

How do I install Using Tmux For Interactive Commands in Claude Code?

Run `npx skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -a claude-code`. Or copy the skill folder (skills/using-tmux-for-interactive-commands in obra/superpowers-lab) into .claude/skills/using-tmux-for-interactive-commands in your project. Claude Code loads it when a task matches its description.

How do I install Using Tmux For Interactive Commands in Codex?

Run `npx skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -a codex`. Or copy the skill folder (skills/using-tmux-for-interactive-commands in obra/superpowers-lab) into .agents/skills/using-tmux-for-interactive-commands in your project. Codex loads it when a task matches its description.

Can I use Using Tmux For Interactive Commands in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add obra/superpowers-lab --skill using-tmux-for-interactive-commands -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/using-tmux-for-interactive-commands, .gemini/skills/using-tmux-for-interactive-commands, .github/skills/using-tmux-for-interactive-commands and .opencode/skills/using-tmux-for-interactive-commands in your project.

What does Using Tmux For Interactive Commands need to run?

Going by SKILL.md and its folder, Using Tmux For Interactive Commands needs a shell for the scripts in its folder and the command-line tools its instructions call (git and bash). Our summary lists: Python 3; A Bash shell.

Does Using Tmux For Interactive Commands access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Using Tmux For Interactive Commands safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Using Tmux For Interactive Commands use?

Using Tmux For Interactive Commands is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Using Tmux For Interactive Commands use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Using Tmux For Interactive Commands?

Skills that share tags, products or a category with Using Tmux For Interactive Commands: Git History Bug Audit (ben-manes/caffeine, 18k stars), Pypi Release (alchemiststudiosDOTai/tunacode, 125 stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars) and Skyvern Version Bump (Skyvern-AI/skyvern, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Using Tmux For Interactive Commands?

obra (a GitHub user) maintains it in obra/superpowers-lab, which has 430 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on June 1, 2026.

Source: obra/superpowers-lab on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.