verify-gate-chain

verify-gate-chain is a cursor rule for Claude Code, Cursor from YuDefine/nuxt-supabase-starter. It costs 0 tokens per session (2,009 once invoked), scanned A, original, MIT.

A verification standard that defines an ordered chain of automatic checks, from formatting and type checks through tests and optional health checks.

In plain words
What is it for?
It helps configure project verification commands, run checks after edits and phases, and confirm that code is ready through unit, integration, and health testing.
Why use it?
It gives an agent a clear, machine-checkable definition of success and tells it when to retry, stop, or escalate.

Cursor rule for Claude CodeCursor

Written for Claude Code and Cursor: PostToolUse hook event, but also installed under .cursor/.

Good fit It helps configure project verification commands, run checks after edits and phases…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/yudefine/nuxt-supabase-starter/verify-gate-chain
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: Claude Code, Cursor.

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 verify-gate-chain

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/verify-gate-chain.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/verify-gate-chain)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/verify-gate-chain"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/verify-gate-chain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,009 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.02009
Opus 5 $0.00000 $0.01005
Sonnet 5 $0.00000 $0.00402
Haiku 4.5 $0.00000 $0.00201

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

Security

Grade A, and why

verify-gate-chain 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 3d 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.

| L3 — 整合 | smoke / health | `curl -sf http://localhost:<port>/api/health` | change 全部 phase 完成後 |
template/.cursor/rules/verify-gate-chain.mdc · 129 lines

How it starts

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

Verify Gate Chain(自主迴圈驗證標準)

核心命題:agent 自主完成長任務的瓶頸不是行動能力,是不知道什麼時候算完成。本規約定義「gate chain」——一組依序執行的驗證指令,結果是機器可判定的 PASS / FAIL——讓 agent 能自行判斷「做完了嗎」並決定重試或停止,不用問人。

Gate chain 定義

Gate chain 是一組有序、確定性、機器可判定的驗證指令。每條指令的 exit code 是唯一判定依據:exit 0 = PASS,non-zero = FAIL。

每個 consumer MUST 在 .cursor/rules/local/verify-commands.mdc 定義自己的 gate chain。 clade 定義標準(本規約),consumer 定義內容(各自的 test runner、port、health endpoint)。

Gate chain 層級

層級 指令類型 範例 何時跑
L0 — 格式 lint + fmt vp check 每次 Edit/Write 後(PostToolUse hook 已覆蓋)
L1 — 型別 typecheck pnpm typecheck 每個 phase 完成後
L2 — 單元 test suite pnpm test --run 每個 phase 完成後
L3 — 整合 smoke / health curl -sf http://localhost:<port>/api/health change 全部 phase 完成後

PASS = L0–L2 全 exit 0。 L3 為 SHOULD(dev server 未起時 skip,不算 FAIL)。

Consumer verify-commands.md 範本

Consumer 端 .cursor/rules/local/verify-commands.mdc MUST 至少定義 L0–L2:

# Verify Commands

## Gate Chain

- L0: `vp check`
- L1: `pnpm typecheck`
- L2: `pnpm test --run`
- L3: `curl -sf http://localhost:3040/api/health` (optional, skip if dev server not running)

clade 不散播此檔——各 consumer 自管。vendor/snippets/verify-gate-chain/ 提供 scaffold 模板。


Iterate-until-green 迴圈語義

agent 執行修改後跑 gate chain,FAIL 時解析 error output → 修正 → 重跑 gate chain,直到全 PASS 或達到 max_iterations

MUST 宣告迴圈參數

每個自主迴圈(spectra-apply phase 實作、bug fix、lint fix、dep update)開始前 MUST 確認以下兩個參數:

參數 預設值 說明
max_iterations 5 跑 gate chain → fix → re-run 的最大輪數
escalation_action HANDOFF 超過上限時的行為:HANDOFF(寫 HANDOFF.md 交接)/ ASK(問 user)/ STOP(靜默停止並報告)/ ROLLBACK:<artifact>(退回上游 artifact 修 spec——只在判定 specification error 時用,見 § Error 解析規則)

禁止無上限迴圈。 沒有宣告 max_iterations 的自主 iterate 視同違規。

迴圈流程

Read the full file on GitHub · 129 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. 3d ago First seen · 129 lines · 0 tokens per session scan A 816aefdf9844

Subscribe to this mod's changes

verify-gate-chain is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,009 tokens. 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-09-03.