Best for
- Design a terminal-first coding-agent REPL or prompt UI
- Decide how message history, search, rewind, and interrupt should behave
- Add background-task surfaces, teammate navigation, or task detail dialogs
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/ai-coding-agents-terminal-ui/SKILL.md
Designs terminal-first coding-agent UX: REPL, prompt input, status lines, keybindings, display modes. Use when shaping TUI rendering, history, or background-task navigation.
Decision brief
Use this skill to design or review the terminal-first user experience of a coding-agent runtime: REPL structure, prompt input, message rendering, command queues, virtualized history, interrupt behavior, notifications, and background-task navigation.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-terminal-ui"Inspect the Agent Skill "ai-coding-agents-terminal-ui" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/ai-coding-agents-terminal-ui/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Keep the REPL as a host-owned state machine. Prompt input, message history, background tasks, and overlays should share one session model. 2. Separate transcript data from render strategy. Large histories need virtualization and deferred rendering, not truncated state ownersh…
Review the “ASCII Flow” section in the pinned source before continuing.
Review the “Quick Reference” section in the pinned source before continuing.
Design a terminal-first coding-agent REPL or prompt UI
Review the “Use Other Skills” section in the pinned source before continuing.
Permission review
The documentation includes network, browsing, or remote request actions.
idle | editing | running | search | overlay | teammate view | remote/viewerThe documentation asks the agent to run terminal commands or scripts.
History recall is asymmetric: `historySearch:execute` (Enter) *runs* the selected past command immediately, while `historySearch:accept` (Escape or Tab) only *fills* the input without executing. A design that treats Enter-in-search as "justEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 82 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill to design or review the terminal-first user experience of a coding-agent runtime: REPL structure, prompt input, message rendering, command queues, virtualized history, interrupt behavior, notifications, and background-task navigation.
This skill is for terminal interaction patterns, not generic desktop app UX.
runtime events
|
v
host-owned REPL state
transcript + prompt input + command queue + background tasks + overlays
|
v
render pipeline
message model + virtualized history + notifications + task surfaces
|
v
input state machine
idle | editing | running | search | overlay | teammate view | remote/viewer
|
v
runtime action
submit, interrupt, foreground task, kill task, search, rewind, resume
| Question | Read | Outcome |
|---|---|---|
| How should the REPL, prompt, and history work? | references/repl-message-input-and-history.md | Message model, prompt queue, input behavior, interrupt handling |
| How should background work and large histories render? | references/background-work-notifications-and-virtualization.md | Background-task UX, notifications, virtual scroll, and teammate navigation |
| What are the input states and keybindings for background navigation? | references/input-state-machine.md | State machine, transition table, mode-specific keybindings, invariants, failure modes |
| How do ToolSearch deferred-tool results render in the REPL? | references/recipe-toolsearch-render.md | Discovery annotation, collapse behavior, permission-prompt sequencing, scroll rules |
| What OpenAI Codex TUI patterns should be snapshot-tested? | references/openai-codex-tui-status-and-snapshot-patterns.md | Status line/title, approval modals, hook/app-server warnings, narrow terminal states |
| What are Claude Code's real status-line fields, keybinding contexts, and Agent Teams display modes? | references/input-state-machine.md | Verified statusLine JSON fields, keybindings.json contexts/reserved keys, in-process vs split-pane display modes |
| Need | Use Instead |
|---|---|
| Background task runtime design | ../ai-coding-agents-tasks/SKILL.md |
| Remote or bridge runtime | ../ai-coding-agents-remote-runtime/SKILL.md |
| Tool approval architecture | ../ai-coding-agents-permissions/SKILL.md |
As of mid-2026, the main choices for coding-agent terminal UIs are:
| Framework | Language | Used by | Notes |
|---|---|---|---|
| Ink 6 + React 19 | TypeScript | Claude Code, Gemini CLI | Mature; component model familiar to web developers; commonly cited ~30 FPS render cap and ~50 MB+ baseline (verify against target environment before treating as hard limits); large ecosystem |
| Ratatui | Rust | Codex (codex-rs/tui) | Low overhead; strong for high-frequency event loops; explicit layout model |
| Bubble Tea v2 | Go | Various OSS tools | Declarative View/Update/Init pattern; v2 adds concurrent commands |
| OpenTUI | TypeScript/emerging | — | Emerging; watch but do not depend on for production |
Selection heuristics:
Dual-surface invariant: both a CLI surface and a desktop (GUI) surface should consume a shared typed daemon or ACP server. Rendering stacks may differ — Ink for CLI, Tauri/web for desktop — but the protocol contract must be identical. Goose 2.0 (AAIF, April 2026) is the canonical example: TypeScript TUI and Tauri desktop are both clients of the same ACP daemon; message model, tool results, and interrupt semantics flow through the same protocol.
Goose (AAIF, formerly Block) 2.0 ships a TypeScript TUI (beta: npx @aaif/goose) and is migrating the desktop from Electron to Tauri — both clients of a shared ACP daemon, not separate runtimes. This updates the earlier Ink-style REPL + Electron desktop description.
Goose's terminal renderer has no overflow clipping. Content wider than its container visually corrupts the frame — there is no scroll-to-reveal. All content must be pre-truncated to its container's character dimensions before being emitted.
(max_cols, max_rows) and returns pre-truncated content plus an "expand" affordance that opens a separate dialog/pager. The REPL state machine tracks which messages are collapsed-due-to-space vs. collapsed-by-user.Goose's desktop UI is not a different product — it is a client of the same ACP daemon as the CLI (see ai-coding-agents-remote-runtime for the daemon pattern). Message blocks, keybindings, and interrupt semantics must work in both surfaces because they are defined at the protocol level, not the rendering layer.
Verified 2026-07-11 against code.claude.com/docs/en/statusline, .../keybindings, and .../agent-teams. Use this as ground truth before inventing status-line fields or keybindings for a design that claims Claude Code parity — the dominant failure mode in this space is presenting a plausible-sounding key or field as fact when it does not exist in the shipped product.
Status line. The status line is a user-supplied shell command (statusLine.type = "command") that receives one JSON blob on stdin per update and prints text to stdout — it does not own state, it renders a snapshot. Expert traps:
tput cols and other terminal-size probes return nothing inside the script. Read the COLUMNS/LINES environment variables Claude Code injects instead (v2.1.153+). Any status-line design that assumes direct TTY access from a subprocess will silently misrender width./compact, permission-mode change, vim-mode toggle) and debounced 300ms; a script still running when a new trigger fires gets cancelled mid-run. Use the optional refreshInterval (minimum 1s) only for genuinely time-based segments (a clock, idle-session cost drift) — polling for no reason burns a process tick every interval even when nothing changed.Keybindings. Real customization lives in ~/.claude/keybindings.json ($schema, $docs, bindings[], each block scoped to a context such as Chat, Task, HistorySearch, Footer, MessageSelector). Load-bearing facts that contradict looser generic TUI assumptions:
Ctrl+C, Ctrl+D, Ctrl+M, and Caps Lock are hard-reserved and cannot be rebound.Ctrl+B is the default for task:background, but it collides with the tmux prefix key — that's why a second chord, Ctrl+X Ctrl+B, exists as of v2.1.169 specifically to avoid that conflict. Any coding-agent TUI that binds a primary action to Ctrl+B needs a tmux-safe alternate chord, not just a note in the docs.task:background (send current turn to background) and chat:killAgents (Ctrl+X Ctrl+K, stops all running background subagents at once). Do not assume a granular per-task kill shortcut exists — build one if your design needs it and document it as new, not "standard."historySearch:execute (Enter) runs the selected past command immediately, while historySearch:accept (Escape or Tab) only fills the input without executing. A design that treats Enter-in-search as "just paste" will surprise users by re-running commands.Agent Teams display modes. As of v2.1.178+, the default teammateMode is "in-process" (before v2.1.179 the default was "auto", so upgraded configs that relied on the old default now stay in-process unless set explicitly). Split-pane mode ("tmux" or, from v2.1.186, "iterm2") requires tmux or iTerm2 with the it2 CLI and is not supported in VS Code's integrated terminal, Windows Terminal, or Ghostty. Teammate navigation in in-process mode is Up/Down arrows to select a teammate in the agent panel, Enter to open its transcript and message it directly, Escape to interrupt its current turn, and x to stop a selected teammate — there is no Shift+Up/Down teammate-navigation binding in the shipped product; that pattern in the References below is illustrative design guidance, not a documented Claude Code shortcut. Treat split-pane availability as a runtime capability to detect, not a default to assume.
references/repl-message-input-and-history.md — REPL ownership, prompt queue, interrupt semantics, and message historyreferences/background-work-notifications-and-virtualization.md — Background-task navigation, notifications, and virtualized long-session renderingreferences/input-state-machine.md — Input state machine for background navigation modes with transition table and keybinding rulesreferences/recipe-toolsearch-render.md — How ToolSearch deferred-tool results render in the REPLreferences/openai-codex-tui-status-and-snapshot-patterns.md — OpenAI Codex TUI status surfaces, approval rendering, app-server/hook warnings, and snapshot coveragedata/sources.json — Primary documentation and source references for terminal-agent UI patterns../ai-coding-agents-tasks/SKILL.md../ai-coding-agents-remote-runtime/SKILL.md../software-ui-ux-design/SKILL.mdclaude_code snapshot plus current TUI framework docs and are illustrative design guidance, not documented product behavior — label them as such when presenting to a reader who might mistake them for a shipped feature.keybindings.json contexts/actions, and Agent Teams display-mode facts in "Claude Code Reference" above were web-verified on 2026-07-11 against code.claude.com/docs/en/{statusline,keybindings,agent-teams} and are current product documentation, not inference from a snapshot. Re-verify before depending on exact field names or key defaults, since these pages carry inline min-version/max-version notes that shift with releases.Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
Frequently asked questions
Use this skill to design or review the terminal-first user experience of a coding-agent runtime: REPL structure, prompt input, message rendering, command queues, virtualized history, interrupt behavior, notifications, and background-task navigation.
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-terminal-ui". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Static rules flagged network, exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
Designs and audits UI/UX systems with usability and accessibility requirements. Use when shaping flows, design systems, interaction patterns, or WCAG-aware product behavior.
vasilyu1983/AI-Agents-public
Designs session lifecycle for coding-agent runtimes. Use when implementing resume, transcript restoration, checkpoint rewind, cross-worktree recovery, or session-state persistence.
vasilyu1983/AI-Agents-public
Designs and audits native Android interfaces. Use when reviewing Compose layout, typography, color, motion, or adaptive patterns on a verified emulator build.