Community程式設計與開發github.com

OpenClaw Docker E2E 編寫

編寫 OpenClaw Docker 端到端測試及即時提供者 Docker 測試案例。

OpenClaw Docker E2E 編寫 是什麼?

此技能用於在 OpenClaw 專案中新增或修改 Docker 端到端 (E2E) 測試案例、發布路徑 Docker 測試或即時提供者 Docker 驗證。它提供了在確定性測試 (使用偽造的相依性/伺服器) 與即時測試 (使用真實提供者憑證) 之間選擇的指引,並在兩者能證明不同風險時鼓勵並行使用。技能強制要求相關檔案應放在 `test/helpers` 或 `scripts/e2e/lib/<lane>/` 目錄下,偽造伺服器須以 JSONL 格式記錄邊界請求,客戶端須驗證實際相依性負載,而非僅檢查處理成功。對於媒體與視覺相關測試,期望的答案應僅存在於像素或提供者輸出中,並使用中性檔案名稱與提示。最後,技能提供了具體的驗證命令,例如執行 `pnpm exec oxfmt`、`node --check` 及特定的測試腳本,並要求在確定性測試通過後再執行即時提供者測試。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/openclaw-docker-e2e-authoring

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

在你喜歡的 AI 中提問

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

說明文件

OpenClaw Docker 端到端編寫

當需要新增或修改 Docker 端到端測試案例、發布路徑 Docker 測試或即時提供者 Docker 驗證時使用此技能。

測試案例選擇

  • 確定性 Docker:偽造相依性/伺服器,並斷言跨越邊界的確切執行時期合約。
  • 即時 Docker:僅在使用者可見的行為需要真實服務時,才使用真實提供者憑證/模型。
  • 當兩者能證明不同的風險時,優先同時使用:確定性測試用於位元組/負載路由,即時測試用於實際提供者行為。

編寫規則

  • 僅供測試使用的輔助函式應放在 test/helpers 或 scripts/e2e/lib/<lane>/ 目錄下,除非正式產品會匯入它們,否則不應放在 src/** 中。
  • 透過套件安裝的應用程式從 /app 執行;僅以唯讀方式掛載明確的測試框架/輔助路徑。
  • 偽造伺服器應以 JSONL 格式記錄邊界請求,客戶端應斷言真正的相依性負載,而不僅僅是處理成功。
  • 在同一項變更中同時新增套件腳本和 scripts/lib/docker-e2e-scenarios.mjs 中的測試案例。
  • 如果某個測試案例從 npm 安裝外掛,請透過環境變數設定預設規格,以便同時可測試已發布和本機覆蓋路徑。

媒體與視覺

  • 預期答案必須僅存在於正在測試的像素或提供者輸出中。
  • 使用中性檔案名稱、中性提示,且無中繼資料外洩。
  • 隨機點陣圖/OCR 權杖重複使用儲存庫中的 OCR 安全字母表 24567ACEF,除非測試擁有更強的字形集。
  • 當要證明真實影像理解時,每次執行都應讓預期答案唯一。

chat.send 端到端測試

  • 要求 chat.send 回傳 status: "started" 和一個字串型別的 runId。
  • 使用 agent.wait 等待完成。
  • 當事件順序不是測試中的行為時,透過 chat.history 斷言最終使用者可見的文字。
  • 僅在錯誤路徑需要佇列的入站/頻道上下文時,保留原始頻道/帳戶中繼資料。

驗證

執行涵蓋所修改測試案例的最小驗證:

pnpm exec oxfmt --write <changed files>
node --check <new .mjs files>
nash -n <new .sh files>
node scripts/run-vitest.mjs test/scripts/docker-e2e-plan.test.ts
OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:<lane>

對於即時提供者測試案例,請在確定性 Docker 測試通過後,執行對應的即時 Docker 腳本。在提交或建立 PR 之前,使用 $autoreview 完成。

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.

相關技能