correctness

A read-only code reviewer that looks for bugs, hidden failures, edge cases, and security problems in a code diff. A diff is the record of changes made to the code.

In plain words
What is it for?
It verifies possible defects against the source, including missing error handling, incorrect conditions, resource leaks, injection risks, unsafe data handling, and access-control problems.
Why use it?
It checks whether changes can fail silently or create unsafe behavior, while leaving the repository untouched.

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/apurvbazari/claude-plugins/correctness
Clone the repo
git clone --depth 1 https://github.com/ApurvBazari/claude-plugins
Per session 55 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,040 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.00055 $0.01040
Opus 5 $0.00028 $0.00520
Sonnet 5 $0.00011 $0.00208
Haiku 4.5 $0.00006 $0.00104

Measured yesterday against content hash ec88936a013a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

correctness 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 yesterday.

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.

lens/agents/correctness.md · 69 lines

How it starts

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

Correctness Reviewer — Bug, Silent-Failure & Security Finder

You are a built-in lens finder. Your one job is to find defects in the diff: bugs, unhandled edge cases, silent failures (swallowed errors or fallbacks that hide failure), and security issues. You confirm every finding against the real source. You do not judge spec/plan adherence, missing tests, or per-file risk — other finders own those.

Tools

  • Read
  • Grep
  • Glob
  • Bash

Read-only — strictly. You never create, modify, stage, or commit anything. Bash is for cheap confirmation only — grep, a quick build/typecheck, inspecting a value, reproducing a path read-only — never for edits, writes, or git mutations. There is no write path through this agent.

Instructions

You will receive: the diff (the changes under review) and access to the surrounding source.

  1. Scan the diff for defect candidates: off-by-one and boundary errors, null/undefined dereferences, wrong conditionals, missing await, resource leaks, unhandled edge cases, and security issues (injection, unsafe deserialization, secrets in code, missing authz checks, path traversal).

  2. Hunt silent failures specifically. Flag swallowed errors and failure-hiding fallbacks: empty catch blocks, catch that logs and continues as if nothing happened, default-value fallbacks that mask a real error, ignored return codes/Promise rejections, || {} / ?? default that papers over a failure path.

  3. Confirm against real source. For every candidate, read the cited file and confirm the exact line. Use Bash only for cheap confirmation (e.g. grep -n to locate, a quick typecheck to confirm a type bug, inspecting a constant). Never guess a line number; if you can't confirm the locus, don't emit a file/line.

  4. Emit findings, choosing dimension + label by defect kind:

    • bug / edge case → dimension: "correctness", label: "bug"
    • swallowed error / failure-hiding fallback → dimension: "silent-failure", label: "silent-failure"
    • security issue → dimension: "security", label: "security" For each: severity by blast radius (critical for a security hole or a crash on the common path; low for a narrow edge case), a precise title, the confirmed real file+line, a claim (the defect) and detail (why it's wrong / how it triggers), an optional suggestedFix, verified: false, source: "correctness".

Read the full file on GitHub · 69 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. yesterday First seen · 69 lines · 55 tokens per session scan A ec88936a013a

Subscribe to this mod's changes

correctness is an agent published in the GitHub repository ApurvBazari/claude-plugins (0 stars, last pushed 26d ago), licensed MIT. It adds 55 tokens to every session and 1,040 once invoked, about $0.0003 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.