using-tmux-for-interactive-commands

using-tmux-for-interactive-commands is a skill for Claude Code from obra/superpowers-lab. It costs 56 tokens per session (1,383 once invoked), scanned A, original, MIT.

A guide for controlling interactive command-line programs through tmux, a terminal tool that keeps sessions running and accepts typed input.

In plain words
What is it for?
Use it to start, send input to, capture output from, and stop interactive sessions such as vim, git rebase -i, REPLs, and full-screen terminal tools.
Why use it?
Some programs, such as editors, interactive Git operations, and programming-language consoles, need a live terminal and cannot be handled reliably as one-off commands.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/jesse/git/interactive-command/tmux-wrapper.sh.

Part of the superpowers-lab plugin — 4 skills shipped together

Good fit Use it to start, send input to, capture output from, and stop interactive sessions such as vim, git rebase -i, REPLs, and full-screen terminal tools.

Compare 6 skills from other repositories ↓
About the project

Superpowers Lab is an experimental plugin that adds developing techniques and tools to Claude Code Superpowers. Its skills include detecting semantically duplicated functions in codebases and invoking MCP servers on demand through a command-line tool. The catalogue add-ons are the plugin's own skills.

obra/superpowers-lab · 438 stars · on GitHub

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add obra/superpowers-lab
Claude Code
/plugin install superpowers-lab

Made for: Claude Code.

Or install superpowers-lab, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-tmux-for-interactive-commands

README.md
[![agentmods](https://agentmods.dev/badge/skills/obra/superpowers-lab/using-tmux-for-interactive-commands/github.svg)](https://agentmods.dev/skills/obra/superpowers-lab/using-tmux-for-interactive-commands)
Your own site
<a href="https://agentmods.dev/skills/obra/superpowers-lab/using-tmux-for-interactive-commands"><img src="https://agentmods.dev/badge/skills/obra/superpowers-lab/using-tmux-for-interactive-commands/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-tmux-for-interactive-commands

Your own site · 80×15
<a href="https://agentmods.dev/skills/obra/superpowers-lab/using-tmux-for-interactive-commands"><img src="https://agentmods.dev/badge/skills/obra/superpowers-lab/using-tmux-for-interactive-commands.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,383 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 16 Sept 2026
  • Snyk pass 16 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01383
Opus 5.5 $0.00022 $0.00553
Sonnet 5.5 $0.00011 $0.00277
Haiku 4.5 $0.00006 $0.00138

Measured 2mo ago against content hash 51a3f28d4d16, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-tmux-for-interactive-commands scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (tmux-wrapper.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/using-tmux-for-interactive-commands/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

Core Pattern

Before (Won't Work)

# This hangs because vim expects interactive terminal
bash -c "vim file.txt"

After (Works)

# 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

Read the full file on GitHub · 179 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 179 lines · 56 tokens per session scan A 51a3f28d4d16

Subscribe to this mod's changes

using-tmux-for-interactive-commands is a skill published in the GitHub repository obra/superpowers-lab (438 stars, last pushed 5mo ago), licensed MIT. It adds 56 tokens to every session and 1,383 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

using-tmux-for-interactive-commands compared with skills from other repositories

using-tmux-for-interactive-commands next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
using-tmux-for-interactive-commandsobra/superpowers-labSkill4385mo agoMITA56Claude Code
imagegenopenai/codexSkill135ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill100kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill394ktodayMITA36Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill316k7d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code