Community编程与开发github.com

原型-OpenClaw-终端UI

构建一次性的、基于夹具驱动的 OpenClaw Clack 或 Pi 终端UI原型,并在 tmux 中并排比较多个交互变体,而无需运行完整应用或接触实时状态。

原型-OpenClaw-终端UI 是什么?

此原型技能的目标是加速 OpenClaw 终端 UI 的迭代和验证过程。它允许开发者隔离出一个特定的终端界面(如引导流程、配置面板或聊天界面),使用真实的 OpenClaw 渲染栈(包括 Clack 提示器和 Pi-TUI 组件),并将渲染结果放入 tmux 窗格中。开发者可以快速创建两到六个不同的设计变体,每个变体都使用相同的输入数据(夹具),从而并排比较它们的外观和交互方式,而无需启动整个应用程序或处理网络调用、数据库等副作用。该技能强调原型代码是一次性的,绝不会直接用于生产。它通过一个启动脚本管理 tmux 会话,支持 --open 创建新会话和 --refresh 替换现有会话中的窗格,从而保持迭代流程的流畅性。整个过程确保不会干扰开发者的现有工作区,并在原型完成后指导开发者将选定的设计决策迁移到生产代码中。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/prototype-openclaw-tui

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

原型-OpenClaw-终端UI 是做什么的?

使用这个技能来隔离一个 OpenClaw 终端界面,用真实的 OpenClaw TUI 栈渲染它,并在 tmux 中比较两个到六个设计变体。

规则

  • 在编辑之前,请先阅读根目录和作用域内的 AGENTS.md 文件。
  • 将原型文件放在目标文件旁边,并命名为 *.prototype.ts。
  • 当对现有界面进行迭代时,将该界面的当前实现作为第一个 baseline 变体,并使用相同的夹具数据。只有当用户明确要求进行全新比较时,才省略基线。
  • 在实际可行的情况下,使用真实的 OpenClaw 渲染器、主题、文案和组件。
  • 将扫描、模型、网络调用、安装、配置写入、SQLite 和其他持久性副作用替换为确定性的内存夹具。
  • 当隔离界面足够时,不要运行完整的 OpenClaw 应用程序。
  • 将原型代码视为一次性代码。不要直接将其提升到生产环境。
  • 保留不相关和预先存在的工作区更改。

选择渲染器

  • 向导、上手引导、配置、诊断、选择或进度界面:使用 src/wizard/clack-prompter.ts 中的 createClackPrompter()。
  • 代理 shell、聊天、覆盖层、编辑器、选择器或 src/tui/** 组件:使用 @earendil-works/pi-tui 和现有的 OpenClaw 组件。

不要发明共享的 Clack/Pi 抽象。它们是独立的原型配方,仅通过 tmux 比较循环连接。

工作流程

  1. 阅读目标模块、其渲染器适配器、调用者和相邻的测试。
  2. 创建最小的可执行测试工具,以到达目标界面。
  3. 如果界面已存在,请让无参数调用渲染其当前实现为 --variant=baseline,且保持不变。
  4. 在 --variant=<id> 后面添加结构上不同的替代方案,总共包括基线在内的两个到六个变体。
  5. 为每个变体提供相同的夹具数据和终端尺寸。
  6. 直接在各自的 tmux 窗格中运行每个变体。不要通过管道传输交互式 TUI 输出;tmux 必须提供 PTY。
  7. 使用启动器的 --refresh 模式对测试工具进行迭代。替换现有会话中的比较网格,而无需重新打开用户的终端。
  8. 在用户选定方向后,将该决策带入生产代码中,并进行正常的测试和验证。删除或单独捕获原型。

启动比较网格

运行捆绑的启动器,需要提供会话名称、存储库路径,然后是标题和命令对:

.agents/skills/prototype-openclaw-tui/scripts/launch-tmux-grid.sh \
  --open \
  app-recommendations-prototype "$PWD" \
  "A - Baseline" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=baseline" \
  "B - Grouped" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=grouped" \
  "C - Focused" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=focused"

编辑原型后,使用 --refresh 而不是 --open 运行相同的命令。这会保留 tmux 会话和已连接的外部终端。启动器会构建一个替换窗口和网格,然后移除旧窗口及其窗格。窗口和窗格 ID 会发生变化,旧窗格中的命令会停止:

.agents/skills/prototype-openclaw-tui/scripts/launch-tmux-grid.sh \
  --refresh \
  app-recommendations-prototype "$PWD" \
  "A - Baseline" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=baseline" \
  "B - Grouped" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=grouped" \
  "C - Focused" "node --import tsx src/wizard/setup.app-recommendations.prototype.ts --variant=focused"

除非明确提供 --refresh,否则启动器拒绝替换现有会话。--open 使用用户与 .command 关联的终端应用(在 macOS 上)、WSL 中的 Windows 终端,或第一个可用的 Linux 启动器(来自 xdg-terminal-exec、$TERMINAL 和 x-terminal-emulator)。如果没有可用的启动器,tmux 会话会以相等的分离尺寸保持就绪,脚本在打印手动连接命令后成功退出。连接后,运行一次 --refresh 以采用终端的更大尺寸。如果外部终端打开但在十秒内未连接,也适用相同的指导。当从非交互式 TERM=dumb 环境中调用时,启动器只从原型窗格进程中移除其继承的 NO_COLOR,以便外部终端可以检测并渲染其正常颜色。优先使用外部终端而非 Codex 应用内终端,除非用户要求使用应用内界面。让会话保持运行以供用户查看,除非要求停止。

交接

报告:

  • 原型路径和确切的运行命令;
  • tmux 会话名称和连接命令;
  • 哪些效果已被替换为夹具;
  • 可用的变体 ID;
  • 原型是否更改了生产代码(通常不会)。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能