low-level-code-review

Reviews git diffs for localized coding mistakes and produces a structured fix worklist.

3.3k|1.1k|Updated Nov 24, 2014
One-click install
npx skills add https://github.com/stellar/stellar-core --skill low-level-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: low-level-code-review
Source: https://github.com/stellar/stellar-core/tree/main/.claude/skills/low-level-code-review
Command: npx skills add https://github.com/stellar/stellar-core --skill low-level-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing diffs for small mechanical bugs like off-by-one errors, null dereferences, and typos is tedious and easy to rush through, letting simple defects slip into the codebase.

Core Features & Use Cases

  • Mechanical Bug Detection: Scans changed lines for definite bugs such as numeric overflow, uninitialized variables, resource leaks, use-after-free, and boolean logic errors.
  • ACID Semantics Checks: Verifies write-to-temp-plus-rename patterns, fsync ordering, locking around shared state, and atomicity of in-memory state changes.
  • Structured Worklist Output: Groups findings by file with exact line numbers, quoted original code, concrete fixes, and one-sentence explanations.
  • Use Case: Before merging a C++ pull request, run this review on the branch diff to catch copy-paste errors, signed/unsigned comparisons, and missing fsync calls without needing deep system knowledge.

Quick Start

Review the diff from my current branch against master for low-level coding mistakes and give me a worklist of fixes.

Frequently Asked Questions about low-level-code-review

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

FAQPage Schema
How do I review a git diff for bugs before merging?

Provide a git range such as uncommitted changes, a branch diff against master, or a specific commit range. The review scans only added lines for mechanical bugs and returns a worklist grouped by file with line numbers, original code, and concrete fixes.

What kinds of bugs does a low-level code review catch?

It catches definite bugs like numeric overflow, off-by-one errors, null dereferences, uninitialized variables, resource leaks, use-after-free, and boolean logic errors. It also flags likely mistakes such as copy-paste errors, wrong variables, and signed/unsigned comparisons.

How do I review a very large diff effectively?

Split the review into pieces and run each piece as a subagent, for example one subagent per file or directory. Diffs with more than roughly 500 lines of additions should be split to keep each review focused and thorough.

Does this review check file write durability and crash safety?

Yes, it checks ACID semantics on disk by verifying write-to-temp-plus-rename patterns, fsync of the temp file before rename, and fsync of the directory after rename. It also examines in-memory atomicity, locking, and error rollback.

What issues will this review not report?

It never suggests refactoring, redesign, or architectural changes, and skips anything requiring broader system understanding. It also ignores issues a compiler warning would catch, intentional patterns, and lines not modified in the diff.