Community程式設計與開發github.com

雲端工作者映像檔烘焙

使用 crabbox 與一行設定指令,烘焙、選擇、驗證並安全回收雲端工作者映像檔。

雲端工作者映像檔烘焙 是什麼?

此技能(cloud-image-bake)定義了一個可重複且安全的流程,用於烘焙(建立)雲端工作者映像檔,包括選擇、驗證與淘汰,並依賴 crabbox 和 openclaw 工具。其主要目標是防止機密資料外洩(從不輸出或持久化密鑰)、避免手動編輯設定檔(強制透過 openclaw config 進行設定變更),並確保每次執行都以可觀察的驗證結果結束,或在無法驗證時提供完整說明。技能支援 AWS、Hetzner 與 Firecracker 等後端,每個後端都採用特定的快照與映像檔管理流程:AWS 透過 crabbox image promote 進行映像檔選擇,Hetzner 使用 hcloud 指令手動管理,而 Firecracker 則需重新建置 rootfs 範本。流程包含五個步驟:收集現有設定、透過租用實例與安裝工具進行變更、修復(透過 doctor 檢查設定)、驗證(租用新映像檔並測試工具)、以及報告結果並安全刪除舊映像檔(需操作人員明確確認)。重點在於映像檔選擇必須僅透過驗證的設定寫入進行,且舊映像檔必須保留至驗證通過,確保流程具備可逆性與安全性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/custodian-skills/cloud-image-bake

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

在你喜歡的 AI 中提問

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

說明文件

烘焙雲端工作者映像檔

絕對不要輸出或持久化機密值;提供者憑證應保留在其存放區。不得手動編輯磁碟上的設定檔——設定檔的變更必須透過 openclaw config 進行。每次執行都必須以可觀測的驗證結果或無法驗證的確切原因結尾。快照很便宜,但不受管理的快照散佈則不然。未經操作人員明確確認,不得刪除提供者映像檔。

收集

openclaw config get cloudWorkers --json
crabbox config show --json
crabbox doctor --provider <backend> --json
crabbox checkpoint list --json

記錄目前的提供者、類別、映像檔選擇、設定指令,以及被取代的映像檔 ID。確認所需的工具與無機密的烘焙來源。

變更

從當前設定檔租用執行個體,安裝並冒煙測試工具:

crabbox warmup --provider <backend> --class <class> --keep --timing-json
crabbox run --provider <backend> --id <lease> --no-sync -- bash -lc '<install commands> && <tool> --version'

各後端的快照方式:

  • AWS:crabbox checkpoint create --provider aws --id <lease> --mode native --strategy image --wait,檢查後使用 crabbox image promote <ami-id> 並搭配對應的範圍。AWS 映像檔選擇由 promote 目錄管理。
  • Hetzner:hcloud image create --type snapshot --server <server-id> --description <name>;Hetzner 目前尚無 crabbox create/promote 的生命週期,因此需明確記錄快照 ID。
  • Firecracker:透過主機的範本管線重建並重新發布 rootfs 範本;不得以快照執行中的 microVM 作為替代方案。

僅能透過經過驗證的設定檔寫入將設定檔指向新的選擇——先確認確切的 key,進行乾執行,再寫入(以某個具有 image 欄位的後端設定為例):

openclaw config schema --json | jq '.properties.cloudWorkers'
openclaw config set cloudWorkers.profiles.<profile>.settings.<imageKey> "<image-id>" --dry-run
openclaw config set cloudWorkers.profiles.<profile>.settings.<imageKey> "<image-id>"

捆綁的 crabbox 設定檔目前沒有 image 設定 key——AWS 選擇存在於 crabbox image promote 中;絕對不要自行發明一個設定欄位。在驗證通過之前,保留舊映像檔。

修復

openclaw doctor --lint
crabbox doctor --provider <backend> --json

doctor --lint 可能因發現問題而回傳結束碼 1:請閱讀報告並繼續執行其餘檢查。一般的 doctor 和 doctor --non-interactive 可能會寫入設定或狀態;在核准之前,請勿使用它們進行診斷。僅在明確核准後,才套用 openclaw doctor --fix --non-interactive,然後重新讀取設定檔與提供者庫存。

驗證

從新映像檔租用一次執行個體,並確認烘焙的工具存在且執行快速:

crabbox warmup --provider <backend> --class <class> --timing-json
crabbox run --provider <backend> --id <lease> --no-sync -- bash -lc '<tool> --version'
crabbox stop --provider <backend> --id <lease>

記錄暖機總時間,並與烘焙前的時間進行比對。接著確認 OpenClaw 路徑端到端:從用戶端(Cloud 目的地)向該設定檔發送一個工作階段,並確認放置作業已達到 active 狀態。如果任何步驟失敗,請回退映像檔選擇,並報告確切的阻礙因素。

報告

報告設定檔、後端、新舊映像檔 ID、工具冒煙測試結果、暖機前後的計時資料,以及回退狀態。僅在驗證成功後,顯示確切的刪除目標並取得操作人員的明確確認,然後僅刪除該被取代的快照(crabbox image delete <id> 或 hcloud image delete <id>)並確認其已消失。若未確認,則保留原樣,並報告尚有清理作業待執行。

其他參考資料:https://docs.openclaw.ai/gateway/cloud-workers

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.

相關技能