Community程式設計與開發github.com

控制 UI

操作 OpenClaw 控制 UI 並進行故障排除:導航已連接的客戶端、組織工作階段、建置工作階段儀表板,以及處理直接或經由 Tailscale 代管的閘道器。

控制 UI 是什麼?

此技能提供專門工具,用於管理 OpenClaw 的「控制 UI」——這是一個可讓開發者與其 AI 代理工作階段、儀表板及連接的客戶端進行互動的基於瀏覽器的介面。其主要用途是導航工作階段(使用 `sessions_list`、`sessions`)、組織工作階段版面(使用 `screen`),以及使用 `dashboard` 和 `show_widget` 等工具建置工作階段特定的儀表板。此技能的關鍵智慧在於其精確的職責分離:不同的操作應使用其對應的專門工具,而非通用 shell 命令或原始 Gateway RPC 呼叫。支援的平台包括透過 Tailscale 或 HTTPS 代理直接存取的執行個體。該技能遵循安全的「先讀取、後變更」工作流程,指定了初始步驟,例如確認目標工作階段與連線類型。它提供詳細的程序,用於從頭建置儀表板、使用 `widget_move` 和 `widget_resize` 等命令對儀表板進行版面配置,以及在不中斷現有架構的情況下進行更新。它也處理復原程序,用於修復因 Gateway 重新啟動、CORS 問題或跨來源策略而中斷的空白或過時小工具。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/control-ui

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

控制 UI 是做什麼的?

使用 OpenClaw 的型別化 UI 工具來管理狀態與版面。僅在需要檢查或與渲染像素互動時,才使用瀏覽器自動化。

心智模型

  • 側邊欄項目是一個工作階段,而非儀表板頁面。
  • 每個工作階段擁有一個面板。該面板包含分頁與小工具。
  • 固定工作階段會讓它保留在側邊欄中。已儲存面板的工作階段會出現在 /dashboards 圖庫中。
  • screen 會變更已連接控制 UI 的版面與導航。它不會讀取頁面或擷取螢幕截圖。
  • sessions_list 尋找工作階段。sessions 用於重新命名、分組、固定或封存工作階段。它不會編輯面板內容。
  • dashboard 讀取並編排目前工作階段的面板與已註冊外掛小工具。show_widget 用於編寫或更新自訂 HTML/SVG 小工具。

當型別化工具存在時,請勿以 shell 呼叫或原始 Gateway RPC 取代這些操作。

安全啟動

  1. 識別目標工作階段,並判斷控制 UI 是本地/直接連線,還是透過 Tailscale 或其他 HTTPS 代理發布。
    • 如果使用者想要一個專屬的側邊欄儀表板,請在編寫任何小工具之前,選擇或建立其可見的工作階段。分頁僅是單一工作階段面板內的一個分隔區;它絕不會建立側邊欄列。
    • 如果目前的回合正在臨時或父工作階段中執行,請先將儀表板任務移交給預期的可見工作階段。面板小工具以工作階段為鍵,且事後無法移動到其他工作階段。
  2. 在變更狀態之前,先讀取目前狀態:
    • 使用 sessions_list 來解析工作階段;
    • 使用 dashboard 搭配 action: "read" 來讀取目前工作階段;
    • 檢查現有分頁、穩定的 widget 名稱、擁有者、大小及面板版面。
  3. 如果任務針對另一個工作階段的面板,請將工作移至該工作階段。儀表板工具特意只對目前工作階段操作。

在開啟或修復遠端控制 UI 之前,請先閱讀 hosting.md。 在建立或重組面板之前,請先閱讀 dashboards.md。 對於需要保留例外的大量工作階段封存,請使用 工作階段封存清理。 小工具組合、函式庫、互動式程式碼說明及儀表板內容,請使用 visualize 技能。工作階段與面板的組織作業保留在此處。

導航與編排 UI

使用 screen 執行直接客戶端命令:

  • navigate 以 sessionKey 開啟工作階段;
  • sidebar_show / sidebar_hide 控制工作階段側邊欄;
  • split_right / split_down、focus 和 close_pane 用於窗格;
  • terminal_show / terminal_hide 和 browser_show / browser_hide 用於停靠面板。

screens 會廣播給每個宣稱支援 UI 命令的已連接控制 UI;它無法選擇特定的瀏覽器分頁。在發送命令之前,請先檢查哪些客戶端已連接。如果它回報沒有可用的客戶端,請要求使用者開啟控制 UI 並重試。

當任務需要 DOM 檢查、點擊、輸入或螢幕截圖時,請使用應用程式內建瀏覽器或可用的瀏覽器控制工具。盡可能重複使用已登入的控制 UI 分頁。

建置工作階段儀表板

  1. 呼叫 dashboard read。重複使用合適的分頁與 widget 名稱。
  2. 使用 tab_create / tab_update 建立或重新命名分頁;使用簡短的小寫 slug ID。
  3. 使用正確的擁有者新增內容:
    • 原生文字、指標、表格、圖表及連結:使用 show_widget 搭配 pin: true 及 report;
    • 自包含的自訂 HTML/SVG 或已註冊來源的內容:使用 show_widget 搭配 pin: true;
    • 信任的外掛小工具:使用 dashboard widget_put 搭配已公告的 pluginKind。 請勿在 show_widget 內將 Grafana 或其他外部應用程式嵌入 <iframe> 中;小工具沙箱會拒絕子框架 URL 及導航。請使用一般的使用者點擊連結來開啟應用程式,透過宣告的 capabilities.netOrigins 獲取確切的 HTTPS API,使用 Gateway 資料繫結,或改為安裝/使用信任的外掛小工具。
  4. 呼叫 show_widget 時使用穩定的 name。以新的 widget_code 重複使用相同的 name,會就地更新小工具。
  5. 使用 widget_move、widget_resize 及分頁重新排序來編排。優先使用大小預設值與面板順序,而非精確的像素位置。
  6. 當工作階段需要保持顯眼時,使用 sessions patch 將其固定。
  7. 呼叫 dashboard focus_tab 以在儀表板側面板中顯示預期的分頁。如果沒有連接控制 UI,命令會回報「無法使用」;請讓使用者開啟工作階段並重試。
  8. 在聚焦分頁後選擇簡報。使用 set_presentation 搭配 presentation: "expanded" 可展開儀表板;"split" 則在目前的窗格版面中將其並排在對話旁。使用者可以使用「展開側面板」來取得全寬儀表板,「收合」則讓對話重新出現,或關閉面板僅保留對話。

切勿為儀表板建立虛假的頂層頁面。對於專屬儀表板,請使用專屬的工作階段,固定該工作階段,並從其內部建置其面板。

在不中斷面板的情況下更新

  • 先讀取,然後變更最小的單元。
  • 除非是刻意的替換,否則請保持穩定的分頁 ID 與 widget 名稱。
  • 不要就地變更 widget 的內容擁有者。請將其移除,然後以新的擁有者或已註冊的種類重新建立。
  • 權限授予是綁定到確切的小工具位元組與修訂版的。變更內容可能需要再次核准。
  • 重設對話會保留其面板。刪除工作階段則會刪除面板。

驗證結果

使用兩層驗證:

  1. 狀態: dashboard read 顯示預期的分頁、小工具、名稱、擁有者、順序及大小;sessions_list 顯示預期的工作階段中繼資料。
  2. 渲染的 UI: 開啟實際的控制 UI,確認正確的工作階段與儀表板面板,然後檢查或擷取 widget 框架的螢幕截圖。測試任何重要的控制項。

Shell 或 widget 路由的 HTTP 200 僅是傳輸層的驗證,而非視覺上的驗證。在沙箱框架渲染完畢之前,請勿宣稱儀表板正常運作。 對於擷取即時資料的小工具,請從渲染的框架中執行該擷取動作。主機端的 curl 無法證明瀏覽器已收到必要的權限授予,或已接納端點的 CORS 與混合內容政策。 如果沒有可用的瀏覽器控制或已連接客戶端的檢查能力,請將儀表板回報為「已發布但未經視覺驗證」,而非宣稱成功。

復原順序

當小工具空白或過時時:

  1. 使用 dashboard read 確認預期的工作階段、分頁、widget 名稱及修訂版;
  2. 使用 hosting.md 分類代管路徑;
  3. 驗證控制 UI 的來源、獨立 widget 沙箱的來源,以及每個反向代理躍點上使用的協定;
  4. 如果 widget JavaScript 回報 Failed to fetch,請驗證其確切的 HTTPS 來源已宣告並授予在 capabilities.netOrigins 中,然後檢查瀏覽器 CORS 與混合內容錯誤;
  5. 在 Gateway 重新啟動或路由變更後,重新發布/更新小工具,以便瀏覽器收到新的票證式框架 URL;
  6. 重新載入控制 UI 並驗證渲染的框架,而不僅是路由的狀態。

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.

相關技能