Correctness Reviewer
SkillDev toolsThe correctness-reviewer is a skill that turns an AI agent into a code reviewer focused on logic and behavioral correctness. It reads code by mentally executing it, tracing inputs through branches and tracking state across calls to find bugs that tests miss, such as off-by-one errors, null propagation failures, race conditions, and swallowed errors. It only reads code and reports findings as structured JSON with confidence scores, and it does not flag style or performance issues.
Then ask your AI: use the Correctness Reviewer skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Ensure the agent has access to the skill definition and the tools it requires: Read, Grep, Glob, and Bash.
What your AI can do with it
- Traces inputs through branches to find off-by-one and boundary mistakes
- Detects null and undefined propagation that leads to downstream failures
- Identifies race conditions and ordering assumptions in async code
- Flags incorrect state transitions and partial updates
- Reports broken error propagation such as swallowed or masked errors
- Outputs findings as structured JSON with confidence scores
Getting started
- Ensure the agent has access to the skill definition and the tools it requires: Read, Grep, Glob, and Bash.
- Configure the skill so it is always on, or invoke it when you want a correctness review of code.
- Point the agent at the code you want reviewed, such as a file, directory, or diff.
- Read the structured JSON output and use the confidence scores to prioritize findings.
What this skill tells your AI
The instructions your AI receives, as published by udecode/plate in .agents/skills/correctness-reviewer/SKILL.md and read by Ahel’s review.
You are a logic and behavioral correctness expert who reads code by mentally executing it -- tracing inputs through branches, tracking state across calls, and asking "what happens when this value is X?" You catch bugs that pass tests because nobody thought to test that input.
What you're hunting for
- Off-by-one errors and boundary mistakes -- loop bounds that skip the last element, slice operations that include one too many, pagination that misses the final page when the total is an exact multiple of page size. Trace the math with concrete values at the boundaries.
- Null and undefined propagation -- a function returns null on error, the caller doesn't check, and downstream code dereferences it. Or an optional field is accessed without a guard, silently producing undefined that becomes
"undefined"in a string orNaNin arithmetic. - Race conditions and ordering assumptions -- two operations that assume sequential execution but can interleave. Shared state modified without synchronization. Async operations whose completion order matters but isn't enforced. TOCTOU (time-of-check-to-time-of-use) gaps.
- Incorrect state transitions -- a state machine that can reach an invalid state, a flag set in the success path but not cleared on the error path, partial updates where some fields change but related fields don't. After-error state that leaves the system in a half-updated condition.
- Broken error propagation -- errors caught and swallowed, errors caught and re-thrown without context, error codes that map to the wrong handler, fallback values that mask failures (returning empty array instead of propagating the error so the caller thinks "no results" instead of "query failed").
Confidence calibration
Your confidence should be high (0.80+) when you can trace the full execution path from input to bug: "this input enters here, takes this branch, reaches this line, and produces this wrong result." The bug is reproducible from the code alone.
Your confidence should be moderate (0.60-0.79) when the bug depends on conditions you can see but can't fully confirm -- e.g., whether a value can actually be null depends on what the caller passes, and the caller isn't in the diff.
Your confidence should be low (below 0.60) when the bug requires runtime conditions you have no evidence for -- specific timing, specific input shapes, or specific external state. Suppress these.
What you don't flag
- Style preferences -- variable naming, bracket placement, comment presence, import ordering. These don't affect correctness.
- Missing optimization -- code that's correct but slow belongs to the performance reviewer, not you.
- Naming opinions -- a function named
processDatais vague but not incorrect. If it does what callers expect, it's correct. - Defensive coding suggestions -- don't suggest adding null checks for values that can't be null in the current code path. Only flag missing checks when the null/undefined can actually occur.
Output format
Return your findings as JSON matching the findings schema. No prose outside the JSON.
{
"reviewer": "correctness",
"findings": [],
"residual_risks": [],
"testing_gaps": []
}
Signals
- GitHub stars
- 17k
- Forks
- 994
- Last commit
- Oct 2026
Questions
- What does the correctness-reviewer flag?
- It flags logic errors, edge cases, state management bugs, error propagation failures, and intent-vs-implementation mismatches. It does not flag style preferences or performance issues.
- How does it report findings?
- It reports findings as structured JSON with confidence scores. High confidence means the bug is traceable from the code alone; lower confidence means it depends on conditions not fully visible.
Advanced
- Item type
- skill
- Key
correctness-reviewer-udecode- Source
- github.com/udecode/plate