quality-gate

quality-gate is a skill for Claude Code, Codex from zts212653/clowder-ai. It costs 80 tokens per session (5,863 once invoked), scanned A, original, MIT.

A development self-check process that compares finished work with the original request, its written requirements, and verification results.

In plain words
What is it for?
Use it before presenting a feature as finished or sending it for review, especially when you need a written compliance and risk report.
Why use it?
It helps catch missing requirements and prevents claiming that work is complete without fresh evidence from relevant checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is - 检查 CloseGateReport 是否已生成(schema: `../.cat-cafe-shared-refs/close-gate.md`).

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,894 stars · on GitHub

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 quality-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/zts212653/clowder-ai/quality-gate.svg)](https://agentmods.dev/skills/zts212653/clowder-ai/quality-gate)
Your own site
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/quality-gate"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/quality-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00080 $0.05863
Opus 5 $0.00040 $0.02932
Sonnet 5 $0.00016 $0.01173
Haiku 4.5 $0.00008 $0.00586

Measured 6d ago against content hash 0717b434ed74, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

quality-gate scanned grade A 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- 若会话在 `cat-cafe-runtime`,先探活:`curl -sf http://localhost:3004/health`
cat-cafe-skills/quality-gate/SKILL.md · 297 lines

How it starts

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

SOP 位置: 本 skill 是 sop-definitions/development.yaml stage quality_gate 的执行细节。 SOP definition: sop-definitions/development.yaml stage quality_gate。 这是按需自检车道,不绑定固定上一步 / 下一步;完成后把证据交给实际选择的独立验证源或交付载体。

Quality Gate

完成声明前做两件事:对照真实需求自检,并用与风险面匹配的真实命令输出证明声明。

核心知识

两条铁律合一

  1. Spec alignment(来自 spec-compliance-check):AC 可能写偏,先回读原始需求,再逐项验收
  2. Evidence before claims(来自 verification-before-completion):没有运行命令、没看到输出,就不能说"通过了"

铁律:NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE

自问:"我是这次真的运行了命令并看到输出,还是我只是相信它能工作?"

为什么 AC 可能不够:AC 是人写的,可能遗漏 UX 要求或场景覆盖。F041 教训:AC 全打勾,但operator的原始需求(能力显示描述、多项目管理)根本没进 AC——spec compliance check 检查了 AC,但 AC 本身就是错的。

流程

BEFORE 声称完成 / 提 review:

Step 0: VISION CHECK(愿景核对)
  ① 找原始 Discussion/Interview 文档(operator experience在里面)
  ② 读核心痛点:"我要..."、"我不想..."
  ③ 问自己:operator坐在 Hub 前用这个功能,体验是什么样的?
  ④ AC 是否完整覆盖了operator的原始需求?
     → 如有遗漏,先补 AC 再继续

Step 0.5: DELIVERY COMPLETENESS CHECK
  ① 这次交付的是完整 feat 还是 feat 的一部分?
     → 完整 feat:继续
     → 部分:有operator明确同意分批交付的记录吗?没有就继续做完
  ② 本次产出后续需要"重写"还是"扩展"?
     → 扩展:通过
     → 重写:如果是已标注 Spike 且有结论,通过;否则不通过,回去重做

Step 1: FIND — 找 spec/plan 文档
  - the active feature spec or implementation plan
  - 同时找 Discussion/Interview(operator experience所在)

Step 2: CREATE — 建检查清单
  - 列出每一个 AC / 功能点 / 边界条件
  - 列出 Discussion 里的 UX 描述和场景

Step 2.5: CLOSE GATE MATRIX + FOLLOW-UP TAIL SCAN(F177 Phase A)🔴
  - 检查 CloseGateReport 是否已生成(schema: `../.cat-cafe-shared-refs/close-gate.md`)
  - 每个 unmet AC 是否三选一处置(immediate / delete / cvo_signoff)
  - **Follow-up tail scan**:扫以下文本来源,命中关键词 = **线索(进入语义判定),不是自动 BLOCKED**——判定标准只有一条:该词是否在把 **unmet AC 包装成已完成 / 偷偷延期**(close 借口)。正常阶段描述("X 属 next phase 的 scope")、风险讨论、路线图引用不触发(2026-07-15 修订:raw keyword 自动 BLOCK 误杀正常文本):
    - 来源:close report、PR body、commit messages、spec 中 AC 注释、review 反馈回复
    - 线索关键词(不区分大小写;仅用于定位待语义检查处):
      `follow-up` `followup` `deferred` `next phase` `next PR` `P2` `stub` `TD`
      `后续` `留个尾巴` `先这样` `下次一定` `回头` `以后再` `will address later`
      `out of scope`(作为 close 借口时)`MVP 先上`(作为 close 借口时)
    - 豁免:spec 的 Why/Risk/History 章节中引用历史上下文时使用这些词不触发
  - cvo_signoff 四件套完整性验证(proposal + cvo message + quote + scope)
  - 🔴 **47 盲审规则**(F177 Phase B):若 PR 作者是 opus-47,quality-gate 必须由对家猫执行(Maine Coon优先,46 兜底)。审核者由 reviewer/系统指定,47 无选择权,47 的自评不计入放行判据
  - 🔴 **hotfix 自检禁止**(F177 Phase E):执行 `node scripts/check-hotfix-pattern.mjs`,若检测到 hotfix 模式,作者不得自行通过 quality-gate——必须由另一只猫执行 quality-gate。原因:hotfix 心态容易自我说服"够用了",跨猫审视打破惯性
  - 🔴 **Ragdoll search→Read 检查**(F177 Phase F):若执行者是Ragdoll家族(46 / 47 / 4.5 / Sonnet),检查本次 session 的 search 行为:
    1. 有 `search_evidence` 调用命中 doc anchor(高/中置信度)吗?
    2. 命中后有对应的 `Read` 调用去读源文件吗?
    3. 输出中包含精确数字/版本号/日期但没有 Read 证据吗?
    → 三条件同时满足 = **BLOCKED**:"这个精确结论你 Read 源文件了吗?摘要是索引不是答案。"
    → 豁免:架构方案/假设性讨论(不含精确数字的推理不触发);通过 Grep/LSP 获取的精确信息不触发
  - 🔴 **Siamese edit scope 检查**(F177 Phase C):若 PR 作者是Siamese,检查改动文件是否超出白名单(designs/ docs/ assets/ 根目录.md)。碰 packages/ src/ 的改动必须有对应 handoff 记录或 Dry Run Gate 通过证据(build + test pass)

Step 2.6: FALLBACK LAYER CHECK(F177 Phase D)🔴
  - 执行:`node scripts/check-fallback-layers.mjs` 扫描 PR diff
  - 同一文件新增 ≥3 层 fallback 或累计 ≥5 层 → 触发坐标系自检
  - 自检三问:①修坐标系还是补错误坐标系?②坐标变换能否消除?③每层为什么不能去掉?
  - 层数合理时在报告中说明理由;不合理时重构后再过 gate

Step 2.7: ARCHITECTURE OWNERSHIP REPORT(F191,warning-only)🔴
  - 执行:`pnpm check:architecture-ownership`
  - 从 spec / plan 抄入:
    `Architecture cell` / `Map delta` / `Why`
  - 若缺失,报告 `⚠️ missing` 并列为 review focus;不在 quality-gate 做 semantic hard block
  - 若 `Map delta: none` 但 diff 明显新增 `Store|Queue|Router|Adapter|Dispatcher|Binding` 等架构名词,报告 mismatch 给 reviewer
  - 若 `Map delta: update required|new cell required`,报告对应 ownership cell / new cell 文件是否随 PR 更新
  - 注意:quality-gate 只报告机械可见事实;架构语义正确性由 Design Gate + reviewer 判断

Step 3: VERIFY — 逐项检查
  - 代码在哪?有测试覆盖?边界处理了?
  - 🔴 F244 Tips Contribution:若本 PR 新增/修改 user-visible feature / capability / guide / harness behavior,
    必须满足其一:
    ① `packages/web/src/lib/capability-tips.seed.json` 有对应 `sourceRef` tip
    ② 相关 feature/guide/skill 文件写明 `tips_exempt: {reason}`
    并执行 `pnpm check:capability-tips`。
    注意:CI 只证明结构/anchor/action;reviewer 仍要退回只复述标题、没有动作或时机的废话 tip。
  - 🔴 交付物必须核实 commit/PR 状态(git log --grep + gh pr list)
    spec checkbox 是记录工具,不是真相源(LL-029)
  - 🔴 新增 MCP 工具 → 认知入口更新了吗?优先级:MCP tool description → 相关 skill refs → capability wakeup / L0 quick index;只有 legacy/fallback surface 仍依赖时才补 `MCP_TOOLS_SECTION`(F086 教训:造了工具猫不知道;F203 后不再默认塞 SystemPromptBuilder)
  - 🔴 新增行为规则 → governance digest / shared-rules 注入更新了吗?
  - 🔴 产出了 SKILL.md 或改了 MCP tool description → 加载 `writing-skills`,用 T0 六要素审查质量(软硬同检)

Step 4: RUNTIME GUARD — 前端证据采集前先做运行态保护
  - 若会话在 `cat-cafe-runtime`,先探活:`curl -sf http://localhost:3004/health`
  - 服务已在线时直接复用,禁止在该会话执行 `pnpm start` / `pnpm runtime:start` / `./scripts/start-dev.sh`
  - `localhost:3003/3004` 默认按 runtime 处理;如果你要验证未合入改动,不能把这两个端口的页面/接口响应当成当前分支的证据
  - 证明“这是我当前 worktree 的验证证据”时,必须同时说清:`worktree/cwd` + 目标 URL。两者对不上 = 证据无效
  - 确需重启时,先获operator明确授权,再用 `CAT_CAFE_RUNTIME_RESTART_OK=1` 执行
  - **Alpha 优先**:验证已合入 main 的改动时,优先用 `pnpm alpha:start`(3011/3012/4111/6398)取证,而非 runtime。Alpha 环境每次启动自动同步 origin/main

Step 4.5: DOGFOOD-YOUR-SLICE — 用一次自己刚做的功能(F209 教训 2026-05-23)🔴
  对 user-visible / runtime feature,author 必须在请求 review 前:
    ① 跑一条**真实端到端 query / 路径**,涵盖该 slice 的核心交付能力
    ② 把命令 + 输出 / 截图证据写进 Quality Gate Report 的 "Dogfood" 块
    ③ 抓到的任何 dogfood bug 必须当轮修,不允许"post-merge 再说"
    ④ **结构性例外**(2026-07-15):验证路径只在合入后才存在(需 main/alpha 环境或真实外部案例,AC-F7 型)→ pre-merge 验证到能验的边界即可,剩余由**带 owner + 触发条件的持久 post-merge task** 接走,**不阻塞 pre-merge review / merge**;若它是 required AC,则 task 在 terminal PASS(或 `delete` / `cvo_signoff`)前仍阻塞 **feature close**。例外理由写进 review packet

  Scope(必做 vs 可豁免):
    - **必做**:任何对最终用户 / 猫体感有变化的 feature 或 bugfix。包括但不限于:
      search / recall / UI / routing / drillDown / typed reader / 任何新 MCP tool / 任何新 REST 端点 /
      **任何修复用户或猫可感知路径的 bugfix(即使已有回归测试覆盖)**
      → 反例 PR #1854 dogfood hotfix:file-slice drillDown 路径口径不一致,已有回归测试也不够——
        必须 author 自己跑一遍 `search_evidence → drillDown → read_file_slice` 才能抓到
    - **可豁免**:docs-only / 纯重构 / 纯测试 / 内部基础设施 / **纯内部 bugfix(非 user/cat 可感知路径,如内部 DB 一致性、log format、纯算法常量调整等)**
      → 豁免必须**显式在 review packet 里写出理由**("docs-only" / "纯重构 + 既有测试覆盖" / "纯内部 bugfix,不影响 user/cat 可感知路径"等),不能省略

  Why(F209 反思 2026-05-23):
    "AC pass 但用户感受不到" + "dogfood bug post-merge 才暴露" 是同型走偏。
    - Phase B alias registry: AC-B1~B5 全 ✅、跨族 review APPROVE、merge 闭环 — 但生产 `entity_registry` 是空的,真实用户搜 `operator` 找不到 `operator`。
    - Phase C drillDown: 测试 / cloud review / merge 都过 — 但 author 自己 post-merge 用一次刚发现 file-slice 路径口径不一致。
    根因是没人 pre-review 真用一次自己刚做的东西。pre-merge dogfood 把这一类 bug 提前到 author 自检阶段。

  报告写法(在 Quality Gate Report 里加 "### Dogfood" 块):
    ```markdown
    ### Dogfood-Your-Slice
    Scope verdict: ✅ 必做 / 🆗 可豁免(理由:xxx)

Read the full file on GitHub · 297 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. 6d ago First seen · 297 lines · 80 tokens per session scan A 0717b434ed74

Subscribe to this mod's changes

quality-gate is a skill published in the GitHub repository zts212653/clowder-ai (2,894 stars, last pushed yesterday), licensed MIT. It adds 80 tokens to every session and 5,863 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens