correctness-lens

Evaluate code and plans for logical correctness, boundary handling, and concurrency safety.

30|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/atomicinnovation/accelerator --skill correctness-lens
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: correctness-lens
Source: https://github.com/atomicinnovation/accelerator/tree/main/skills/review/lenses/correctness-lens
Command: npx skills add https://github.com/atomicinnovation/accelerator --skill correctness-lens

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The correctness-lens helps developers and reviewers find subtle logic errors that cause incorrect results, missed edge cases, and broken state transitions before they reach production by evaluating code and plans against formal correctness criteria.

Core Features & Use Cases

  • Logical validity checks: Verify branch completeness, boolean expressions, arithmetic safety, and invariant preservation across function boundaries.
  • Boundary and edge-case analysis: Assess handling of empty inputs, off-by-one errors, null/undefined propagation, and extreme numeric values.
  • State and concurrency validation: Review state machine transitions, initialization and teardown completeness, TOCTOU patterns, race conditions, and async/await correctness.
  • Use Case: Apply this lens to a code change that modifies workflow state or introduces concurrency to ensure correctness under concurrent execution and unexpected inputs.

Quick Start

Ask the correctness-lens to review the change or plan for logical errors, missing edge-case handling, and concurrency risks and provide findings with confidence levels.

Frequently Asked Questions about correctness-lens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my code for race conditions and state machine transition bugs?

Analyze code and plans against formal correctness criteria to verify branch completeness, initialization and teardown paths, and TOCTOU patterns. This identifies race conditions and assigns confidence levels to each finding.

What is the best way to review code for off-by-one errors and boundary handling?

The best way to review code for boundary handling is to evaluate it for logical correctness by assessing the handling of empty inputs, off-by-one errors, null propagation, and extreme numeric values. This ensures arithmetic safety and invariant preservation across function boundaries.

How do I verify invariant preservation and branch completeness during a code review?

Verify invariant preservation by evaluating boolean expressions and arithmetic safety across function boundaries during code review. This ensures branch completeness and logical validity by checking that all state transitions and paths are handled correctly.

Does this correctness review approach work for async/await code and concurrent systems?

Yes, this correctness review approach works for async/await code and concurrent systems by validating state machine transitions, checking initialization completeness, and identifying TOCTOU patterns and race conditions under concurrent execution.

Can I use this to validate plan reviews for stateful component changes before implementation?

Yes, you can validate plan reviews for stateful component changes before implementation. Evaluating plans against formal correctness criteria detects missed edge cases and broken state transitions early, ensuring logical validity and concurrency safety before reaching production.