Community程式設計與開發github.com

clownfish-cloud-pr

當在 GitHub Actions 中啟動 Clownfish 時,用於從 issue/PR 引用、ClawSweeper 報告、自訂維護者提示建立或更新一個受保護的 GitHub 實作 PR,或將現有 Clownfish PR 加入 ClawSweeper 審查的雲端自動合併。

clownfish-cloud-pr 是什麼?

Clownfish Cloud PR 是一項 AI agent 技能,專門用於在 GitHub Actions 中與 Clownfish 機器人互動,以建立、更新或管理受保護的 GitHub 實作 PR。它支援從 issue/PR 引用加上自訂提示、ClawSweeper 報告,或維護者直接提供的指示來建立 PR。此技能也包含進階功能,例如:以 ClawSweeper 審查為基礎的有界自動合併、替換無法編輯的來源 PR、以及透過目標倉庫的評論指令進行互動。其主要平台為 GitHub Actions,並與 openclaw/clownfish 倉庫綁定。工作流程包括使用 npm 指令建立任務、驗證、渲染、提交與分派;此外,維護者可以使用 `/clownfish` 或 `@openclaw-clownfish` 指令觸發修復、重定基底、解釋或停止等操作。自動合併功能受多層防護限制,包括合併閘門變數、頭部 SHA 匹配、檢查狀態與 PR 可合併性,以及 `clownfish:human-review` 標籤等。此技能旨在確保每次變更都經過審慎控制,避免未經授權的合併或安全風險。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/clownfish-cloud-pr

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

在你喜歡的 AI 中提問

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

說明文件

Clownfish Cloud PR

當使用者想要 Codex 要求 Clownfish 從 issue/PR 引用加上自訂提示,在雲端建立一個 PR 時,使用此技能。

開始

cd ~/Projects/clownfish
git status --short --branch
gh variable list --repo openclaw/clownfish --json name,value \
  --jq 'map(select(.name|test("^CLOWNFISH_"))) | sort_by(.name) | .[] | {name,value}'

維持合併受閘門控制,除非 Peter 明確開啟。除非倉庫變數確實是 1,否則執行/修復閘門維持關閉;一般的修復 PR 工作需要一個有意的執行窗口:

gh variable set CLOWNFISH_ALLOW_EXECUTE --repo openclaw/clownfish --body 1
gh variable set CLOWNFISH_ALLOW_FIX_PR --repo openclaw/clownfish --body 1
gh variable set CLOWNFISH_ALLOW_MERGE --repo openclaw/clownfish --body 0
gh variable set CLOWNFISH_ALLOW_AUTOMERGE --repo openclaw/clownfish --body 0

在窗口結束後,將 CLOWNFISH_ALLOW_EXECUTE=0 和 CLOWNFISH_ALLOW_FIX_PR=0 重設。如果那些變數不存在或不是 1,則執行/自主工作流程執行將保持僅計畫/不變更。

建立一個任務

從引用和自訂提示:

npm run create-job -- \
  --repo openclaw/openclaw \
  --refs 123,456 \
  --prompt-file /tmp/clownfish-prompt.md

從 ClawSweeper 報告:

npm run create-job -- \
  --from-report ../clawsweeper/records/openclaw-openclaw/items/123.md

該腳本會在寫入重複任務之前,檢查是否存在已開啟的 PR/內容匹配以及名為 clownfish/<cluster-id> 的遠端分支。使用 --dry-run 檢查確切的任務內容,並僅在確定重複檢查已過時後才使用 --force。

請求替代 PR

此技能可以透過一般的 create-job 和 dispatch 路徑觸發替代 PR 的寫入。將維護者決定放入提示中:

將 #123 視為有用的來源工作。如果由於來源分支無法編輯、過時、僅為草稿、無法合併或不安全而無法安全更新,則建立一個狹義的 Clownfish 替代 PR,而不是等待。保留來源 PR 作者作為共同作者,在替代 PR 內容中註明來源 PR,並僅在替代 PR 開啟後關閉該來源 PR。

工作進程應輸出 repair_strategy=replace_uneditable_branch 並在 source_prs 中列出來源 PR URL。確定性執行器會開啟或更新 clownfish/<cluster-id>,將非機器人的來源 PR 作者新增為 Co-authored-by 尾綴,並僅在替代 PR 存在後才關閉被取代的來源 PR。當受影響區域已有 CLOWNFISH_MAX_ACTIVE_PRS_PER_AREA 個開啟的 Clownfish PR 時,新的替代 PR 會被阻擋。

驗證與分派

npm run validate:job -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md
npm run render -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md --mode autonomous >/tmp/clownfish-rendered-prompt.md
git add jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md
git commit -m "chore: add ClawSweeper promoted job"
git push origin main
npm run dispatch -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md \
  --mode autonomous \
  --runner blacksmith-4vcpu-ubuntu-2404 \
  --execution-runner blacksmith-16vcpu-ubuntu-2404 \
  --model gpt-5.5

在任務提交並推送之前,請勿使用 --dispatch;工作流程從 GitHub 讀取任務路徑。

維護者評論指令

Clownfish 也可以從目標倉庫的評論中被呼叫,但僅限維護者。使用 /clownfish ... 或 @openclaw-clownfish ...;請勿使用 @clownfish,因為那是另一個 GitHub 使用者。

支援的指令:

/clownfish status
/clownfish fix ci
/clownfish address review
/clownfish rebase
/clownfish automerge
/clownfish explain
/clownfish stop
@openclaw-clownfish fix ci

路由器預設接受 OWNER、MEMBER 和 COLLABORATOR 的評論。貢獻者的評論會被忽略,不回覆。修復指令僅對帶有 clownfish 標籤或 clownfish/* 分支的現有 Clownfish PR 派發 cluster-worker.yml。

npm run comment-router -- --repo openclaw/openclaw --lookback-minutes 180
npm run comment-router -- --repo openclaw/openclaw --execute --wait-for-capacity

排程路由保持乾燥,直到在 openclaw/clownfish 倉庫變數中設定 CLOWNFISH_COMMENT_ROUTER_EXECUTE=1。

有界 ClawSweeper 審查的自動合併

僅對映射回 clownfish/* 分支和任務檔案的現有 Clownfish PR 使用此功能:

/clownfish automerge

路由器驗證評論者是維護者,新增 clownfish:automerge,為當前 PR 頭部派發 ClawSweeper,並等待受信任的 ClawSweeper 標記。needs-changes / fix-required 會派發一般的修復工作進程。pass、approved 或 no-changes 僅在標記 SHA 與當前 PR 頭部匹配、檢查通過、GitHub 顯示 PR 可合併、沒有 clownfish:human-review 標籤,且合併閘門都開啟時才可能合併:

gh variable set CLOWNFISH_ALLOW_MERGE --repo openclaw/clownfish --body 1
gh variable set CLOWNFISH_ALLOW_AUTOMERGE --repo openclaw/clownfish --body 1

實際的合併指令會與 GitHub 的頭部匹配保護鎖定,因此在 ClawSweeper 審查後的分支推送無法合未經審查的頭部。如果在 ClawSweeper 通過時任一個合併閘門關閉,Clownfish 僅在就緒檢查通過後才為 PR 標記 clownfish:merge-ready;未通過的檢查、過時的頭部、衝突、草稿狀態或人工審查標籤不得獲得該標籤。使用 /clownfish stop 暫停,這會新增 clownfish:human-review。

修復迴圈由 CLOWNFISH_CLAWSWEEPER_MAX_REPAIRS_PER_PR(預設 5)和 CLOWNFISH_CLAWSWEEPER_MAX_REPAIRS_PER_HEAD(預設 1)限制。

防護措施

  • 一個叢集,一個分支,一個 PR:clownfish/<cluster-id>。
  • 無安全敏感工作。
  • 新的替代 PR 按受影響區域由 CLOWNFISH_MAX_ACTIVE_PRS_PER_AREA 限制。
  • 除非 Peter 明確要求,否則不從 Clownfish 合併。
  • 除非 Peter 明確要求自動合併窗口,否則不開啟 CLOWNFISH_ALLOW_AUTOMERGE。
  • 在修復 PR 路徑存在、落地或被證明不必要之前,不關閉重複項。
  • Codex 工作進程不獲取 GitHub 令牌;確定性腳本擁有寫入權限。

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.

相關技能