Skip to main content
skill CX Codex

tui-debug-in-pane — Claude Code skill: what it does, how to install

Launches ralph in a dedicated tmux split pane to capture live output and isolate interface rendering glitches while keeping the main terminal open.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mikeyobrien/ralph-orchestrator --skill tui-debug-in-pane -a claude-code
Open on GitHub

What tui-debug-in-pane does

The skill manages terminal UI debugging by opening an isolated split pane. It queries the active pane target with tmux display-message, splits the current window horizontally, and injects control commands. This workflow prevents rendering artifacts or streaming lockups from corrupting your primary prompt.

Environment preparation discards .ralph/loop.lock and executes git worktree prune. Because split panes inherit the system default bash, the script switches the subpane environment to fish so dependencies like pi can discover their Node tools. ralph runs directly via target/release/ralph or cargo run --bin ralph.

Diagnostics require waiting 20 seconds before grabbing 60 lines of scrollback with tmux capture-pane. Overlooking stale lock files will push ralph into recursive worktree loops instead of executing the specified prompt.

What it helps with

  • reproduce garbled or corrupted terminal UI layouts
  • capture terminal streaming output for bug diagnostics
  • isolate unstable TUI sessions inside a dedicated tmux pane
  • inspect diagnostic logs without halting the active agent

Example prompts for the agent

  • Debug ralph TUI streaming glitches in a tmux split pane using CONFIG.yml
  • Start ralph in a new tmux pane, wait 20 seconds and dump the terminal buffer
  • Reproduce the broken TUI view in tmux and inspect .ralph/diagnostics/logs/

How to install tui-debug-in-pane

1Skills CLI (Vercel)

npx skills add mikeyobrien/ralph-orchestrator --skill tui-debug-in-pane -a claude-code

2Manually: put the files in place

~/.claude/skills/tui-debug-in-pane/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tui-debug-in-pane/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tui-debug-in-pane

How to install tui-debug-in-pane in Claude Code?

Run npx skills add mikeyobrien/ralph-orchestrator --skill tui-debug-in-pane -a claude-code in your terminal.

What does tui-debug-in-pane do?

It launches ralph inside an adjacent tmux split, tracks live interface streaming, and dumps the output using tmux capture-pane. Your main terminal stays free to run diagnostics.

Why does the workflow switch the pane shell to fish?

Split panes launch with the tmux server default bash, missing paths managed by tools like mise. Switching to fish ensures binaries like pi run without missing command errors.

Source text

SKILL.md · MIT
---
name: tui-debug-in-pane
description: Use when you need to reproduce or debug TUI rendering issues (garbled output, broken streaming, layout corruption) by running ralph in a tmux split pane and capturing live output.
metadata:
  internal: true
---

# tui-debug-in-pane

Debug TUI rendering bugs by launching ralph in a tmux split pane and capturing live output. The split keeps your main pane free for inspection commands.

## When to Use

- Reproducing garbled or corrupted TUI output from a specific provider
- Investigating streaming rendering issues that only appear live
- Capturing TUI state for bug reports or diagnostics

## Quick Reference

| Task | Command |
|------|---------|
| Identify current pane | `tmux display-message -p '#{session_name}:#{window_index}.#{pane_index}'` |
| Create split pane | `tmux split-window -h -t SESSION:WINDOW -c /path/to/repo` |
| List panes | `tmux list-panes -t SESSION:WINDOW` |
| Fix shell in pane | `tmux send-keys -t PANE "exec /path/to/fish" Enter` |
| Send command | `tmux send-keys -t PANE "command" Enter` |
| Capture output | `tmux capture-pane -t PANE -p -S -60` |
| Quit TUI | `tmux send-keys -t PANE q` |
| Force stop | `tmux send-keys -t PANE C-c` |
| Kill split pane | `tmux kill-pane -t PANE` |

## Procedure

### 1. Create the Split Pane

```bash
tmux display-message -p '#{session_name}:#{window_index}.#{pane_index}'
tmux split-window -h -t SESSION:WINDOW -c /path/to/repo
tmux list-panes -t SESSION:WINDOW
```

### 2. Fix Shell Environment

Split panes inherit the tmux server's default shell (bash), not the parent's. Tools like `pi` need fish (mise/Node).

```bash
tmux send-keys -t PANE "exec /nix/store/km9w9r1p4nl92y5fp4vfwsjymjig4axl-fish-3.7.1/bin/fish" Enter
tmux send-keys -t PANE "which pi && pi --version" Enter
```

### 3. Clean Up Before Running

```bash
rm -f .ralph/loop.lock
git worktree prune
```

### 4. Launch Ralph

```bash
# Prefer release binary (faster startup)
tmux send-keys -t PANE "target/release/ralph run -c CONFIG.yml -p 'prompt' --max-iterations N" Enter

# Or with cargo (must specify --bin for this workspace)
tmux send-keys -t PANE "cargo run --bin ralph -- run -c CONFIG.yml -p 'prompt' --max-iterations N" Enter
```

### 5. Capture and Analyze

```bash
sleep 20  # Pi/Kiro take 15-30s to start streaming
tmux capture-pane -t PANE -p -S -60
ls -lt .ralph/diagnostics/logs/ | head -5
```

### 6. Clean Up

```bash
tmux send-keys -t PANE q
tmux send-keys -t PANE C-c
tmux kill-pane -t PANE
```

## Common Mistakes

- **Shell mismatch**: Split panes get bash by default. If tools fail with "command not found", switch to fish with `exec /path/to/fish`.
- **Stale loop lock**: If `.ralph/loop.lock` exists, ralph spawns worktree loops instead of running normally. Always delete it first.
- **Wrong backend in TUI header**: Without `cli.backend: pi` in the config, ralph uses claude regardless of hat settings.
- **Missing hat `name` field**: HatConfig requires `name`; omitting it causes a config parse error.
- **Premature capture**: Pi and Kiro take 15-30s before streaming text appears. Capture too early and you see an empty content area.
- **Ghost keystrokes**: If the TUI already exited, pressing `q` prepends it to your next command. Check if the TUI is still running before sending quit keys.

© mikeyobrien · MIT · mikeyobrien/ralph-orchestrator

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set16

tui-validate This skill screenshots a terminal UI with freeze and judges it against criteria using an LLM. Useful after TUI changes, when you need to catch broken layout. CX Codex +1 ★ 3,189repo stars tmux-terminal This skill uses tmux to send keystrokes, read terminal output, and keep CLI processes running between steps. Use it with interactive TUIs or long-running commands. CX Codex +1 ★ 3,189repo stars test-driven-development This skill walks the agent through RED → GREEN → REFACTOR and makes it write tests before code. Useful when a spec or task needs to become checkable tests. CX Codex +1 ★ 3,189repo stars review-pr Runs the ralph review loop on a pull request to test changes in an isolated worktree and generate a Markdown report. CX Codex +1 ★ 3,189repo stars release-bump Walks ralph-orchestrator through a release: raise the version, build, test, tag. Meant for the moment fixes are committed and publishing is next. CX Codex +1 ★ 3,189repo stars pr-demo Records a terminal session with asciinema and turns it into a GIF or SVG you can drop into a pull request. CX Codex +1 ★ 3,189repo stars playwriter Drives your local Chrome browser with Playwright Page scripts while keeping active logins and cookies. Useful for testing authenticated web dashboards. CX Codex +1 ★ 3,189repo stars pdd pdd turns a rough idea into requirements, research, a design document, and an implementation plan. It is for projects that need decisions recorded before coding. CX Codex +1 ★ 3,189repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor