Apache DataFusion Python Bindings is a Python library connecting applications to DataFusion, an in-memory query engine built on Apache Arrow. It is for building Python data systems that query CSV, Parquet, and JSON data with SQL or DataFrames, optimize those queries, run Python code, and exchange data with other DataFrame libraries. The catalogue add-ons support development workflows around these Python bindings.
Borrowing it
Nothing to install: this file belongs to apache/datafusion-python. 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/apache/datafusion-python/main/.ai/skills/ffi-capsule-protocol/SKILL.mdgit clone --depth 1 https://github.com/apache/datafusion-pythonWrote 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/skills/apache/datafusion-python/ffi-capsule-protocol)<a href="https://agentmods.dev/skills/apache/datafusion-python/ffi-capsule-protocol"><img src="https://agentmods.dev/badge/skills/apache/datafusion-python/ffi-capsule-protocol/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/skills/apache/datafusion-python/ffi-capsule-protocol"><img src="https://agentmods.dev/badge/skills/apache/datafusion-python/ffi-capsule-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00102 | $0.03069 |
| Opus 5.5 | $0.00041 | $0.01228 |
| Sonnet 5.5 | $0.00020 | $0.00614 |
| Haiku 4.5 | $0.00010 | $0.00307 |
Grade A, and why
ffi-capsule-protocol 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 — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FFI Capsule Protocol
datafusion-python shares Rust objects with extension libraries through
PyCapsules. Every hook is a dunder method named __datafusion_<thing>__ that
returns a capsule wrapping an FFI-safe struct. They are one protocol, not a
collection of unrelated methods, and they have a settled convention that has
already been migrated once (see docs/source/user-guide/upgrade-guides.md,
DataFusion 52.0.0 and 55.0.0).
Rule 1 — enumerate the family before you change a member
Do this first, every time. It takes one command and it is the whole point of this skill:
grep -rn "__datafusion_[a-z_]*__" --include="*.rs" crates/ examples/*/src/
Compare the signature you are about to write against what the others already do. If yours is shaped differently, that is a finding about your design, not about theirs.
Rule 2 — a getter takes the session it is being installed on
fn __datafusion_physical_extension_codec__<'py>(
&self,
py: Python<'py>,
session: Bound<'py, PyAny>,
) -> PyResult<Bound<'py, PyCapsule>> { ... }
The host calls the getter and passes itself. That argument is how an extension library reaches things only the session has.
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 Changed · +43 lines 3079bcb87c0f
- 1mo ago Changed · +9 lines 1a81957f705d
- 2mo ago First seen · 191 lines · 102 tokens per session scan A 0fbf0b020c1d
ffi-capsule-protocol is a skill published in the GitHub repository apache/datafusion-python (610 stars, last pushed 4d ago), licensed Apache-2.0. It adds 102 tokens to every session and 3,069 once invoked, about $0.0004 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-30.
Other skills, from other repositories
cloudflare-workers-multi-lang
Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.
python-patterns
Python development principles and decision-making. Framework selection, async patterns, type hints, and project structure.
stripe-projects
Use after E2B sandbox/API access has been provisioned through Stripe Projects and the user needs to use the resulting E2B API key with the E2B CLI, JavaScript SDK, Python SDK, or Code Interpreter SDK.
azure-messaging-webpubsubservice-py
Azure Web PubSub Service SDK for Python. Use for real-time messaging, WebSocket connections, and pub/sub patterns. Triggers: "azure-messaging-webpubsubservice", "WebPubSubServiceClient", "real-time", "WebSocket", "pub/sub".
feature-flag-conventions
Cargo features: shared otel/mcp/allocator contract, then Xberg's ORT-free targets, aggregates, PDF backend, parity guard. Use when editing [features].
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.