Community编程与开发github.com

小丑鱼云PR

在GitHub Actions中启动小丑鱼时使用,用于从issue/PR引用、ClawSweeper报告、自定义维护者提示创建一个或更新一个受保护的GitHub实现PR,或将现有小丑鱼PR纳入ClawSweeper审核的云自动合并。

小丑鱼云PR 是什么?

此技能使Codex能够指示小丑鱼(Clownfish)在云端创建一个受保护的GitHub PR,输入可以是issue/PR引用加上自定义提示、ClawSweeper报告、或维护者的替换决策。它支持创建单个作业、验证和调度、维护者评论命令以及受ClawSweeper审核的自动合并。小丑鱼使用确定性脚本来安全地写入GitHub,避免Codex workers直接访问令牌。该技能维护了一个全局的合并门控系统(如CLOWNFISH_ALLOW_EXECUTE、CLOWNFISH_ALLOW_MERGE),确保只有在相关仓库变量明确设置为“1”时才执行变异操作。替换PR仅在源分支无法编辑、陈旧、草稿、无法合并或不安全时创建,并且受每个影响区域的最大活动PR数量限制。维护者可以通过/clownfish automerge命令请求自动合并,但只有在ClawSweeper审核通过、所有检查通过、PR可合并且合并门开启时才会实际执行。

兼容平台~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 的新对话。

文档

小丑鱼云PR 是做什么的?

当用户希望Codex请求小丑鱼从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 视为有用的源工作。如果源分支因为不可编辑、过时、仅草稿、不可合并或不安全而无法安全更新,则创建一个狭窄的小丑鱼替换PR,而不是等待。在替换PR正文中保留源PR作者为共同作者,并注明源PR,在替换PR打开后仅关闭该源PR。

worker应输出repair_strategy=replace_uneditable_branch并在source_prs中列出源PR URL。确定执行器打开或更新clownfish/<cluster-id>,将非机器人源PR作者添加为Co-authored-by尾部,并且在替换PR存在后才关闭被取代的源PR。当受影响区域已有CLOWNFISH_MAX_ACTIVE_PRS_PER_AREA个打开的小丑鱼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 ...或@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/*分支的现有小丑鱼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/*分支和作业文件的现有小丑鱼PR:

/clownfish automerge

路由器验证评论者是维护者,添加clownfish:automerge,为当前PR head调度ClawSweeper,并等待受信任的ClawSweeper标记。needs-changes/fix-required调度正常的修复worker。pass、approved或no-changes仅在标记SHA与当前PR head匹配、检查通过、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的head匹配保护固定,因此ClawSweeper审核后的分支推送不能合并未审核的head。如果ClawSweeper通过时任一合并门关闭,小丑鱼仅在准备检查通过后给PR打上clownfish:merge-ready标签;检查失败、head过时、冲突、草稿状态或人工审核标签不应获得该标签。使用/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明确要求,否则不要从小丑鱼合并。
  • 除非Peter明确要求自动合并窗口,否则不要打开CLOWNFISH_ALLOW_AUTOMERGE。
  • 在修复PR路径存在、合并或证明不必要之前,不要关闭重复项。
  • Codex workers不获取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.

相关技能