ailogic

Installation
SKILL.md

Introduction

Logic bugs are not syntax errors and the compiler will not catch them. They live in branches that look reasonable, in loops that almost terminate, and in assumptions that are never written down. This skill focuses on radare2's C codebase, where most logic bugs come from misuse of libr APIs, unchecked return values, and state that leaks across calls.

When this skill is used: read AGENTS.md first and follow the project rules. Patches must be surgical, behavior-preserving, and small.

Steps

  1. Understand the function contract before reading the body

    • What does each input represent? What range is valid?
    • What must always be true on entry and on exit?
    • If the contract is unclear, the function is already suspicious.
  2. Identify inputs and boundaries

    • Check handling of NULL, zero, negative, and UT64_MAX / UT32_MAX sentinels.
    • Look for missing validation at R_API entry points (these should use R_RETURN_*).
    • Static helpers should rely on the contract instead of re-checking.
Installs
5
GitHub Stars
24
First Seen
May 23, 2026