跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

ai-coding-agents-terminal-ui

Designs terminal-first coding-agent UX: REPL, prompt input, status lines, keybindings, display modes. Use when shaping TUI rendering, history, or background-task navigation.

vasilyu1983 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add vasilyu1983/AI-Agents-public --skill ai-coding-agents-terminal-ui

技能说明


name: ai-coding-agents-terminal-ui description: "Designs terminal-first coding-agent UX: REPL, prompt input, status lines, keybindings, display modes. Use when shaping TUI rendering, history, or background-task navigation." compatibility: Portable core. Works on Claude Code and Codex. version: "1.1" last_validated: 2026-07-11

AI Coding Agents Terminal UI

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.

ASCII Flow

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

Quick Reference

QuestionReadOutcome
How should the REPL, prompt, and history work?references/repl-message-input-and-history.mdMessage model, prompt queue, input behavior, interrupt handling
How should background work and large histories render?references/background-work-notifications-and-virtualization.mdBackground-task UX, notifications, virtual scroll, and teammate navigation
What are the input states and keybindings for background navigation?references/input-state-machine.mdState machine, transition table, mode-specific keybindings, invariants, failure modes
How do ToolSearch deferred-tool results render in the REPL?references/recipe-toolsearch-render.mdDiscovery 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.mdStatus 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.mdVerified statusLine JSON fields, keybindings.json contexts/reserved keys, in-process vs split-pane display modes

When To Use

  • 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
  • Improve large-session rendering with virtualization or deferred updates
  • Separate interactive UI behavior from headless or SDK behavior

Use Other Skills

NeedUse 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

Default 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 ownership.
  3. Use dedicated stores for high-frequency signals. Command queues, scroll state, and background-task counts should not force full-tree re-renders.
  4. Treat interrupt behavior as first-class UX. Idle escape, active interrupt, teammate-view escape, and remote interrupt are different actions.
  5. Make background work navigable. Users should be able to inspect, foreground, or kill tasks without losing the main session.
  6. Model interactive-only features explicitly. Some callbacks and overlays exist only in REPL mode and should not leak into headless paths.
  7. Test long sessions. Verify search, rewind, virtualization, notification timing, and prompt-input persistence after hundreds of turns.

Host Rules

  • The UI should not own semantic session state that the runtime cannot restore.
  • Large histories should optimize mounting and scroll math, not just terminal paint.
  • Background work deserves a first-class dialog or tree, not a single badge count.
  • Prompt input should survive round-trips through overlays, interrupts, and search.
  • Interactive UI behavior should degrade cleanly when the runtime is headless, remote, or viewer-only.

Build Order

  1. Define the host-owned REPL state machine.
  2. Separate transcript data from render state and scroll math.
  3. Add prompt input persistence through overlays and interrupts.
  4. Add background-task navigation and notifications.
  5. Add virtualization for long histories.
  6. Add remote, headless, and viewer-only degradation rules.

Core Invariants

  • The UI renders runtime state; it does not become the only owner of it.
  • Prompt input must survive mode changes and overlays.
  • Interrupt semantics must map to explicit runtime actions.
  • Background work must be inspectable without destroying main-session context.
  • Long-session performance must come from virtualization, not silent truncation of semantic history.

Failure Modes

  • Losing prompt input when entering search, overlays, or teammate views.
  • Treating idle escape, active interrupt, and exit as one key path.
  • Background-task dialogs drifting out of sync with runtime task state.
  • Scroll jumps and
阅读完整来源 ↗