All shelves / Mods / Safety
rulebook-guard
By hamzafer
rulebook-guard is a Claude Code safety mod by hamzafer.
Asks before git commit --amend, an unformatted push, or personal details in notes and commits.
Holds a command
Install
The marketplace name is claude-code-mods.
claude plugin marketplace add hamzafer/claude-code-mods claude plugin install rulebook-guard@claude-code-mods
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.1.3
- License
- MIT
- Repo stars
- 381
- Last change
- 2026-10-23
What it can reach
- Holds a command
- Sees tool calls
- Calls another program on this machine
Claude Code 2.1.287 or later. The author says to restart after installing. It rewrites em dashes in .md, .mdx, .markdown, and .txt writes, commit messages, pull request text, and Slack posts, and leaves code files alone. It asks before git commit --amend, before a git push with files that ruff format or Prettier would change, and before an email address or phone number goes into ~/notes, memory files, CLAUDE.md files, or a commit. Saying no refuses the call, and Claude gets the reason; in auto mode the session waits for your answer. It never runs a Prettier the repo ships in git, or anything else it tracks under node_modules. The author calls it a guardrail, not a security boundary: the repo's own Prettier config still runs, as it would for npm test.
The marketplace, claude-code-mods, holds all of hamzafer's mods, merge-gate and glance among them. This one installs on its own, or from the checklist that npx claude-code-mods@latest opens. The author lists this with the mods built around their own tools and rules, to fork and change to yours. The rules are plain code in hooks/register.ts. Stopping what those rules forbid before it lands is why this page files it under safety. dash-guard-mutlumehmet refuses a write that adds an em dash, an en dash, or a double hyphen in prose, and names the lines to rewrite. dogma, by Marcel-Bich, runs, asks about, or blocks git commands and deletes by your DOGMA-PERMISSIONS.md. This one rewrites the dashes itself and asks before the rest. In the source, a toast says how many em dashes it replaced, and where.
Demo

What it hooks into
tool.callAround a tool call, where it can hold oneWriteEditBash
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Files
The author's source, 3 files. They load when you open them.
Facts
- Author
- hamzafer
- Category
- Safety
- Marketplace
- claude-code-mods
- Folder
- mods/rulebook-guard
- Version
- 0.1.3
- License
- MIT
- Repo stars
- 381
- Last change
- 2026-10-23
- Language
- TypeScript
- Files
- 5