Community程式設計與開發github.com

原型 OpenClaw TUI

建立可拋棄式、基於 fixture 的 OpenClaw Clack 或 Pi TUI 原型,並在 tmux 中並排比較多個互動變體,無需執行完整應用程式或觸碰即時狀態。

原型 OpenClaw TUI 是什麼?

這個技能讓你隔離單一個 OpenClaw 終端表面,使用真實的 OpenClaw TUI 堆疊來渲染它,並在 tmux 中比較兩個到六個設計變體。它會自動讀取專案的 AGENTS.md 檔案、選擇適當的渲染器(Clack 或 Pi TUI),並建立一個包含 fixture 資料的最小化可執行測試工具。支援 `--variant` 參數來切換不同的實作方案,並提供 `--open` 和 `--refresh` 模式,方便在外部終端機或 tmux 工作階段中啟動和更新比較網格。這個技能最適合用於那些需要快速迭代 UI 表面、不想執行完整應用程式或觸碰資料庫、網路請求或設定檔的場景。它強制將原型程式碼視為可拋棄的,且不應直接推送到生產環境。

相容平台~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 TUI 是做什麼的?

使用此技能來隔離一個 OpenClaw 終端表面,以真實的 OpenClaw TUI 堆疊渲染,並在 tmux 中比較二到六個設計變體。

規則

  • 在編輯前,先讀取根目錄和範圍內的 AGENTS.md 檔案。
  • 將原型放在目標旁,並命名為 *.prototype.ts。
  • 在迭代現有表面時,應將其目前的實作作為第一個 baseline 變體,並使用相同的 fixture 資料。僅在使用者明確要求全新比較時才能省略 baseline。
  • 在可行的情況下使用真實的 OpenClaw 渲染器、主題、文案和元件。
  • 將掃描、模型、網路呼叫、安裝、設定寫入、SQLite 和其他持久性副作用取代為確定性的記憶體 fixture。
  • 若隔離的表面已足夠,請勿執行完整 OpenClaw 應用程式。
  • 將原型程式碼視為可拋棄的。請勿直接將其提升至生產環境。
  • 保留不相關且預先存在的工作目錄變更。

選擇渲染器

  • Wizard、 onboarding、設定、 doctor、 selection 或 progress 表面:使用 src/wizard/clack-prompter.ts 中的 createClackPrompter()。
  • Agent shell、 chat、 overlay、 editor、 selector 或 src/tui/** 元件:使用 @earendil-works/pi-tui 和現有的 OpenClaw 元件。

請勿發明一個共用的 Clack/Pi 抽象層。它們是僅透過 tmux 比較迴圈連接的獨立原型配方。

工作流程

  1. 讀取目標模組、其渲染器適配器、呼叫者和相鄰的測試。
  2. 建立一個能到達目標表面的最小化可執行測試工具。
  3. 若表面已存在,使無參數呼叫以其目前的實作不變地渲染為 --variant=baseline。
  4. 在 --variant=<id> 後方加入結構上不同的替代方案,總共包含 baseline 在內共 2 到 6 個變體。
  5. 給予每個變體相同的 fixture 資料和終端機尺寸。
  6. 直接在各自的 tmux 窗格中執行每個變體。請勿透過管道傳遞互動式 TUI 輸出;tmux 必須提供 PTY。
  7. 使用啟動器的 --refresh 模式迭代測試工具。在不重新開啟使用者終端機的情況下,在現有工作階段中替換比較網格。
  8. 使用者選擇方向後,將決策帶入生產程式碼,並搭配正常的測試和驗證。移除或另外擷取原型。

啟動比較網格

執行此 bundled 啟動器,並提供工作階段名稱、儲存庫路徑,然後是標題和指令配對:

.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 在 macOS 上使用使用者的 .command 關聯終端機應用程式,在 WSL 上使用 Windows Terminal,或使用第一個可用的 Linux 啟動器(來自 xdg-terminal-exec、$TERMINAL 和 x-terminal-emulator)。如無支援的啟動器可用,tmux 工作階段將以相等的分離尺寸準備就緒,腳本會印出手動附加指令後成功結束。附加後,執行一次 --refresh 以採用終端機較大的尺寸。相同的指引適用於外部終端機已開啟但未在十秒內附加的情況。當從非互動式 TERM=dumb 環境呼叫時,啟動器會移除其繼承的 NO_COLOR,僅限於原型窗格程序,以便外部終端機可以偵測並渲染其正常顏色。除非使用者要求應用程式內表面,否則請偏好外部終端機而非 Codex 應用程式內終端機。除非要求停止,否則請讓工作階段保持執行以供使用者檢閱。

交接

報告:

  • 原型路徑和確切的執行指令;
  • tmux 工作階段名稱和附加指令;
  • 哪些效果被 fixture 取代;
  • 可用的變體 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.

相關技能