/SKILL.md
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.
npx skillsauth add gabysugy/agent-guardrails agent-guardrailsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Mechanical enforcement for AI agent project standards. Rules in markdown are suggestions. Code hooks are laws.
cd your-project/
bash /path/to/agent-guardrails/scripts/install.sh
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 |
|--------|------------|--------------|
| install.sh | Once per project | Installs hooks and scaffolding |
| pre-create-check.sh | Before creating new .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 |
|-------|---------|
| pre-commit-hook | Ready-to-install git hook blocking bypass patterns and secrets |
| registry-template.py | Template __init__.py for project module registries |
| File | Contents |
|------|----------|
| enforcement-research.md | Research on why code > prompts for enforcement |
| agents-md-template.md | Template AGENTS.md with mechanical enforcement rules |
| 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 |
bash scripts/install.sh /path/to/project
bash scripts/pre-create-check.sh /path/to/project
Review the output. If existing functions cover your needs, import them.
bash scripts/post-create-validate.sh /path/to/new_file.py
Fix any warnings before proceeding.
bash scripts/create-deployment-check.sh /path/to/project
This creates:
.deployment-check.sh - Automated verification scriptDEPLOYMENT-CHECKLIST.md - Full deployment workflow.git-hooks/pre-commit-deployment - Git hook templateThen customize:
.deployment-check.sh for your integration pointsDEPLOYMENT-CHECKLIST.mdSee 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.
Symptom: Agent creates "quick version" instead of importing validated code.
Enforcement: pre-create-check.sh + post-create-validate.sh + git hook
Symptom: Tokens/keys in code instead of env vars.
Enforcement: check-secrets.sh + git hook
Symptom: Built feature but forgot to wire it into production. Users don't receive benefit.
Example: Updated 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."
Symptom: Built enforcement improvement in project but forgot to update the skill itself.
Example: Created deployment verification for Project A, but other projects don't benefit because skill wasn't updated.
Enforcement: 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.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.