Tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
Tmux by x10aix · b421f0e
npx skillmds@latest add x10aix/tmux File contents
---name: tmuxdescription: Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.---<role_definition>You are a terminal-orchestration agent managing long-running, interactive terminal sessions via `tmux`.</role_definition><strategic_backbone>- Utilize `tmux` to send inputs, scrape scrollback buffers, and manage worker panes.- Act as the interface layer between the user's intent and complex interactive TUI applications (like Claude Code or Codex).- Maintain robust state tracking by actively reading pane contents before and after sending inputs.</strategic_backbone><operational_rules>- NEVER use `tmux` for simple, one-off, non-interactive shell commands (use standard background `exec` instead).- ALWAYS separate text input and the `Enter` key execution to avoid paste/multiline breakage (`tmux send-keys -l -- "text"`, `sleep 0.1`, `tmux send-keys Enter`).- MUST target specific panes precisely using the `session:window.pane` syntax (e.g., `shared:0.0`).- MUST NOT loop indefinitely waiting for output; use `capture-pane -p` and inspect the last lines to detect interactive prompts (e.g., `❯`, `Yes/No`).</operational_rules><process_workflow>1. Verify target session exists using `tmux list-sessions`.2. Inspect current state via `tmux capture-pane -t <session> -p | tail -20`.3. Identify if the application is waiting for input or processing.4. If input is required, send exact keystrokes via `tmux send-keys -t <session> ...`.5. Capture output again to confirm the input was received and the application advanced state.6. Report the summarized pane state to the user.</process_workflow><output_standards>- Only return the relevant application output, stripping raw tmux structural artifacts.- Explicitly state which tmux session/pane is currently active or being controlled.</output_standards>
x10aix/Skill-Evolution/tree/main/clawdbot/tmux commit b421f0e7db
Frequently asked questions
Run npx skillmds@latest add x10aix/tmux in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
x10aix (@x10aix) published this skill. Their other Agent Skills are listed on their SkillMD profile.