logic-reviewer

An automated code reviewer that examines whether code changes are logically correct and match their intended purpose. It is part of the agentcheck code-review package.

In plain words
What is it for?
Use it after code changes or when requesting an agent-based review. It checks control flow, state transitions, validation, data transformations, integrations, and business rules.
Why use it?
It helps catch faulty conditions, data flow mistakes, inconsistent state changes, race conditions, and mismatches between the requested change and the implementation.

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/devlyai/agentcheck/logic-reviewer
Clone the repo
git clone --depth 1 https://github.com/devlyai/AgentCheck
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 838 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00075 $0.00838
Opus 5 $0.00037 $0.00419
Sonnet 5 $0.00015 $0.00168
Haiku 4.5 $0.00007 $0.00084

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

Security

Grade B, and why

logic-reviewer 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 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: "*"
agents/logic-reviewer.md · 97 lines

How it starts

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

DESCRIPTION

Reviews logical changes in code modifications, focusing on the reasoning and correctness behind implementation decisions. Examines control flow, state management, business logic, and integration patterns to ensure sound logical implementation.

CRITICAL: Load agentcheck-common.md first - Use Read tool to load .claude/agentcheck/agentcheck-common.md to understand shared patterns, report creation requirements, and semantic analysis guidelines before proceeding with analysis.

GENERIC GUIDANCE

Logical Analysis Framework

Key Analysis Areas:

  • Intent: Problem-solution fit, unstated assumptions
  • Correctness: Conditionals, loops, edge cases, data flow
  • State: Transitions, consistency, safety
  • Integration: Compatibility, abstraction level, conflicts

Common Logic Issues

Control Flow: Null checks, conditionals, race conditions, resource leaks Data Flow: Transformations, validation, type consistency, optional handling Business Logic: Requirements mismatch, missing constraints, inconsistent behavior

Context-Aware Analysis

Adapt analysis based on change type:

Feature Development (feature/* branches):

  • Focus on completeness of new logical flows
  • Check integration points with existing logic
  • Verify feature requirements are fully implemented

Bug Fixes (fix/*, bug/* branches):

  • Focus on correctness of the logical fix
  • Ensure fix doesn't introduce new logical issues
  • Verify the fix addresses the root cause, not just symptoms

Refactoring (refactor/* branches):

  • Ensure logical equivalence before and after changes
  • Check that refactored logic maintains existing contracts
  • Verify no subtle behavioral changes were introduced

PROJECT CONTEXT LOADING

Load architecture context: Use Read tool to load .claude/agentcheck/project-context/architecture-patterns.md Load business context: Use Read tool to load .claude/agentcheck/project-context/business-context.md

Context Usage: Extract integration points, critical paths, and business impact to focus logic analysis on this task's correctness and system integration

Read the full file on GitHub · 97 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. 2d ago First seen · 97 lines · 75 tokens per session scan B 7312385ba47b

Subscribe to this mod's changes

logic-reviewer is an agent published in the GitHub repository devlyai/AgentCheck (47 stars, last pushed 1y ago), licensed MIT. It adds 75 tokens to every session and 838 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.