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.
npx agentmods add instructions/railyard-dev/railguard/claude-mdgit clone --depth 1 https://github.com/railyard-dev/railguardWrote 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.
[](https://agentmods.dev/instructions/railyard-dev/railguard/claude-md)<a href="https://agentmods.dev/instructions/railyard-dev/railguard/claude-md"><img src="https://agentmods.dev/badge/instructions/railyard-dev/railguard/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00627 | $0.00627 |
| Opus 5 | $0.00313 | $0.00313 |
| Sonnet 5 | $0.00125 | $0.00125 |
| Haiku 4.5 | $0.00063 | $0.00063 |
Grade B, and why
railguard CLAUDE.md scanned grade B with 1 finding 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 4d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Modify `~/.claude/settings.json` — it will be blocked. How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Railguard — Active Guardrails
Railguard is monitoring this session. Every tool call (Bash, Write, Edit, Read) passes through Railguard before execution.
What you need to know
- Some commands will be blocked. If you see a "denied" response from a hook, it means Railguard blocked the command. Do NOT retry the same command — find a safer alternative.
- Some commands require human approval. If you see an "ask" response, the human will be prompted to approve or deny.
- File writes are snapshotted. Every Write/Edit you make is backed up before execution. The human can rollback any change.
- Everything is logged. All tool calls and decisions are recorded in
.railguard/traces/.
If something goes wrong
If the human asks you to undo changes, fix a mistake, or rollback:
-
Get context first. Run:
railguard context --session $SESSION_ID --verboseThis shows you exactly what changed, diffs, blocked commands, and available rollback commands. -
Check what changed. Run:
railguard diff --session $SESSION_IDOr for a specific file:railguard diff --session $SESSION_ID --file <path> -
Rollback options:
- Undo the last edit:
railguard rollback --session $SESSION_ID --steps 1 - Undo the last N edits:
railguard rollback --session $SESSION_ID --steps N - Restore a specific file:
railguard rollback --session $SESSION_ID --file <path> - Restore everything:
railguard rollback --session $SESSION_ID - Restore a specific snapshot:
railguard rollback --session $SESSION_ID --id <snapshot-id>
- Undo the last edit:
-
Find your session ID. Run:
railguard logThis lists all sessions. Pick the most recent one.
Configuring Railguard
You can help the user customize their Railguard policy. This is encouraged:
- Read
railguard.yamlto understand the current policy. - Propose edits to
railguard.yaml— the user will be prompted to approve before any change is applied. - Run
railguard initto generate a starterrailguard.yamlif one doesn't exist (user approves). - Run
railguard statusto show the current protection state. All changes to Railguard policy require explicit human approval. You generate the change, the user reviews and accepts or rejects it. Changes take effect on the next tool call — no restart needed.
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.
- 4d ago First seen · 48 lines · 627 tokens per session scan B 78ddb4ab9d67
railguard CLAUDE.md is an instructions file published in the GitHub repository railyard-dev/railguard (38 stars, last pushed 5mo ago), licensed MIT. It adds 627 tokens to every session, about $0.0031 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
bifrost AGENTS.md
AGENTS.md instructions for maximhq/bifrost, covering agents.md — bifrost ai gateway, what is bifrost?, repository layout, go workspace and build, test & dev commands.
Doberman-Core AGENTS.md
AGENTS.md instructions for DobermanCore/Doberman-Core, covering claude.md — doberman operating manual, 0. on startup (every session), 1. what this repository is, 2. architecture & extension points and 3. prime directives (non-negotiable).
agentscope-runtime copilot-instructions.md
Instructions for agentscope-ai/agentscope-runtime, covering agentscope runtime code review guide, 1. code quality, 2. [must] code security, 3. [must] testing & dependencies and 4. code standards.
agent-guardrails-template CLAUDE.md
Instructions for TheArchitectit/agent-guardrails-template, covering project guidelines, 0. navigation maps (read first), 0.1 agent-gdui-2026 initialization context, 1. context & setup and 2. token-saving rules (strict).
FeatherlaneAI AGENTS.md
Instructions for ducnguyen67201/FeatherlaneAI, covering repository agent instructions, skills, architecture: rust backend is the source of truth, page integration expectations and implementation checklist.
vibeguard AGENTS.md
AGENTS.md instructions for majiayu000/vibeguard, covering agent instructions, scope, start here, core rules and delivery policy.