guard

guard is a command for Claude Code from beevibe-ai/beevibe-cto. It costs 50 tokens per session (577 once invoked), scanned A, original, Apache-2.0.

A command that installs Claude Code and Git hooks based on a team's documented principles. The hooks show relevant principles before files are changed and check staged files before commits.

In plain words
What is it for?
Use it after team principles have been defined to install write-time checks and a pre-commit review. It helps enforce path-specific guidance and review staged changes automatically.
Why use it?
It catches rule violations during everyday editing and before committing code. High-severity violations can block a commit, while lower-severity findings remain warnings.

Command for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the adr plugin — 6 commands shipped together

Good fit Use it after team principles have been defined to install write-time checks and a pre-commit review. It helps enforce path-specific guidance and review staged changes automatically.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/beevibe-ai/beevibe-cto/guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/beevibe-ai/beevibe-cto

Made for: Claude Code.

Or install adr, the plugin that ships this one along with the rest of its 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for guard

README.md
[![agentmods](https://agentmods.dev/badge/commands/beevibe-ai/beevibe-cto/guard.svg)](https://agentmods.dev/commands/beevibe-ai/beevibe-cto/guard)
Your own site
<a href="https://agentmods.dev/commands/beevibe-ai/beevibe-cto/guard"><img src="https://agentmods.dev/badge/commands/beevibe-ai/beevibe-cto/guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00577
Opus 5 $0.00025 $0.00289
Sonnet 5 $0.00010 $0.00115
Haiku 4.5 $0.00005 $0.00058

Measured 8d ago against content hash c02779a2a005, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/guard.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/adr:guard — Install write-time + commit-time hooks

Use when the user wants the bot to enforce their team's principles automatically, not just on demand.

Step 0 — Check principles exist

If .adr/principles.json doesn't exist:

Your team principles haven't been discovered yet. Run /adr:principles first — the hooks need somewhere to read the rules from.

Stop.

Step 1 — Install the hooks

adr guard install

This writes two files:

  • .claude/settings.local.json — adds a PreToolUse hook on Edit/Write/MultiEdit. Every time Claude Code is about to write to a file, the hook checks the team principles for that file's path and injects the relevant ones into the agent's context. No LLM call — pure file-based lookup.
  • .git/hooks/pre-commit — runs adr review --staged --top-n 5 before each commit. Blocks the commit if any HIGH-severity violation is found; lets medium/low through as advisory.

Both installs are idempotent — running again is a no-op.

Step 2 — Show the user what's now in effect

The hooks are installed. From now on:

  • At write time, every Edit/Write tool call shows me the team principles for that file's area. I'll surface conflicts if the change would violate one.
  • At commit time, git commit runs an automatic check. HIGH-severity violations block the commit. Bypass with git commit --no-verify if you must.

Step 3 — Offer the dry-run

Want to test it? Tell me to edit a file in this repo and I'll show you the principles that fire.

Notes for the bot

  • The pre-write hook is silent when no principles match. That's intentional — write-time noise on every Edit kills the signal. Only fires when a discovered example shares a top-level dir with the edited file, or the lens is broadly applicable.
  • Re-run adr guard install to refresh. Principles can change (re-running /adr:principles updates them); the install command is idempotent so re-running is safe.
  • Pre-commit failures are recoverable. If the user hits a block they disagree with, they can either (a) fix the issue, (b) update the principle via /adr:principles, or (c) bypass with --no-verify for an emergency commit.

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 46 lines · 50 tokens per session scan A c02779a2a005

Subscribe to this mod's changes

guard is a command published in the GitHub repository beevibe-ai/beevibe-cto (105 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 577 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.