native-codelisted
Install: claude install-skill DROOdotFOO/agent-skills
# native-code
Domain knowledge for building native extensions for the BEAM VM. Covers the
NIF boundary (C and Rust), SIMD via Zig, and the cross-cutting concerns that
apply regardless of implementation language.
For general language patterns (C, Zig, Rust), see droo-stack.
## What You Get
- NIF boundary patterns (C `erl_nif.h`, Rust Rustler, Zig SIMD)
- Scheduler contract and memory model rules
- Elixir-side module structure for NIF wrappers
- Common crash/leak patterns and fixes
- Two-level testing strategy (native unit + ExUnit boundary)
## When to use
- Writing or reviewing NIF code (C `erl_nif.h` or Rust Rustler)
- Integrating Zig SIMD routines into BEAM via C ABI
- Designing the Elixir-side module for a NIF
- Debugging scheduler issues, memory leaks, or crashes at the native boundary
- Building tree-sitter grammar parsers as NIFs
- Setting up precompiled NIF releases
## When NOT to use
- General C, Zig, or Rust coding -- use droo-stack
- General Elixir patterns -- use droo-stack
- Raxol TUI framework -- use raxol skill
## Reading guide
| Working on | Read |
| ------------------------------------------------- | --------------------------------------------------------------- |
| Scheduler contract, memory model, deployment | [references/boundary-patterns](references/boundary-patterns.md) |
| Elixir-side NIF module structure | [references/nif-eli