clauder: Command for Claude Code

.claude/commands/guardrails.md

guardrails is a command for Claude Code from spacehendrix/clauder. It costs 0 tokens per session (694 once invoked), scanned A, original, Apache-2.0.

A project review command that proposes shell-command permission rules. It identifies routine read or build commands that can be allowed without prompts and dangerous commands that should be blocked.

In plain words
What is it for?
Use it to review a repository's tests, linters, build tools, deployment files, and existing allow or deny rules, then suggest safer command permissions.
Why use it?
It helps prevent accidental changes to project files, data, or infrastructure while keeping common development checks convenient. It bases the proposals on the project's tools, configuration, and current permission lists.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

This is spacehendrix/clauder's own configuration. It tells Claude Code how to work on clauder itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything clauder configures →

Reuse

Borrowing it

Nothing to install: this file belongs to spacehendrix/clauder. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/spacehendrix/clauder/main/.claude/commands/guardrails.md
Clone the repo
git clone --depth 1 https://github.com/spacehendrix/clauder

Made for: Claude Code.

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 guardrails

README.md
[![agentmods](https://agentmods.dev/badge/commands/spacehendrix/clauder/guardrails/github.svg)](https://agentmods.dev/commands/spacehendrix/clauder/guardrails)
Your own site
<a href="https://agentmods.dev/commands/spacehendrix/clauder/guardrails"><img src="https://agentmods.dev/badge/commands/spacehendrix/clauder/guardrails/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for guardrails

Your own site · 80×15
<a href="https://agentmods.dev/commands/spacehendrix/clauder/guardrails"><img src="https://agentmods.dev/badge/commands/spacehendrix/clauder/guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 694 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.00000 $0.00694
Opus 5.5 $0.00000 $0.00278
Sonnet 5.5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00069

Measured 12d ago against content hash 1ab29aca9674, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

guardrails 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 12d 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.

.claude/commands/guardrails.md · 19 lines

How it starts

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

Project Guardrails

Review this project and propose permission guardrails: shell commands that should be allowed without prompting because they are routine and safe here, and commands that should be denied because an accidental run would damage this project, its data, or its infrastructure. If a user direction is provided, focus on it.

Steps

  1. Understand the project and its purpose. Read the top-level layout, manifests, build and test configuration, CI files, deployment and infrastructure files, scripts, and CLAUDE.md if present. Delegate deeper exploration to the investigator agent so your own context stays small. Note the stack, the package manager, the test runner, the linters, the databases, the cloud or hosting providers, and any production-facing tooling.
  2. Read the current rules: permissions.allow and permissions.deny in .claude/settings.json and in .claude/settings.local.json if it exists. The deny list is the single source of truth for blocked shell commands; there is no separate unsafe-command hook.
  3. Propose allow rules for commands this project runs constantly and that only read or build: the test runner, linters, type checkers, formatters in check mode, builds, dependency listing, and read-only invocations of the project's own CLI. Never propose broad patterns such as Bash(*), a whole package manager, or anything that installs, publishes, deploys, or deletes.
  4. Propose deny rules for commands whose accidental use would be hard to reverse in this project specifically: deploy and release commands, infrastructure apply or destroy, production database CLIs and migration tools, container and cluster deletion, cloud CLIs with write access, publishing to registries, bulk deletion of data or generated directories the project depends on, and anything that rotates or prints credentials. Prefer the narrowest pattern that catches the dangerous form and leaves the safe form usable.
  5. Present the proposal as two short tables, one for allow and one for deny. Each row: the exact rule, a one-line description of what it covers, and why it belongs here. Mark rules that duplicate an existing hook or rule as redundant and leave them out. Keep the lists short; a guardrail nobody understands gets removed.
  6. Ask the user for approval or feedback on each list. Use AskUserQuestion when available, otherwise ask in plain text and wait. Do not change anything before the user answers. Apply their edits and re-present only the rows that changed.
  7. Apply the approved rules to .claude/settings.local.json, creating the file with {"permissions": {"allow": [], "deny": []}} if it is missing and preserving everything else in it. Never remove an existing clauder rule from .claude/settings.json, and never add an allow rule for a command that a deny rule covers.
  8. Report what was written, what was declined, and remind the user that a new session is needed for permission changes to take effect.

Read the full file on GitHub · 19 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. 12d ago First seen · 19 lines · 0 tokens per session scan A 1ab29aca9674

Subscribe to this mod's changes

guardrails is a command published in the GitHub repository spacehendrix/clauder (58 stars, last pushed 12d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 694 tokens. 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-10-16.