verify-agent-action
它能做什么
在 AI 计划执行或人工请求执行某个操作之前,检查这个操作是否安全、正确。它会确认一切都符合预期,以防止出错或发生不想要的操作。
适用场景
- ✓AI 即将执行重要操作时(例如发送邮件或完成购买)。
- ✓需要确认某个批准与即将执行的操作完全一致时。
- ✓需要检查某个操作的证明是否真实,且没有被篡改时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/verify-agent-action/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请验证向客户 X 发送这份报告的操作是否正确、安全。”
每周 5 个新技能,1 分钟读完。
工作原理
这个系统会把拟执行操作的细节与现有的批准和证明进行比对。它会检查两者是否完全匹配、权限是否正确,以及是否存在篡改或伪造的迹象。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Verify Agent Action
Treat a plausible approval screen as a claim, not proof. Verify the complete decision path before a human or an external enforcement point decides whether to act.
Preserve the safety boundary
- Never execute, approve, sign, send, purchase, deploy, or mutate anything.
- Never convert this review into execution authority.
- Never infer missing evidence, identities, timestamps, or parameters.
- Treat a valid schema, checksum, or signature as insufficient by itself.
- Treat signatures as evidence of attribution and integrity, not factual truth.
- Keep supporting and refuting evidence separate; do not average conflict away.
- Fail closed on a material mismatch. Use
INCONCLUSIVEwhen required evidence is unavailable.
Set this field in every final result:
{"execution_authorized": false}
Collect the review packet
Request only the artifacts needed for the review:
- The original user or system request.
- The exact proposed action:
- operation or tool name
- target resource
- complete parameters
- filesystem and network scope
- maximum execution count
- not-before and expiry times
- The assessment that claims the action is justified.
- The source evidence and policy used by that assessment.
- The approval record, including approver identity, role, action digest, nonce, audience, issue time, expiry, and use count.
- The latest monitoring events and expected heartbeat interval.
- The current trusted time and any prior nonce-use record.
List missing fields before analysis. Do not silently substitute defaults.
Build the exact action identity
Create one normalized action object without dropping fields:
{
"operation": "git.push",
"target": "owner/repository",
"parameters": {
"branch": "fix/example",
"commit": "40-character-sha",
"remote": "origin"
},
"filesystem_scope": [],
"network_scope": ["github.com:443"],
"execution_count": 1,
"not_before": "RFC3339 timestamp",
"expires_at": "RFC3339 timestamp"
}
Use a project-specified canonicalization and digest algorithm when provided. Otherwise, report that cryptographic identity cannot be independently verified; still compare every field structurally.
Never normalize away a security-relevant distinction such as:
- branch, commit, repository, environment, recipient, amount, currency, or host
- recursive, force, overwrite, privileged, destructive, or dry-run flags
- filesystem roots, CIDRs, ports, domains, execution counts, or expiry
Run the six controls
Evaluate every control as PASS, FAIL, INCONCLUSIVE, or NOT_APPLICABLE.
1. Recompute the assessment
- Re-run the declared deterministic evaluator from the declared source inputs when its implementation is available.
- Compare the complete canonical result, not selected fields.
- Mark
FAILif the received result differs from recomputation. - Mark
INCONCLUSIVEwhen only schema validation, an internal checksum, or an unverifiable evaluator claim is available.
2. Match the exact approved action
- Compare the proposed action with the action bound into the approval.
- Compare the complete normalized object and its digest.
- Mark
FAILif any material field changed after approval. - Treat a broad target or scope as a mismatch when the evidence justifies only a narrower action.
3. Reject replay and identity ambiguity
- Verify the nonce is unique and unused.
- Verify subject, audience, issuer, approver role, issue time, not-before time, expiry, and maximum use count.
- Mark
FAILfor a reused nonce, wrong audience, expired approval, future-dated approval, excessive use count, revoked identity, or role mismatch. - Mark
INCONCLUSIVEif no trustworthy replay store or time source exists.
4. Test reviewer independence
Build a dependence table for every reviewer or evaluator:
| Dimension | Compare |
|---|---|
| Model | family, version, fine-tune |
| Provider | account and control plane |
| Prompt | shared template or ancestry |
| Retrieval | overlapping sources and indexes |
| Tools | shared evaluator code and runtime |
| Operator | common owner or approval authority |
Do not count correlated reviewers as independent quorum members. Mark FAIL if
the policy requires independent approval and the remaining independent set is
too small.
5. Preserve evidence and contradiction
- Inventory every evidence identifier referenced by the assessment.
…
常见问题
如果有什么地方不对,会发生什么?
如果存在任何不一致或疑问,系统就不会允许该操作执行,并会标记出问题,等待修正后才会继续。
为什么不能直接信任 AI?
AI 是很强大的工具,但对于影响重大的操作,额外的一层安全保障非常重要。这样可以确保操作符合最初的意图,并避免意外错误。
“故障封闭”(fail closed)是什么意思?
意思是遇到疑问或问题时,系统会出于安全考虑拒绝执行该操作,而不是去猜测或冒险继续执行。
详情
作者的原始描述
Review a proposed AI-agent action or human-approval packet before execution. Use when an agent wants to run a consequential tool, command, deployment, message, purchase, credential operation, or data mutation; when checking whether approval still matches the exact action; or when auditing action evidence for forged results, parameter swaps, replay, correlated reviewers, missing evidence, expiry, o
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7471
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。