ailogic

Analyze C control flow and state transitions with radare2 to identify logic defects.

20|1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/radareorg/radare2-skills --skill ailogic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ailogic
Source: https://github.com/radareorg/radare2-skills/tree/main/dev/ailogic
Command: npx skills add https://github.com/radareorg/radare2-skills --skill ailogic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you uncover logic bugs that compilers won’t catch in C code by scrutinizing control flow, state transitions, and unchecked assumptions within radare2 workflows.

Core Features & Use Cases

  • Control-flow driven auditing: Disassembles functions and traces every branch to spot missing cases, inverted conditions, early-return cleanup gaps, and fallthrough hazards.
  • State and loop integrity checking: Verifies variable initialization/mutation/consumption, detects stale state across calls, and catches off-by-one and non-terminating loop patterns.
  • Error-path and assumption validation: Ensures return values and IO/parse outcomes are checked on all paths, and flags silent assumptions (e.g., non-empty lists, NUL-terminated buffers).
  • Actionable reporting workflow: Produces an append-only, dated report that structures findings into task blocks with severity and fix guidance.

Quick Start

Use the ailogic skill to audit a suspected radare2 C function by tracing its control flow and state usage, validating all error paths, and outputting an append-only report (default: ailogic-report.md).

Frequently Asked Questions about ailogic

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

FAQPage Schema
How do I find logic bugs in C code that compilers miss?

You can find logic bugs in C code by using radare2-driven static inspection to scrutinize control flow, state transitions, and unchecked assumptions. This approach traces every branch and validates error paths to uncover silent defects that compilers typically miss.

How do I audit error handling and return values in radare2 C functions?

Auditing error handling in radare2 C functions involves validating return values and IO or parse outcomes across all execution paths. The analysis flags silent assumptions like unchecked non-empty lists and NUL-terminated buffers to ensure proper boundary handling.

Can I use radare2 to detect off-by-one errors and loop integrity issues?

Yes, radare2 can detect off-by-one errors and loop integrity issues by verifying variable mutation and consumption. It analyzes state transitions across calls to catch non-terminating loop patterns and stale state within C code.

What is the best way to triage vulnerabilities in C code using static analysis?

Vulnerability triage in C code is best performed through control-flow driven auditing that disassembles functions and traces branches. This identifies missing cases, inverted conditions, and fallthrough hazards backed by reproducer-oriented reasoning and code evidence.

Does this approach generate structured reports for C code auditing findings?

Yes, this approach generates an append-only, dated report that structures C code auditing findings into task blocks. Each finding includes severity gating and fix guidance, providing an actionable workflow for identified logic defects.