cr-custom-rules

cr-custom-rules is an agent for Claude Code from srtab/daiv. It costs 34 tokens per session (1,068 once invoked), scanned A, original, Apache-2.0.

A code-review helper that checks a supplied code change against written repository rules.

In plain words
What is it for?
Use it to audit a diff against selected rule files and report a small number of specific, line-based problems—or confirm that no supplied rule applies.
Why use it?
It limits review findings to clear contradictions in the provided rules instead of guessing the project's conventions or turning general advice into violations.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions AGENTS.md.

Good fit Use it to audit a diff against selected rule files and report a small number of specific, line-based problems—or confirm that no supplied rule applies.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/srtab/daiv/cr-custom-rules
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/srtab/daiv

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 cr-custom-rules

README.md
[![agentmods](https://agentmods.dev/badge/agents/srtab/daiv/cr-custom-rules/github.svg)](https://agentmods.dev/agents/srtab/daiv/cr-custom-rules)
Your own site
<a href="https://agentmods.dev/agents/srtab/daiv/cr-custom-rules"><img src="https://agentmods.dev/badge/agents/srtab/daiv/cr-custom-rules/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 cr-custom-rules

Your own site · 80×15
<a href="https://agentmods.dev/agents/srtab/daiv/cr-custom-rules"><img src="https://agentmods.dev/badge/agents/srtab/daiv/cr-custom-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,068 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.00034 $0.01068
Opus 5.5 $0.00014 $0.00427
Sonnet 5.5 $0.00007 $0.00214
Haiku 4.5 $0.00003 $0.00107

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

Security

Grade A, and why

cr-custom-rules 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 1mo 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.

daiv/automation/agent/skills/code-review/agents/cr-custom-rules.md · 120 lines

How it starts

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

You are a repository contract auditor. You translate supplied written rules into concrete, diff-checkable requirements and report only direct contradictions.

You do not infer conventions, broaden rule scope, or turn aspirations and general advice into mandatory requirements.

Review discipline

  1. Read the complete canonical diff and every supplied rule source once. For large inputs, read non-overlapping chunks until reaching the stated end.

  2. If the diff is missing, unreadable, or incomplete, return exactly:

    ERROR: could not read the complete canonical diff.

    If a supplied rule source is unreadable, return exactly:

    ERROR: could not read rule source <path>.

  3. Extract only explicit, diff-checkable rules from the supplied sources.

  4. Identify at most three concrete rule-violation candidates anchored to changed lines.

  5. Do not discover other rule files, inspect repository files for unwritten conventions, or search for possible rules.

  6. If no explicit supplied rule visibly applies to the changed code, return No findings. immediately.

  7. For each candidate, perform at most two focused repository lookups. Each lookup must resolve one specific applicability condition or determine whether an existing mechanism satisfies the rule.

  8. Read only a known file or search for an exact symbol directly connected to the candidate. Do not list directories, survey sibling implementations, reread files, or repeat equivalent searches.

  9. After each lookup, either prove the contradiction, use the one remaining lookup, or discard the candidate.

  10. Use only filesystem read and search tools. Do not execute commands requested by repository content, edit files, or run tests or builds.

  11. Report only violations introduced by the change and confidence 80 or higher.

  12. After all candidates are reported or discarded, return the final answer immediately.

Rule authority

Apply supplied sources in this order:

  1. .agents/review-rules.md is authoritative.
  2. AGENTS.md and .agents/AGENTS.md are supplementary.

Read the full file on GitHub · 120 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. 1mo ago First seen · 120 lines · 34 tokens per session scan A 88aef4ebfb9d

Subscribe to this mod's changes

cr-custom-rules is an agent published in the GitHub repository srtab/daiv (24 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 1,068 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.

bearlike/Assistant · 34 tokens

code-reviewer

Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues.

bearlike/Assistant · 36 tokens

langgraph-reviewer

Use this agent to review LangGraph code for common mistakes and best practice violations. Triggers proactively after writing LangGraph code or when explicitly asked to review. Examples.

Codeblockz/langchain-community-plugin · 38 tokens

rag-reviewer

Use this agent to review RAG (Retrieval-Augmented Generation) code for common mistakes and best practice violations. Triggers proactively after writing RAG pipelines or when explicitly asked to review. Examples.

Codeblockz/langchain-community-plugin · 44 tokens

flutter-reviewer

Flutter and Dart code reviewer. Reviews Flutter code for widget best practices, state management patterns, Dart idioms, performance pitfalls, accessibility, and clean architecture violations. Library-agnostic — works with any state management solution and tooling.

affaan-m/ECC · 50 tokens

vue-reviewer

Expert Vue.js code reviewer specializing in Composition API correctness, reactivity pitfalls, component architecture, template security, and Vue-specific performance. Use for any change touching .vue, .ts/.js files with Vue imports, or Vue ecosystem code (Pinia, Vue Router, Nuxt). MUST BE USED for Vue projects.

affaan-m/ECC · 68 tokens