rules-guard
by Abd Alrahman Qaroot · ★ 0 · updated 21 Oct 2026
Blocks pushes to protected branches, plain force pushes and production kubectl/AWS calls. Optional rules: AI attribution, Test plan sections and prose in PR descriptions, added code comments, test files in commits, Slack messages sent by Claude, foreign Liquibase authors, and cluster calls while the VPN is down or the AWS SSO session is stale.
Install
/plugin marketplace add AbdAlrahmanAlQaroot/claude-code-mods/plugin install rules-guard@claude-code-modsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
tool.call- API calls
$.clock.now$.env.get$.fs.exists$.fs.list$.fs.read$.process.run$.session.cwd- Can see
every tool callBash callsWrite callsEdit calls- Reach
- level 2 of 3 runs processesreads filesreads env vars
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/AbdAlrahmanAlQaroot/claude-code-mods
- Path in repo
rules-guard- Source commit
c818aa1the exact code the scan read- Author
- Abd Alrahman Qaroot @AbdAlrahmanAlQaroot
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from AbdAlrahmanAlQaroot/claude-code-mods
standup
AbdAlrahmanAlQaroot/claude-code-mods
/standup: a pane of the PRs you opened, merged and reviewed, the commits you made and the Claude Code sessions you worked in on a work day, with a button to draft the update
stay-awake
AbdAlrahmanAlQaroot/claude-code-mods
Keeps the Mac from idle-sleeping while a turn or a background agent runs
usage-pacer
AbdAlrahmanAlQaroot/claude-code-mods
Shows session-limit usage in the status line, warns once at 80% and 95% of each window, and can run a /handoff command before the 5h limit in the session you are working in
pr-radar
AbdAlrahmanAlQaroot/claude-code-mods
Your open GitHub PRs across every repo: checks, reviews, unresolved threads and recent merges in the status line, /prs and a pane; /unreleased shows what is on your integration branch but not yet released; alerts when a PR is approved, fails, gets comments, merges or closes
repo-context
AbdAlrahmanAlQaroot/claude-code-mods
Shows the repo and branch Claude is working in, and names new sessions from their first prompt
Related mods
Other mods in Guards, close to this one by stars.