guard
Skill2 starsChanged 24 days agoMITView on GitHub
三省引擎(Canon-Mnemonic-Guard)护栏线 (Guard) — 规则执行器。读取 Canon 规则库,执行五层前置拦截。Hermes 平台搭配 cmg-guard 插件实现内核级硬拦截,其他平台靠 Skill 层自觉。v4.8.3 文档精简。
52 other projects use a version of this.
Adopted by
Most recently taken up by
- timurgaleev/vibestacktheir own version, first seen Nov 8, 2026
- hiroqt/overdrivetheir own version, first seen Nov 1, 2026
- matthewdigiuseppe/MStacktheir own version, first seen Nov 1, 2026
- trungtm78/ClaudeSkillstheir own version, first seen Oct 25, 2026
- autonomous-ai/lampOStheir own version, first seen Oct 15, 2026
- rcelebrone/DotAgentstheir own version, first seen Oct 14, 2026
Used with
Projects with it also use unfreeze, plan-tune and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ayudaySkillunfreeze
Clear the freeze boundary set by /freeze, allowing edits to all directories again. Use when you want to widen edit scope without ending the session. Use when asked to "unfreeze", "unlock edits", "remove freeze", or "allow all edits".
Also in 24 projects that use this
ShreyRaviSkillplan-tune
Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). Review which AskUserQuestion prompts fire across gstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and enable/disable question tuning. Conversational interface — no CLI syntax required.
Also in 9 projects that use this
Saqlain-811Skillios-clean
Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)
Also in 5 projects that use this
Saqlain-811Skillios-fix
Autonomous iOS bug fixer. (gstack)
Also in 5 projects that use this
seek888Skillopen-gstack-browser
Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".
Also in 9 projects that use this
ayudaySkillsetup-deploy
Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".
Also in 17 projects that use this
- +1 more from Saqlain-811
Other versions52 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 52
- garrytan/gstack★ 141ksame name
- DenchHQ/DenchClaw★ 1.7ksame name
- DenchHQ/ironclaw★ 1.7ksame name
- autonomous-ai/autonomous-os★ 552same name
- autonomous-ai/lampOS★ 552same name
- autonomous-ai/Physical-AI-Operating-System★ 552same name
- garagon/nanostack★ 206same name
- mr-daedalium/ostack-saas★ 108same name
- no-session/pstack★ 96same name
- tranhieutt/software_development_department★ 71same name
42 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- canon-mnemonic-guard-dashboardSkill
- canon-mnemonic-guardSkill
- canonSkill
- mnemonicSkill
The file
Files
Guard 护栏线 v4.8.3
角色: guard | 阶段: pre_action | 职责: 读取 Canon 规则库,执行拦截 Hermes 用户搭配
cmg-guard插件获得内核级硬拦截;其他平台通过 Skill 层自觉遵守。
能力
| 拦截层 | 检查内容 | Hermes 硬拦截 | 其他平台 |
| Ban | 精确匹配规则关键词 | ✅ 插件 | Skill 自觉 |
| Fabrication | 防幻觉声称("已创建/已验证") | ✅ 插件 | Skill 自觉 |
| StepCompleteness | 防跳步骤(链接未读/文件未校验) | ✅ 插件 | Skill 自觉 |
| SkillLoad | 防偷懒(领域 Skill 未加载) | ❌ | Skill 自觉 |
| Clarify | 防瞎猜(多选项未 clarify) | ❌ | Skill 自觉 |
注意:SkillLoad 和 Clarify 需要语义理解,正则做不到,只能在 Skill 层引导。其余三层 cmg-guard 插件全包。
sentinel 插件(Hermes 专属;旧名 cmg-guard)
配套插件 sentinel(旧名 cmg-guard)提供内核级硬拦截,AI 无法跳过:
| Hook | 检查内容 |
pre_tool_call | 直接 patch/write SKILL.md → 阻断,要求先加载 authoring。v1.3.2: 读写感知——read_file/grep 放行,sed/>/write_file 拦截 |
pre_llm_call | 哨兵扫描 + 步骤完整性 + 黑名单 |
post_llm_call | 任务完成证据校验 + 外部来源主张验证 |
transform_llm_output | 关键词黑名单替换 |
17 个 hook 全阶段覆盖,4 个核心默认开启,其余按需配置。
安装(Hermes)
# Skill 层
cp -r guard ~/.hermes/skills/software-development/
# Plugin 层(硬拦截)
cp -r cmg-guard ~/.hermes/plugins/
# 一键配置
python3 ~/.hermes/skills/software-development/canon-mnemonic-guard/scripts/init.py非 Hermes 平台:只复制 Skill 目录,Plugin 层不可用,依赖 AI 自觉遵守规则。
常见坑点
- Guard 不会自动加载 — Hermes 技能系统靠任务匹配。需要 SOUL 激活标记或手动
/skill guard。 - 不要给模糊结论 — 「应该已激活」本身就会被拦截。验证到确定为止。
- intercept_log 需要有效时间戳 — 手工填充会导致效能分析失败。
- 输出层拦截不覆盖执行层偷懒 — AI 跳过中间步骤不产生违规关键词→拦截器不触发。这是架构边界,非 Bug。
- Skill 层规则不是硬拦截 — 非 Hermes 平台上 Guard 完全靠 AI 自觉。要强制必须用 Plugin。
- cmg-guard 插件在非 CLI 平台需特殊配置 — Desktop/Web/API 没有 AI 自我修正循环,
transform_llm_output/pre_llm_call/post_llm_call三个钩子会导致输出死锁。Desktop 端必须关掉这三项,只保留pre_tool_call: true。详见 CMG 外观层references/desktop-compatibility.md。 - cmg-guard 代码变更后必须重启验证 — 不能凭感觉说「应该生效了」。需逐项
grepagent.log + 统计规则数 + 确认钩子配置。详见 CMG 外观层references/desktop-compatibility.md的「重启验证清单」。 - 只读命令也会被 pre_tool_call 误拦 — 判据是「命令串里有没有
SKILL.md」,不是「有没有写操作」。grep <path>/SKILL.md、cat、sed -n '1,20p'这类纯读命令一样被阻断并返回[CMG-GATE] 禁止通过终端写入 skill 文件。正确应对:改用read_file/search_files工具读,不要在终端换写法重试(重试只会再撞一次)。要读第三方包内的文件同理——用 read_file 而不是 shell。
参考文件
- CHANGELOG.md — 完整版本历史
- README.md — 快速上手
- CMG 外观层 — 三线协作全貌
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

