Rules To Guards

Rule enforcer that finds which written rules in AGENTS.md, CLAUDE.md, and GEMINI.md a coding agent keeps breaking, counts every violation in recent Claude Code, Codex, Gemini CLI, and OpenCode sessions, and turns each broken rule into a hook that blocks it, tested by replaying the past violations. Use when the user says the agent keeps breaking or disobeying a rule (such as "use pnpm, never npm"); asks how often agents violate their rules; wants a rule enforced by a hook instead of repeated in text; or wants to convert rules into hooks or permission rules. Runs locally: reads AGENTS.md-style rules and session transcripts, and changes settings only with --write after the user agrees.

RyanAlberts Updated 9 repo stars
Autonomy × Recovery — every loop-owning project placed by designed autonomy regime and failure-recovery tier

File contents

RyanAlberts/best-of-Agent-Harnesses commit 3d3451e71d

Frequently asked questions

npx get-skill add ryanalberts/rules-to-guards