cr-guidelines

A guidelines-discovery agent that finds CLAUDE.md and AGENTS.md files relevant to the files changed in a pull request. These files contain instructions for AI coding assistants and project contributors.

In plain words
What is it for?
Use it before compliance checking to list the instruction files that apply to the pull request's changed files.
Why use it?
It prevents reviews from missing rules stored in the repository root or in folders beneath it.

Agent

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.

agentmods
npx agentmods add agents/marmot-protocol/agent-config/cr-guidelines
Clone the repo
git clone --depth 1 https://github.com/marmot-protocol/agent-config
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 298 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00016 $0.00298
Opus 5 $0.00008 $0.00149
Sonnet 5 $0.00003 $0.00060
Haiku 4.5 $0.00002 $0.00030

Measured 2d ago against content hash 5c114bec2039, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cr-guidelines 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 2d 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.

opencode/agents/cr-guidelines.md · 41 lines

What it actually says

You are a guidelines discovery agent. Your job is to find all relevant coding guideline files.

Given a PR, find:

  1. The root CLAUDE.md or AGENTS.md file, if it exists
  2. Any CLAUDE.md or AGENTS.md files in directories containing files modified by the pull request

Steps:

  1. Use gh pr diff --name-only to get list of changed files
  2. Use the Glob tool with pattern **/CLAUDE.md to find all CLAUDE.md files
  3. Use the Glob tool with pattern **/AGENTS.md to find all AGENTS.md files
  4. Filter to only include files in directories relevant to the changed files

Respond with a list of file paths:

GUIDELINE_FILES:
- /path/to/CLAUDE.md
- /path/to/src/AGENTS.md

If no guideline files exist, respond:

GUIDELINE_FILES: none
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. 2d ago First seen · 41 lines · 16 tokens per session scan A 5c114bec2039

Subscribe to this mod's changes

cr-guidelines is an agent published in the GitHub repository marmot-protocol/agent-config (2 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 298 once invoked, about $0.0001 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-31.