tmux-terminal
This Claude Code skill enables automated control of interactive terminal applications using tmux, allowing you to send keystrokes, capture screen output, and manage long-running processes. Use it when testing TUI applications like ralph-tui, managing background services, automating interactive CLI workflows, or capturing live terminal output for validation and QA purposes.
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator /tmp/tmux-terminal && cp -r /tmp/tmux-terminal/.claude/skills/tmux-terminal ~/.claude/skills/tmux-terminalSKILL.md
# tmux-terminal ## Overview Use tmux to drive interactive terminal sessions, including TUI workflows like `ralph-tui`. tmux lets you send keystrokes, capture screen output, and keep processes running between steps. ## When to Use - Testing `ralph-tui` or any interactive CLI prompts - Managing long-running processes (web server, loops, watch mode) - Capturing live terminal output for QA reports - Interacting with applications that redraw the screen ## Prerequisites - `tmux` installed (pre-installed on macOS) Verify: ```bash tmux -V ``` ## Core Commands Create a detached session: ```bash tmux new-session -d -s <name> ``` Send commands (append Enter to execute): ```bash tmux send-keys -t <name> "<command>" Enter ``` Capture screen output: ```bash tmux capture-pane -t <name> -p ``` Kill session when done: ```bash tmux kill-session -t <name> ``` ## Special Keys Use `send-keys` with key names: - `Enter` - `C-c` (Ctrl-C) - `C-d` (Ctrl-D) - `Tab` - `Escape` - `Up`, `Down`, `Left`, `Right` Examples: ```bash tmux send-keys -t <name> Up tmux send-keys -t <name> C-c ``` ## TUI Interaction Patterns ### Start ralph-tui ```bash tmux new-session -d -s ralph-tui tmux send-keys -t ralph-tui "cargo run -p ralph-tui" Enter ``` ### Navigate in TUI ```bash tmux send-keys -t ralph-tui Down tmux send-keys -t ralph-tui Enter ``` ### Capture and parse the screen ```bash tmux capture-pane -t ralph-tui -p -S -200 ``` Use `-S -200` to capture the last 200 lines when the screen is noisy. ## Long-Running Process Management - Start servers or loops in a tmux session to keep them alive. - Use `capture-pane` to confirm health (look for "listening" or "ready" text). - Stop cleanly with `C-c` then `kill-session`. Example: ```bash tmux new-session -d -s ralph-web tmux send-keys -t ralph-web "cargo run -p ralph-cli -- web" Enter tmux capture-pane -t ralph-web -p | rg -n "listening|ready" tmux send-keys -t ralph-web C-c tmux kill-session -t ralph-web ``` ## Notes - Keep session names short and unique. - Always clean up sessions to avoid leaking background processes. - If output looks empty, wait briefly and capture again.
Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.
Generates structured .code-task.md files from descriptions or PDD implementation plans. Auto-detects input type, creates properly formatted tasks with Given-When-Then acceptance criteria.
Use when testing Ralph's hat collection presets, validating preset configurations, or auditing the preset library for bugs and UX issues.
Lists all code tasks in the repository with their status, dates, and metadata. Useful for getting an overview of pending work or finding specific tasks.
Transforms a rough idea into a detailed design document with implementation plan. Follows Prompt-Driven Development — iterative requirements clarification, research, design, and planning.
Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.
Use when creating animated demos (GIFs) for pull requests or documentation. Covers terminal recording with asciinema and conversion to GIF/SVG for GitHub embedding.
Introspect, explain, and improve Ralph Orchestrator using its published llms.txt doc map. Use this skill whenever the user asks questions about Ralph's behavior, wants to understand how a Ralph internal works (event loop, hats, memories, tasks, backends, presets), debug an unfamiliar failure mode, or propose a code change to the ralph-orchestrator repo. The skill teaches the agent to discover authoritative answers from the live docs via llms.txt before guessing, and to scope improvements through the published architecture rather than the local checkout alone.