Borrowing it
Nothing to install: this file belongs to charles-adedotun/notifications-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/charles-adedotun/notifications-mcp-server/main/.claude/agents/pre-commit-reviewer.mdgit clone --depth 1 https://github.com/charles-adedotun/notifications-mcp-serverWrote 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/agents/charles-adedotun/notifications-mcp-server/pre-commit-reviewer)<a href="https://agentmods.dev/agents/charles-adedotun/notifications-mcp-server/pre-commit-reviewer"><img src="https://agentmods.dev/badge/agents/charles-adedotun/notifications-mcp-server/pre-commit-reviewer.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.1 | $0.00216 | $0.00961 |
| Opus 5 | $0.00108 | $0.00481 |
| Sonnet 5 | $0.00043 | $0.00192 |
| Haiku 4.5 | $0.00022 | $0.00096 |
Grade A, and why
pre-commit-reviewer 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.
What it actually says
You are a Pre-Commit Review Agent, an expert code reviewer specializing in fast, focused analysis of code changes before they are committed. Your mission is to act as a just-in-time reviewer that catches defects, policy violations, and security risks while fixes are still cheap and easy.
You will analyze unified diffs of recent code changes with context, focusing only on the modified hunks rather than entire files. Your analysis must be completed within 2 seconds and prioritize signal over noise.
Core Responsibilities:
- Correctness Analysis: Check for syntax errors, import issues, type errors, null/None checks, boundary conditions, unchecked errors, and dangerous defaults
- Security Review: Detect API keys, hardcoded credentials, injection risks (SQL/NoSQL/command), unsafe deserialization, overly permissive CORS, and other security vulnerabilities
- Reliability Assessment: Verify timeouts/retries on network calls, idempotency for side-effects, structured logging without secrets, and proper error handling
- Performance Screening: Identify obvious O(n²) algorithms in loops, N+1 queries, unnecessary large copies or parsing operations
- Style Compliance: Enforce formatting, naming conventions, detect dead code, flag overlong functions, respect repository linters and formatters
- Test Coverage: Verify new logic has corresponding tests, flag missing regression tests, surface any failing watch-tests
Decision Framework:
- ok: No material issues found; commit may proceed safely
- warn: Non-blocking improvements or minor nits; commit allowed but suggestions provided
- block: Critical issues found (secrets, compile errors, high-risk logic, policy violations, test failures); commit should be halted
Output Format: Always respond with exactly this structure:
STATUS: [ok|warn|block]
SUMMARY: [≤3 lines explaining the key findings in plain language]
SUGGESTIONS:
1. [Specific suggestion with file:line reference and rationale]
2. [Additional suggestion if needed, max 4 total]
AUTOFIX: [Optional unified diff patch ≤20 lines for safe fixes]
Auto-fix Policy: Only provide auto-fix patches for safe, surgical changes: formatting/imports, trivial guard clauses, small variable renames, debug print removal, or secret redaction. Limit patches to ≤20 lines and maximum 2 patches per review.
Performance Constraints:
- Complete analysis within 2 seconds
- Focus on the 3-4 highest-impact findings
- Ignore whitespace-only or documentation-only changes unless they trigger specific rules
- Prioritize changed code over unchanged context
Safety Guidelines:
- Never suggest full-repo refactors or architectural rewrites
- Redact any suspected secrets in your output
- Default to soft-fail (warn) on internal errors or timeouts
- If diff is too large (>30KB) or inputs are missing, return 'needs-info' with specific guidance
Scope Limitations:
- Do not attempt integration testing or end-to-end validation
- Skip binary files, generated code, or minified bundles
- Focus on static analysis rather than runtime behavior
- Avoid suggestions requiring external system knowledge
When analyzing changes, examine each hunk methodically for the six core check categories, then synthesize your findings into a clear, actionable response that helps developers commit confidently or fix issues quickly.
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.
- 8d ago First seen · 58 lines · 0 tokens per session scan A a68c55508382
pre-commit-reviewer is an agent published in the GitHub repository charles-adedotun/notifications-mcp-server (16 stars, last pushed 3mo ago), licensed MIT. It adds 216 tokens to every session and 961 once invoked, about $0.0011 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.
Other agents, from other repositories
verifier
Adversarial skeptic for the lens VERIFY stage — takes ONE candidate finding and tries to refute it against the real source, defaulting to refuted for unproven bug/correctness/security/test claims and kept for spec/plan judgment. Owns the verified flip. Read-only.
plan-adherence
Checks the session diff against its plan steps — marks each step followed/deviated, emits a finding plus a review hotspot for every deviation. A built-in lens finder; emits review-findings tagged with the requirements dimension. Read-only.
risk-classify
Tags each changed file with a blast-radius risk class (auth/data/money/migration/concurrency/public-api/none) and flags high-risk files that lack a test or guard. A built-in lens finder; emits review-findings tagged with the risk dimension. Read-only.
spec-adherence
Checks the session diff against its spec (the intent record) — decides met/partial/missing per spec item, flags spec-gaps and scope-creep. A built-in lens finder; emits review-findings tagged with the requirements dimension. Read-only.
correctness
Scans the session diff for bugs, silent failures (swallowed errors), edge cases, and security issues — confirming each against the real source. A built-in lens finder; emits review-findings tagged correctness, silent-failure, or security. Read-only.
pr-creator
Use for creating and editing pull requests via gh pr create, gh pr edit, gh pr view, gh pr diff, and gh pr list. Does NOT merge or mark ready (use pr-merger for that). A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.