← ClaudeAtlas

rule-to-hooklisted

Turn one rule that keeps getting broken, not a new automation, into an enforced check (types, lint, CI, a test or a Claude Code hook) proven on a past mistake. Use when the user says 'enforce this rule', 'make this a hook', 'block this command the agent keeps running', 'stop the agent from doing X', or when one rule keeps getting broken or the user keeps repeating the same correction.
paureis/pau-skills · ★ 2 · AI & Automation · score 74
Install: claude install-skill paureis/pau-skills
# Rule to hook A written rule that gets broken three times stops being a rule and becomes a script, a hook or a gate. This skill does that conversion in a fixed order, so the result lives at the highest layer that can hold it, blocks the real violation, leaves the near-misses alone, and has a test that has been seen to fail. This skill implements one rule. To find which rules a project needs, from its review comments, fix commits and transcripts, run the `agent-friendly-audit` skill if it is installed; it uses the same fix order and asks for the same exception fields. Without it, start from the rule the user names. The rule, or where to find it: $ARGUMENTS Bundled files, open them when you reach their step: - `${CLAUDE_SKILL_DIR}/HOOK-EVENTS.md`: every hook event, its input, and how it blocks or informs - `${CLAUDE_SKILL_DIR}/templates/pretooluse-guard.mjs`: Bash-command guard skeleton (Node.js) - `${CLAUDE_SKILL_DIR}/templates/pretooluse-guard.py`: the same skeleton in Python - `${CLAUDE_SKILL_DIR}/templates/guard.test.mjs`: test skeleton with DENY and PASS tables - `${CLAUDE_SKILL_DIR}/templates/settings-snippet.json`: the registration block - `${CLAUDE_SKILL_DIR}/templates/ratchet.mjs`: a count-against-a-baseline check for a pattern that is already common, with expiring exceptions (Node.js, scans files of any language) - `${CLAUDE_SKILL_DIR}/MESSAGES-AND-RATCHETS.md`: step 2's error messages, ratchets and exceptions on the line - `${CLAUDE_SKILL_DIR}/MUTATION.md`: st