ffi-code-review

ffi-code-review is a skill for Claude Code, Codex from existential-birds/beagle. It costs 52 tokens per session (2,804 once invoked), scanned A, original, Apache-2.0.

A review guide for Rust FFI code, where FFI means calling code written in another language such as C or C++. It checks data layout, strings, pointers, callbacks, linking, and unsafe boundaries.

In plain words
What is it for?
Use it when reviewing extern blocks, C or C++ library calls, bindgen output, build scripts, or Rust types exposed across a native-code boundary.
Why use it?
It helps find mismatches that can corrupt memory, call the wrong native function, mishandle ownership, or let a Rust panic cross into foreign code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing extern blocks, C or C++ library calls, bindgen output, build scripts, or Rust types exposed across a native-code boundary.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/existential-birds/beagle/ffi-code-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add existential-birds/beagle --skill ffi-code-review
Clone the repo
git clone --depth 1 https://github.com/existential-birds/beagle

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ffi-code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/existential-birds/beagle/ffi-code-review/github.svg)](https://agentmods.dev/skills/existential-birds/beagle/ffi-code-review)
Your own site
<a href="https://agentmods.dev/skills/existential-birds/beagle/ffi-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/ffi-code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ffi-code-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/existential-birds/beagle/ffi-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/ffi-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.02804
Opus 5.5 $0.00021 $0.01122
Sonnet 5.5 $0.00010 $0.00561
Haiku 4.5 $0.00005 $0.00280

Measured 4d ago against content hash 41b2471c6930, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ffi-code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ffi-code-review/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FFI Code Review

Review Workflow

  1. Check Cargo.toml -- Note Rust edition (2024 has breaking changes to extern blocks and unsafe attributes), build-dependencies (bindgen, cc, pkg-config), crate-type (cdylib, staticlib), and links key
  2. Check build.rs -- Verify link directives (cargo:rustc-link-lib, cargo:rustc-link-search), bindgen configuration, and C source compilation
  3. Check extern blocks -- Verify calling conventions, symbol declarations, and safety annotations
  4. Check type layout -- Every type crossing FFI must be #[repr(C)] or a primitive FFI type
  5. Check string and pointer handling -- CStr/CString usage, null checks, ownership transfers
  6. Check callbacks -- extern "C" fn pointers, panic safety across FFI boundary
  7. Gates -- Complete Gates below before reporting; do not skip ahead on “internal verification”

Gates

Complete in order. Do not emit findings until Gate 4 passes for each issue.

Gate 1 — Crate context (on disk)
PASS when: You opened the reviewed crate’s Cargo.toml (workspace member path if applicable) and recorded edition =, plus any of links, crate-type, or build-dependencies that matter for this FFI.
Blocks rationalization: Edition-specific findings (unsafe extern "C" {}, #[unsafe(no_mangle)], etc.) require this — if edition is not 2024, do not flag 2024-only requirements.

Gate 2 — Linkage and binding sources
PASS when: If the crate links native code or uses bindgen/pkg-config, you opened build.rs (or the checked-in bindings entry point). If there is no build.rs, you stated that bindings are hand-written and reviewed those extern / include! sites.
Artifact: At least one path you opened (e.g. build.rs, src/ffi.rs, or OUT_DIR bindings via include!).

Gate 3 — Code evidence
PASS when: Every planned finding has a target [FILE:LINE] from a full function/block you read, not only diff hunks or partial snippets.

Read the full file on GitHub · 185 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +27 lines 41b2471c6930
  2. 2mo ago First seen · 158 lines · 52 tokens per session scan A 5cfa0bdafb76

Subscribe to this mod's changes

ffi-code-review is a skill published in the GitHub repository existential-birds/beagle (91 stars, last pushed 4d ago), licensed Apache-2.0. It adds 52 tokens to every session and 2,804 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-16.

Related

ffi-code-review compared with skills from other repositories

ffi-code-review next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ffi-code-reviewexistential-birds/beagleSkill914d agoApache-2.0A52Claude Code, Codex
coding-standardsSimon-Hwang/gg-pluginsSkill24mo agononeA34Claude Code
codex-rule-routerSimon-Hwang/gg-pluginsSkill24mo agononeA39Claude Code
python-engineering-guidelinesanywhere-labs/Agents-AnywhereSkill3.9kyesterdayApache-2.0A75Codex
pr-to-go-lintergithub/gh-awSkill5.7ktodayMITA22Claude Code, Codex
splitting-oversized-modulesPostHog/posthog-fossSkill733todayMITA197Claude Code, Codex
ring:verifying-codeLerianStudio/ringSkill21829d agoApache-2.0A101Cursor