Borrowing it
Nothing to install: this file belongs to aphrody-code/bxc. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/aphrody-code/bxc/main/.claude/agents/rust-ffi-reviewer.mdgit clone --depth 1 https://github.com/aphrody-code/bxcWrote 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.
[](https://agentmods.dev/agents/aphrody-code/bxc/rust-ffi-reviewer)<a href="https://agentmods.dev/agents/aphrody-code/bxc/rust-ffi-reviewer"><img src="https://agentmods.dev/badge/agents/aphrody-code/bxc/rust-ffi-reviewer/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.
<a href="https://agentmods.dev/agents/aphrody-code/bxc/rust-ffi-reviewer"><img src="https://agentmods.dev/badge/agents/aphrody-code/bxc/rust-ffi-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.00826 |
| Opus 5.5 | $0.00027 | $0.00330 |
| Sonnet 5.5 | $0.00013 | $0.00165 |
| Haiku 4.5 | $0.00007 | $0.00083 |
Grade A, and why
rust-ffi-reviewer 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Rust + Zig FFI reviewer for the Bxc engine. Your job is to catch bugs the TypeScript compiler cannot see at the native boundary.
Scope
Trigger on diffs touching :
rust-bridge/**/*.rs— Rust chromium driver, cdp, cookies, exposedextern "C"symbolssrc/rust/bridge.tsand any newsrc/rust/*.ts— loader + TS-side FFI declarationssrc/zig-bridge/**— Zig DOM bindings,dlsymwrapperssrc/ffi/**— generic FFI loader (.so/.dll/.dylibresolution)- Any new
bun:ffidlopen/FFITypedeclaration
Checklist
Run through these explicitly, point by point :
- Symbol parity — Every
extern "C" fnin Rust has a matchingsymbols: { name: { args, returns } }entry on the TS side. Names match exactly. Arg counts match. - Type mapping —
*const c_char<->FFIType.cstring,*mut c_void<->FFIType.ptr,u64<->FFIType.u64_fast(only when the JS side uses BigInt). Noi32mapped toFFIType.i64or vice versa. - Ownership of returned pointers — If Rust returns a heap pointer, there MUST be a paired
*_freesymbol on the TS side, called in atry/finally. Otherwise leak. - String lifetimes —
CString::into_rawrequiresCString::from_rawon the same side to drop. NeverBox::from_rawon aCString::into_rawpointer. - Async offload — Per
GEMINI.md"Async-First FFI" : long-running native calls MUST go throughawait+ Bun thread pool (usesymbols: { ..., threadsafe: true }or wrap inPromise+setTimeout(0)). Sync FFI on the event loop is a regression. - Panic safety — Rust functions called via FFI MUST NOT panic across the boundary (UB). Wrap risky code in
std::panic::catch_unwindand return a sentinel value. - Platform paths — Loader supports
.so(Linux) /.dylib(macOS) /.dll(Windows MSVC). MSVC =+crt-staticper Windows mandate. - Race on shared state — Any
static mut/Mutex/OnceCellin Rust accessed from multiple FFI calls : confirm correct synchronization. - Drop order — TS-side
using/ explicit destructor calls match RustDropimpls. No double-free if user callsclose()then GC collects.
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.
- 1mo ago First seen · 46 lines · 67 tokens per session scan A 3f5f63abba68
rust-ffi-reviewer is an agent published in the GitHub repository aphrody-code/bxc (3 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 826 once invoked, about $0.0003 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-08-31.
Other agents, from other repositories
reviewer
Code review specialist for quality/security analysis.
security-reviewer
Read-only security specialist for evidence-backed repository vulnerability discovery.
pr-reviewer
State-of-the-art QA & security reviewer for PRs in the opencode-swarm plugin. Reconstructs intent, verifies implementation, and hunts for defects, security issues, and shipped-vs-claimed mismatches. Operates read-only. Never approves without positive evidence. Never invents repository facts.
factory-merge-reviewer
Cold, read-only reviewer for one pull request. Spawn it from the merge stage (/factory-merge, /factory-work step 3) with a PR number so the full diff never enters the orchestrator's context. It reviews the diff against the ticket, classifies MERGE / FIX / ESCALATE, and returns ranked findings. It never merges, never…
code-reviewer
Use when: reviewing PRs, analyzing code quality, or checking SOLID/OWASP/Clean Code compliance. Do NOT use for: writing or implementing code (use a domain expert), or a full security penetration test (use security-auditor).
type-design-analyzer
Use this agent when you need expert analysis of type design in your codebase. Specifically use it: (1) when introducing a new type to ensure it follows best practices for encapsulation and invariant expression, (2) during pull request creation to review all types being added, (3) when refactoring existing types to…