ffi-and-language-interop

ffi-and-language-interop is a skill for Claude Code, Codex from Goldziher/ai-rulez. It costs 66 tokens per session (267 once invoked), scanned A, original, MIT.

Rules for connecting code written in different languages, such as Rust or C and a host language. FFI, or foreign-function interface, is the boundary where these languages exchange data and call each other.

In plain words
What is it for?
Use it when designing or reviewing pointers, memory ownership, native handles, generated headers, C-compatible interfaces, data layouts, unsafe code, and cross-language errors.
Why use it?
It reduces crashes, memory errors, incompatible interfaces, and lost error details at language boundaries.

Skill for Claude CodeCodex

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

Good fit Use it when designing or reviewing pointers, memory ownership, native handles, generated headers, C-compatible interfaces, data layouts, unsafe code, and cross-language errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goldziher/ai-rulez/ffi-and-language-interop
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 Goldziher/ai-rulez --skill ffi-and-language-interop
Clone the repo
git clone --depth 1 https://github.com/Goldziher/ai-rulez

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-and-language-interop

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/ai-rulez/ffi-and-language-interop/github.svg)](https://agentmods.dev/skills/goldziher/ai-rulez/ffi-and-language-interop)
Your own site
<a href="https://agentmods.dev/skills/goldziher/ai-rulez/ffi-and-language-interop"><img src="https://agentmods.dev/badge/skills/goldziher/ai-rulez/ffi-and-language-interop/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-and-language-interop

Your own site · 80×15
<a href="https://agentmods.dev/skills/goldziher/ai-rulez/ffi-and-language-interop"><img src="https://agentmods.dev/badge/skills/goldziher/ai-rulez/ffi-and-language-interop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 267 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00066 $0.00267
Opus 5 $0.00033 $0.00133
Sonnet 5 $0.00013 $0.00053
Haiku 4.5 $0.00007 $0.00027

Measured 12d ago against content hash 260b0512b01d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ffi-and-language-interop 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 12d 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.

internal/builtins/universal/polyglot-bindings/skills/ffi-and-language-interop/SKILL.md · 16 lines

What it actually says

  • Every pointer has one owner, documented with SAFETY comments or host-language ownership docs.
  • Use opaque handles across native boundaries. Do not expose Rust, C++, or host-runtime internals directly.
  • Check all nullable pointers before use and return explicit errors for invalid handles or null inputs.
  • Provide allocate/free pairs for every caller-owned allocation and document which side frees each value.
  • Every unsafe block must state the invariant, why it holds, and what would make it invalid.
  • Generate C headers or native declarations from source when possible, and make CI verify generated files are current.
  • Treat the C ABI or equivalent native ABI as the stable contract for downstream bindings.
  • Freeze native struct layouts across compatible releases, and version breaking ABI changes deliberately.
  • Convert native errors to host exceptions, result objects, or idiomatic error values at every boundary.
  • Preserve diagnostic context across boundaries: message, numeric code when available, source operation, and cause chain.
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. 12d ago First seen · 16 lines · 66 tokens per session scan A 260b0512b01d

Subscribe to this mod's changes

ffi-and-language-interop is a skill published in the GitHub repository Goldziher/ai-rulez (141 stars, last pushed 4d ago), licensed MIT. It adds 66 tokens to every session and 267 once invoked, about $0.0003 per session on Opus 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-30.

Related

Other skills, from other repositories

gh-skill

Manage agent skills with gh skill. Use this skill to discover, preview, install, update, and publish Agent Skills so an agent can self-manage the skills available in its environment.

cli/cli · 41 tokens

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

printing-press-import

Bring a published CLI from the public library into the internal library so it's identical to a freshly-generated copy — module path reverted, manuscripts placed alongside, ready for /printing-press-polish or /printing-press-emboss. Use when the public library has a CLI you don't have locally, or to recover from a…

mvanhorn/cli-printing-press · 104 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

octo-drive

Octo Drive — spaces, folders, file upload/download, online-document mounts, share links, invites, IM-attachment transfer. Works with a bot token or a user API key; the CLI routes by token kind. Load after octo-shared.

Mininglamp-OSS/octo-cli · 55 tokens

octo-mail

OCTO Agent Mail operations for reading, searching, policy-aware sending, preparing drafts, and checking delivery status exclusively through octo-cli.

Mininglamp-OSS/octo-cli · 32 tokens