Agent skill
FFI Bindings Fetcher
This skill should be used when the user asks to "fetch FFI bindings", "update zx.rs", "update zx.h", "update zx.zig", "get latest bindings", "download FFI", "refresh bindings", "update FFI module", or mentions updating, fetching, or downloading Nethercore ZX FFI bindings for their game project.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/bindings-fetcher
SKILL.md
FFI Bindings Fetcher
Overview
Nethercore ZX FFI bindings are auto-generated at build time and hosted publicly on GitHub. Always fetch the complete bindings file - never copy individual functions inline.
Bindings URLs
| Language | GitHub URL |
|---|---|
| Rust | https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.rs |
| C | https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.h |
| Zig | https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.zig |
Fetch Commands
Rust Projects
# Fetch to src/zx.rs
curl -o src/zx.rs https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.rs
Usage in code:
// src/lib.rs
mod zx;
use zx::*;
// src/player.rs (or any other module)
use crate::zx::*;
C Projects
# Fetch to project root
curl -o zx.h https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.h
Usage in code:
#include "zx.h"
Zig Projects
# Fetch to src/zx.zig
curl -o src/zx.zig https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.zig
Usage in code:
const zx = @import("zx.zig");
Fetching via WebFetch
When using Claude Code's WebFetch tool to retrieve bindings:
Prompt: "Return the complete file contents exactly as-is. This is FFI bindings code."
Save the fetched content to the appropriate location:
- Rust:
src/zx.rs - C:
zx.h(project root) - Zig:
src/zx.zig
When to Update Bindings
Update bindings when:
- Starting a new project
- After a Nethercore console update
- When encountering FFI function signature errors
- When needing newly added FFI functions
Critical Rules
- Never edit bindings files - They are auto-generated and will be overwritten
- Never copy functions inline - Always use the complete bindings file
- Use module imports - Access FFI through proper module system
- Keep lib.rs minimal - Only mod declarations and entry points (~50 lines)
Project File Limits
When generating game code, follow these limits:
| File | Max Lines | Purpose |
|---|---|---|
| lib.rs/main.zig/game.c | 50 | Entry points + mod declarations only |
| System files | 300 | Individual game systems |
| Feature directories | 300/file | Complex features split into modules |
Bindings Contents
The bindings files contain (~1700 lines for Rust):
- FFI function declarations
- Type definitions (handles, enums, structs)
- Helper functions and macros
- Complete documentation comments
All 250+ FFI functions are included - no need to add anything manually.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?