gateguard
A fact-forcing gate that blocks Edit/Write/Bash, including MultiEdit, and requires concrete investigation of importers, data schemas, and user instructions before allowing action. Measurably improves output quality by 2.25 points compared with ungated agents.
Translation reviewedRead the original Chinese text
强制事实的门控,阻止编辑/写入/Bash(包括MultiEdit),并要求在允许操作之前进行具体调查(导入器、数据模式、用户指令)。与无门控代理相比,可测量地将输出质量提高2.25分。
Target: Target not categorized. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Chinese text
Topics in the source
- GateGuard — 事实驱动的前置操作门控
- 何时激活
- 核心概念
- 证据
- 门控类型
- 编辑/多编辑门控(每个文件的首次编辑)
- 写入门控(首次创建新文件)
- 破坏性 Bash 门控(每个破坏性命令)
一个 PreToolUse 钩子,强制 Claude 在编辑前进行调查。不同于自我评估("你确定吗?"),它要求具体的事实。调查行为本身创造了自我评估永远无法带来的认知。 处理任何文件编辑会影响多个模块的代码库时 项目包含具有特定模式或日期格式的数据文件时 团队要求 AI 生成的代码必须匹配现有模式时 任何 Claude 倾向于猜测而非调查的工作流程中 LLM 的自我评估不起作用。问"你是否违反了任何策略?"答案永远是"没有"。这已通过实验验证。 但问"列出所有导入此模块的文件"会迫使 LLM 运行 Grep 和 Read。调查本身创造了改变输出的上下文。 三阶段门控: 没有竞争对手能同时做到这三步。大多数止步于拒绝。 两个独立的 A/B 测试,相同的代理,相同的任务: | 任务 | 有门控 | 无门控 | 差距 | | --- | --- | --- | --- | | 分析模块 | 8.0/10 | 6.5/10 | +1.5 | | Webhook 验证器 | 10.0/10 | 7.0/10 | +3.0 | | 平均 | 9.0 | 6.75 | +2.25 | 两个代理生成的代码都能运行并通过测试。区别在于设计深度。 多编辑的处理方式相同——批次中的每个文件都单独进行门控。 触发条件:rm -rf、git reset --hard、git push --force、drop table 等。 以上编辑/写入门控的问题适用于 code 类目标。完整规则见英文版 skills/gateguard/SKILL.md,要点如下: 目标类别: 首次编辑/写入按项目相对路径(去掉开头的 .claude/worktrees/ /)依次判定为 instruction(CLAUDE.md、AGENTS.md、SKILL.md、.mdc、.cursorrules、.github/copilot-instructions.md 等)、test、prose(.md 等)、config(.json、.yaml、.env / .env. 等,.env.example.ts 仍属 code)或 code,并提出相应的问题。 按变更内容提问: 对 code 类目标还会读取变更内容:未触及公开声明的编辑改问"本文件或其模块中依赖所改行为的调用点",不涉及数据的变更省略数据格式问题;无法可靠判断(不支持的扩展名、超过 64 KiB 等)以及敏感目标时仍问原来的四个问题。 事先搜索抵免: 若当前人类回合内已有成功完成(非错误结果)的 Glob、Grep、LS 或 rg/grep/find 等搜索命中该文件,则以附注代替拒绝。Read 从不计入;与被门控调用同批次的搜索、重复的 tooluse id、压缩(compaction)之前的搜索均不计入。文件名词干须按单词边界匹配(测试目标先
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- affaan-m/ECC
- Source file
- docs/zh-CN/skills/gateguard/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.308Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.