Stop AI agents from secretly bypassing your rules. Mechanical enforcement with git hooks, secret detection, deployment verification, and import registries. Born from real production incidents: server crashes, token leaks, code rewrites. Works with Claude Code, Clawdbot, Cursor. Install once, enforce forever.
Mechanical enforcement for AI agent project standards. Rules in markdown are suggestions. Code hooks are laws.
CODEBLOCK0
This installs the git pre-commit hook, creates a registry template, and copies check scripts into your project.
| Script | When to Run | What It Does |
|---|---|---|
| INLINECODE0 | Once per project | Installs hooks and scaffolding |
| INLINECODE1 |
.py files | Lists existing modules/functions to prevent reimplementation |
| post-create-validate.sh | After creating/editing .py files | Detects duplicates, missing imports, bypass patterns |
| check-secrets.sh | Before commits / on demand | Scans for hardcoded tokens, keys, passwords |
| create-deployment-check.sh | When setting up deployment verification | Creates .deployment-check.sh, checklist, and git hook template |
| install-skill-feedback-loop.sh | When setting up skill update automation | Creates detection, auto-commit, and git hook for skill updates |
| Asset | Purpose |
|---|---|
| INLINECODE8 | Ready-to-install git hook blocking bypass patterns and secrets |
| INLINECODE9 |
__init__.py for project module registries |
| File | Contents |
|---|---|
| INLINECODE11 | Research on why code > prompts for enforcement |
| INLINECODE12 |
deployment-verification-guide.md | Full guide on preventing deployment gaps |
| skill-update-feedback.md | Meta-enforcement: automatic skill update feedback loop |
| SKILL_CN.md | Chinese translation of this document |
CODEBLOCK1
CODEBLOCK2
Review the output. If existing functions cover your needs, import them.
CODEBLOCK3
Fix any warnings before proceeding.
CODEBLOCK4
This creates:
.deployment-check.sh - Automated verification scriptThen customize:
.deployment-check.sh for your integration pointsSee references/deployment-verification-guide.md for full guide.
Copy the template from references/agents-md-template.md and adapt to your project.
See references/SKILL_CN.md for the full Chinese translation of this skill.
pre-create-check.sh + post-create-validate.sh + git hook
check-secrets.sh + git hook
notify.py but cron still calls old version.
Enforcement: .deployment-check.sh + git hook
This is the hardest to catch because:
Solution: Mechanical end-to-end verification before allowing "done."
install-skill-feedback-loop.sh → automatic detection + semi-automatic commit
This is a meta-failure mode because:
Solution: Automatic detection of enforcement improvements with task creation and semi-automatic commits.
Don't add more markdown rules. Add mechanical enforcement.
If an agent keeps bypassing a standard, don't write a stronger rule — write a hook that blocks it.
Corollary: If an agent keeps forgetting integration, don't remind it — make it mechanically verify before commit.
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 agent-guardrails-1776419934 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-guardrails-1776419934 技能
skillhub install agent-guardrails-1776419934
文件大小: 40.74 KB | 发布时间: 2026-4-17 19:01