Individual skill
rust-ffi-safe-wrappers
Design and review Rust FFI boundaries that keep raw declarations isolated behind safe ownership, lifetime, error, and cleanup wrappers. Use when writing, refactoring, or reviewing unsafe extern blocks, C ABI wrappers, repr(C) types, CString, CStr, raw handles, Drop cleanup, bindgen, cbindgen, or panic-safe foreign boundaries.
plugins/LVTD-LLC/skills/skills/rust-ffi-safe-wrappers/SKILL.md
Source commit d780783eba4ecc7c8b9429f95c9362df95f07c61
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,532
- Repository last updated
- Nov 6, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-coding Repository topic
- awesome Repository topic
- awesome-list Repository topic
- codex Repository topic
- codex-plugins Repository topic
- openai Repository topic
- codex-skill Repository topic
- codex-skills Repository topic
- marketplace Repository topic
- codex-marketplace Repository topic
- rust,ffi,c-abi,unsafe,bindings Declared skill tag
- design Derived category
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 3,778 bytesagents/openai.yamlasset · 229 bytesreferences/ffi-boundary-patterns.mddoc · 2,080 bytes
Read excerpt
# Rust FFI Safe Wrappers
Use this skill to wrap foreign interfaces in Rust APIs that make ownership,
lifetimes, errors, and cleanup explicit. FFI code should be unsafe at the raw
boundary and safe for normal Rust callers.
## Core Workflow
1. Separate raw declarations from safe wrappers. Put raw `unsafe extern`
bindings in a small private module.
2. Verify ABI, type layout, calling convention, ownership, nullability,
threading, and error conventions against the foreign header or docs.
3. Use `unsafe extern "C"` blocks for modern Rust, especially Rust 2024 edition
code. Leave safety-conditional items unqualified or explicitly `unsafe`, and