merge-gate

merge-gate is a skill for Claude Code, Codex from zts212653/clowder-ai. It costs 46 tokens per session (15,372 once invoked), scanned C, original, MIT.

A merge checklist that decides how much review and testing a change needs before it is added to the main code branch. It routes changes by risks such as behavior, data, security, contracts, and irreversible effects.

In plain words
What is it for?
Use it to choose targeted or full checks, record validation results, gather independent reviews, and merge pull requests safely.
Why use it?
It prevents every pull request from receiving the same costly checks, while ensuring higher-risk changes get stronger evidence and independent review.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is # 等价于 bash scripts/pre-merge-check.sh.

Good fit Use it to choose targeted or full checks, record validation results, gather independent reviews, and merge pull requests safely.

Compare 6 skills from other repositories ↓
About the project

Clowder AI is a self-hosted workspace where AI agents from different model families work together as a persistent team, retaining identities, shared evidence, and memory across tasks. It is for people who want to coordinate multiple AI agents without repeatedly rebuilding their context.

zts212653/clowder-ai · 2,956 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/zts212653/clowder-ai
agentmods
npx agentmods add skills/zts212653/clowder-ai/merge-gate

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for merge-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/zts212653/clowder-ai/merge-gate/github.svg)](https://agentmods.dev/skills/zts212653/clowder-ai/merge-gate)
Your own site
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/merge-gate"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/merge-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for merge-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/merge-gate"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/merge-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 15,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 83
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 592
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.15372
Opus 5 $0.00023 $0.07686
Sonnet 5 $0.00009 $0.03074
Haiku 4.5 $0.00005 $0.01537

Measured 5d ago against content hash 07c5a3fe3638, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

merge-gate scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$sandbox"
cat-cafe-skills/merge-gate/SKILL.md · 708 lines

How it starts

The opening of the file, as written. The whole thing — 708 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge Gate

SOP definition: sop-definitions/development.yaml stage merge

合入 main 的流程:先锁定风险档、验证命令与独立 review source,再执行对应门禁。PR 是载体,不是自动触发 local + cloud + guardian 三连的理由。

Lane 0:Co-Creation Docs PR

先检查是否已有成功的 pnpm classify:co-creation-docs 证据,且输出同时满足:

  • lane=co_creation_docs
  • delivery=pull_request
  • changed files 与 PR diff 完全一致

满足时,直接消费 classifier 的 validation / cloudReview / fullGate 结论:

  1. 跑 classifier 返回的全部 validation 命令 + git diff --check
  2. 新实质内容需要非作者内容 review;已有内容 verdict 或可证明机械合并用 continuityProof 复用,不为 SHA 字符串变化重开 reviewer。
  3. cloudReview=required 才触发 cloud;skip 时在 PR 留 classifier 原因。家规 / SOP / skill 纯文字通常由有状态 local reviewer 覆盖治理语义,不把“免 cloud”当需要申请的特权。
  4. fullGate=required 才跑 pnpm gateskip 时 evidence manifest 记录 docs validation 命令。
  5. evidence 闭合后由在场 merge owner 执行 gh pr merge --squash;不再额外召唤一只猫只为按 merge 按钮。无 F 号时跳过 Feature Doc Truth post-merge sync。

任一 changed file 不匹配、classifier 缺失/失败或输出 lane=regular_development → 退出本节,走下方风险路由。行数不能作为 Lane 0 证据。

核心知识

Risk-Routed Merge 门禁 5 条(全部满足才能合入)

  1. PR body 写清五轴风险判断:行为面 / 数据 / 安全 / 契约 / 不可逆;默认最小安全动作,升档理由可查。
  2. 至少一个非作者独立 review source(local 或 cloud)有明确 verdict;仅在不同高风险面需要不同视角时叠加,愿景守护另按 feature-close 触发。
  3. 所有 P1/P2 已修复,并由提出 finding 的活跃 source 覆盖当前 HEAD(含 Harness Diet Rebase Continuity 的 continuityProof 桥接)。
  4. 适用的 feature / BACKLOG 真相源没有过度声称,PR 载体与 changed files 匹配。
  5. 与风险匹配的 gate 全绿:低 / 中风险用 targeted commands;安全、鉴权、生产数据、迁移、外部契约或不可逆风险用 pnpm gate 全量。

默认只选一个合适的独立 source:家里语境与治理语义优先 local;context-blind 安全 / 契约代码扫描优先 cloud。动作类型(“开了 PR”“改了代码”)不是叠加理由。

Review Continuity Guard(review 是否真的覆盖当前 HEAD)

pnpm gate、rebase、fixup、biome 格式化刷新等都可能让 HEAD 变化。HEAD 变化只触发 provenance 判定,不自动等于 re-review:先分清 review 后是否真的改了本 PR 的内容、base 前进是否与本 PR 有逻辑关联;两者都没有,或只有可机械证明的派生物重建 / 规范化,旧 review 用 continuityProof 桥接。只有真实的作者 delta 或相关 base delta 回 active source,而且只看那一小块。

昂贵 gate 连续性(ROI 硬边界):一次 full gate 绑定“作者 patch + gate 开始时冻结的 base”,而不是绑定会继续移动的 origin/main 字符串。full gate 已完整通过后,若后续只是纯 rebase、作者 patch 不变或 patch-equivalent,且 C2 证明 base 增量无关联,则 rebase 后只跑风险匹配的 targeted continuity checks;禁止仅因 main 又前进而重跑 full gate。上一轮 full gate 未完整通过只会使旧 receipt 不可复用,不会单独把本来属于 targeted 的改动升级为 fullpnpm gate 会在冻结 base 后从 Git diff、既有 terminal/stage receipt 与失败输出尾部自动选择车道:只有作者实质 delta、相关或无法判定的 base delta、冲突中的语义取舍、相关旧失败,或真实高风险面才重新运行 full gate。机器判为 targeted 时,命令会在申请 full-gate 资源前退出;必须另行刷新受影响检查与全仓跨包 typecheck,并把命令写进 evidence manifest。classifier 只选车道,不代替这些绿色证据。

Read the full file on GitHub · 708 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · -34 lines 07c5a3fe3638
  2. 6d ago Changed · +3 lines 2385abe37fc5
  3. 10d ago First seen · 739 lines · 46 tokens per session scan C 540ca0325178

Subscribe to this mod's changes

merge-gate is a skill published in the GitHub repository zts212653/clowder-ai (2,956 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 15,372 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories