agent-self-verification

agent-self-verification is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 8,382 tokens per session, scanned A, original, MIT.

A rule requiring coding agents to verify their own work with observable evidence. It covers checks such as development logins, screenshots, API requests, tests, and database queries.

In plain words
What is it for?
Use it when defining acceptance checks, testing changes, diagnosing empty or failed outputs, and deciding whether user confirmation is truly necessary.
Why use it?
It prevents agents from treating a successful command, file count, hash, or tool message as proof that the result is correct. It requires checking that the evidence would differ if the claimed result were false.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/yudefine/nuxt-supabase-starter/agent-self-verification
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

Made for: 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 agent-self-verification

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-self-verification.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-self-verification)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/agent-self-verification"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/agent-self-verification.svg" alt="Measured on agentmods" height="20"></a>
Per session 8,382 This file is loaded in full into every session.
When invoked 8,382 The same file — it is already loaded in full.
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 $0.08382 $0.08382
Opus 5 $0.04191 $0.04191
Sonnet 5 $0.01676 $0.01676
Haiku 4.5 $0.00838 $0.00838

Measured yesterday against content hash fbb39dd90be8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-self-verification 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 yesterday.

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.

- 「curl 打過了,302 / 200,登入流程正常」「cookie jar 有存到,session 沒問題」(對**帶登入態**的流程,curl 的狀態碼不是證據;per 下方 MUST 16)
template/.cursor/rules/agent-self-verification.mdc · 240 lines

How it starts

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

Agent Self-Verification

核心命題:agent 完成 evidence 收集是預設職責禁止把可自動化的驗證(dev login / 截圖 / API round-trip / test / DB query)踢回 user。User handoff 是最後手段 — 必須主線跑完已知 fallback chain 仍失敗才行。

此規則優先於個別 skill 內嵌的「請 user 確認」捷徑指示;every session always-load。

Browser 載體(Cursor vs 非 Cursor)

開網頁/截圖/登入頁之前 MUST 先讀 [[agent-routing]] § Cursor 環境的 browser 載體——環境 predicate、該用哪個載體、以及全部 NEVER 都在那一節。不要寫死 agent-browser 本檔 NEVER 複寫該節內文:L69 同型複本曾寫成相反方向、隨投影散到全 fleet 十一個 consumer。

證據鑑別力(先於下方每一條 NEVER / MUST)

驗收引用的證據 E,MUST 能回答「若被驗命題為假,E 會長什麼不一樣?」——答不出或答案是「一樣」→ E 不是證據,換一個在兩個世界會分岔的觀測。status code、exit code、「檔案存在」、工具自我宣告、來自常數宣告而非量測的數字,預設視為未分岔訊號。MUST 11 / 16 / 19 是本條的三個實例;新形態回到上面那句自判。降級路徑觸發時 MUST loud(warning / health degraded),讓假世界主動分岔。實證三例見 [[pitfall-empty-state-screenshot-has-no-discriminating-power]]。

摘要值(hash / 行數 / 檔案數 / diff 大小)同屬未分岔訊號sha256sum / md5sum / wc -l 這類全域函式對空輸入不報錯、照樣回一個外觀正常的值,於是「上游命令死掉」與「內容真的是空的」在它的輸出裡完全相同。每一次拿 hash 或 count 當證據,MUST 先驗產生它的那條 pipeline 的 exit code 與非空性;NEVER 從摘要值反推成因。逐字反開脫:「hash 有值代表命令成功了」——[ -n "$(printf '' | sha256sum)" ] 恆真(空輸入的 sha256 就是 e3b0c442…),那道 guard 讀起來在防空值、實際永遠通過。實證見 [[pitfall-hash-of-empty-stdout-collapses-distinct-causes]]。

否定命題 MUST 先做陽性對照(先於下方每一條具名處方)

結論形式是「沒有 X」時,MUST 先對量測工具做一次陽性對照——用一個已知存在的目標跑同一條指令,確認它回得出非空。回空就是工具壞了,不是「沒有 X」。 對照沒跑,那個「沒有」不是證據,NEVER 拿它當任何動作的前提(起 publish、判 lane 空、判沒人在跑、判無違規)。

這條排在所有具名處方之前,不與它們並列,理由只有一條:它不要求你事先知道那個特定的坑。 具名處方(find-L、比對 exe 不比對 comm、進程列表不加 | head -N)擋的是已知的坑,而會出事的每一次,都是不知道的那一次。陽性對照擋的是「這個工具現在到底活著沒有」——後者不成立時,前者全部沒有意義。

逐字反開脫:「指令跑完了、沒報錯、回空,所以確實沒有」——空輸出與工具壞掉在 stdout 上完全同形,而否定命題只能用「找不到」來證,所以這一整類對假陽性與假陰性都零抵抗。假訊號不是讓你少知道一件事,是讓你知道一件相反的事。

誠實邊界:陽性對照證的是工具活著,不是 pattern 寫對——它擋不住「工具對目標 A 有效、對目標 B 無效」。NEVER 把對照通過讀成「這次的查詢是對的」。

判「某個程式在不在跑」時 MUST 貼 [[process-probe]] 的 is-running.sh,NEVER 現場自組 pgrep / ps | greppgrep -f 比對整條 cmdline,量的是「有沒有人提到這個字」;該腳本內建兩段對照並把「沒有在跑」(exit 1)與「量不出來」(exit 2)分成不同 exit code。裸 pgrep 把這兩個結論折成同一個空輸出。

Read the full file on GitHub · 240 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. yesterday Changed · +57 lines · +2,047 tokens per session fbb39dd90be8
  2. 5d ago First seen · 183 lines · 6,335 tokens per session scan A fd429ffe3a49

Subscribe to this mod's changes

agent-self-verification is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It adds 8,382 tokens to every session, about $0.0419 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.