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.
npx agentmods add skills/ooooooooooooooooooop/agent-tools/decision-gatesnpx skills add ooooooooooooooooooop/agent-tools --skill decision-gatesgit clone --depth 1 https://github.com/ooooooooooooooooooop/agent-toolsWrote 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.
[](https://agentmods.dev/skills/ooooooooooooooooooop/agent-tools/decision-gates)<a href="https://agentmods.dev/skills/ooooooooooooooooooop/agent-tools/decision-gates"><img src="https://agentmods.dev/badge/skills/ooooooooooooooooooop/agent-tools/decision-gates.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00114 | $0.02586 |
| Opus 5 | $0.00057 | $0.01293 |
| Sonnet 5 | $0.00023 | $0.00517 |
| Haiku 4.5 | $0.00011 | $0.00259 |
Grade A, and why
decision-gates scanned grade A with 0 findings 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 4d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
决策闸门(Decision Gates)
核心规则
决策层跑偏的根因不是提示词不够强,而是状态没有物化:目标只存在于对话里、验收只依赖自述、恢复只信任摘要。决策闸门把防偏从"意志"变成"硬门禁":
- 闸门 0 原始证据锚:checkpoint 必须同时落盘摘要与原始证据锚 JSON;恢复时先读锚、后读摘要,锚里有 SKIP/WARN/PENDING 则"PASS"自动降级为"PARTIAL"。
- 闸门 1 对抗式对齐审计:事件驱动触发一个不读摘要的独立审计 subagent,只给 objective + 原始证据锚 + 产出物,防"自检即跑偏"。触发事件:objective 变更 / 关键假设被证伪 / 不可逆或高风险边界 / 多 worker 结果集成 / 证据相互冲突 / 连续无 Progress Delta / 重大架构决策 / 最终验收(必跑)。若连续 ≥5 个 checkpoint 无任何触发事件,补一次低成本自检兜底。固定周期计数不再是主要触发方式(防止无行动价值的重复审计)。
- 闸门 2 跨包一致性校验:≥2 个 worker 并行时,验收前先跑算法脚本核对文件覆盖重叠/空白/哈希冲突,0 token。
- 闸门 3 成本比对:每个派工单记录授权档位与预算,worker 返回时核对实际档位与消耗,0 token。
- 闸门 4 防御自检:每 5 个 checkpoint 扫描历史锚,统计摘要比证据乐观的次数(summary_bias),≥2 次判定 DEFENSE_DRIFT 并回退,0 token。
- 闸门 5 物理范围锁(Scope Lock):验收或交付前用
gate_scope_lock.py严格校验变更文件集,任何触碰 Non-Goals 或越界文件直接判SCOPE_VIOLATION,0 token。 - 闸门 6 轨迹死循环熔断(Deadband Loop Interceptor):连续 2 次相同报错/失败模式时通过
gate_deadband.py自动触发DEADBAND_TRIPPED,强制推翻假设并回退,0 token。
零 token 原则:闸门 2/3/4/5/6 是纯数据算法逻辑,必须用 scripts/ 下的 Python 脚本执行,禁止用 LLM 调用替代;这些机械 scope/cost/integrity 检查保持低成本执行,不因事件化而删除。唯一消耗 token 的闸门 1 用最便宜档位的独立 subagent,按上方事件驱动触发。
验证预算(VERIFICATION_PURPOSE):任何验证/审计动作执行前必须能回答:
hypothesis: 要验证什么假设
uncertainty_removed: 通过后消除了什么不确定性
pass_action: 验证通过后的下一动作
fail_action: 验证失败后的下一动作
若 pass_action == fail_action 且没有新的风险证据,通常跳过该验证。验证必须产出 Progress Delta(改变 next action 或 done state),否则视为无进展动作(见 execution-discipline「Progress Delta」)。
适用范围与触发边界
触发(满足任一即启用本技能):
- 任务进入长程(预计 >30 分钟或 >50 步),开始建 checkpoint;
- 同一阶段有 ≥2 个 worker 并行产出待验收;
- 审计类任务需要汇总多个 worker 成果;
- 派工单涉及成本预算(授权档位 + token 预算);
- 会话从 work_memory/checkpoint 恢复,准备继续推进。
不适用:
- 单轮小修改、无需持久化的临时问答:不要为它们建 checkpoint 或跑闸门,避免流程过度(经 task-mode-router 判级)。
工作流程
阶段 1:初始化(首个 checkpoint 前)
- 用
create_goal锁定原始 objective,逐字拷贝保存。 - 建立
checkpoints/目录(或沿用.agent-broker/topics/<topic>/checkpoints/)。 - 从
templates/raw_evidence_anchors.json复制锚模板到checkpoints/raw_evidence_anchors.json并填写 objective。
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 379 B
- examples/audit-task-with-gates.md 2.2 KB
- scripts/gate_consistency.py 5.8 KB runs code
- scripts/gate_cost.py 3.6 KB runs code
- scripts/gate_deadband.py 3.8 KB runs code
- scripts/gate_scope_lock.py 3.3 KB runs code
- scripts/gate_selfcheck.py 4.6 KB runs code
- scripts/run_tests.py 9.0 KB runs code
- templates/adversarial-audit-brief.md 2.0 KB
- templates/raw_evidence_anchors.json 997 B
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.
- 4d ago First seen · 122 lines · 114 tokens per session scan A f4b7197e1ee0
decision-gates is a skill published in the GitHub repository ooooooooooooooooooop/agent-tools (2 stars, last pushed 6d ago), licensed MIT. It adds 114 tokens to every session and 2,586 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
zlog
Multi-agent session log compressor and storage optimizer. Compresses .log, .out, .txt, .trace (>10KB) to .zst, .xz, or .gz (saving 77%-99.9% disk space) across /.gemini, /.config/Cursor, /.ollama, /.claude, /.windsurf, /.codex, etc. Auto-discovers AI log dirs, purges empty 0-byte logs. Safe for concurrent…
amazon-reviews-api-skill
This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…
amazon-competitor-analyzer
Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.
muapi-media-editing
Edit and enhance images and videos with AI via muapi.ai — prompt-based editing, upscaling, background removal, face swap, lipsync, video effects, and more.
create-site
Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…
add-cloud-flow
Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional…