This skill should be used when the user asks about "asset pipeline", "build process", "generator binary", "native vs WASM", "build.script", "nether.toml build", "how to integrate generators", "asset generation workflow", "procedural assets build", "compile time assets", "gitignore generated assets", "regenerate assets", or needs to understand how procedural asset generators integrate with the Nethercore ZX build system.
/plugin marketplace add nethercore-systems/nethercore-ai-plugins/plugin install zx-procgen@nethercore-ai-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Asset generators are native binaries that run on your development machine during the build process. They are NOT WASM and do NOT run in the ZX console.
┌─────────────────────────────────────────────────────────────┐
│ BUILD TIME (Native) │
│ │
│ .studio/specs/ → generated/ → game.nczx │
│ (Rust/Python/etc) (PNG, OBJ, WAV) (bundled ROM) │
│ Runs on your CPU Standard formats Final output │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ RUN TIME (WASM) │
│ │
│ game.nczx → ZX Console → rom_texture(), rom_mesh() │
│ All assets pre-bundled Assets loaded from ROM pack │
└─────────────────────────────────────────────────────────────┘
NEVER copy FFI declarations inline. Always use the canonical zx.rs module:
# Fetch the FFI module (do this once per project)
curl -o src/zx.rs https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.rs
Then in your code:
mod zx; // FFI module - NEVER edit or copy inline
use zx::*; // Access all FFI functions
ALL resource loading MUST happen in init() ONLY!
Loading resources in update() or render() will CRASH the game.
Init-only functions include:
rom_texture(), rom_texture_str() - texture loadingrom_mesh(), rom_mesh_str() - mesh loadingrom_sound(), rom_sound_str() - sound loadingcube(), sphere(), cylinder(), etc.The [build] section's script field chains commands. Generator runs BEFORE WASM compilation:
[game]
id = "my-game"
title = "My Game"
author = "Developer"
version = "1.0.0"
# Build pipeline: generate assets THEN compile WASM
[build]
script = "python .studio/generate.py && cargo build -p game --target wasm32-unknown-unknown --release"
wasm = "target/wasm32-unknown-unknown/release/game.wasm"
# Declare generated assets
[[assets.textures]]
id = "player"
path = "../generated/textures/player.png"
[[assets.meshes]]
id = "level"
path = "../generated/meshes/level.obj"
[[assets.sounds]]
id = "jump"
path = "../generated/sounds/jump.wav"
Install the .studio/ scaffold (generator + parsers) with /init-procgen and put specs under .studio/specs/:
my-game/
├── .studio/
│ ├── generate.py
│ ├── parsers/ # Installed by /init-procgen
│ └── specs/ # Source of truth (*.spec.py)
│ ├── textures/
│ ├── normals/
│ ├── sounds/
│ ├── instruments/
│ ├── music/
│ ├── meshes/
│ ├── characters/
│ └── animations/
├── game/
│ ├── Cargo.toml # WASM library (cdylib)
│ ├── nether.toml # Build config
│ └── src/
│ ├── lib.rs # Game code (compiles to WASM)
│ └── zx.rs # FFI module (fetch from GitHub)
├── generated/ # Procedural outputs (gitignored, regenerable)
│ ├── textures/
│ ├── normals/
│ ├── meshes/
│ ├── characters/
│ ├── animations/
│ ├── audio/
│ │ └── instruments/
│ └── tracks/
├── assets/ # Human-made assets (committed to git)
└── .gitignore
Key Distinction:
generated/ - Procedurally generated assets (gitignored)
.studio/specs/python .studio/generate.pyassets/ - Human-made assets (committed to git)
nether.toml Distinction:
# Reference procedural assets from generated/
[[assets.textures]]
id = "stone"
path = "../generated/textures/stone.png" # Regenerated from code
# Reference human-made assets from assets/
[[assets.textures]]
id = "hero_portrait"
path = "../assets/textures/hero_portrait.png" # Hand-painted, committed
Run the unified generator before WASM compilation:
[build]
script = "python .studio/generate.py && cargo build -p game --target wasm32-unknown-unknown --release"
For Blender-dependent categories, run Blender on the same entrypoint:
blender --background --python .studio/generate.py -- --only meshes
blender --background --python .studio/generate.py -- --only characters
blender --background --python .studio/generate.py -- --only animations
CRITICAL: Use the canonical zx.rs FFI module. Never copy FFI declarations inline.
First, fetch the FFI bindings:
curl -o src/zx.rs https://raw.githubusercontent.com/nethercore-systems/nethercore/main/include/zx.rs
CRITICAL: ALL resource loading MUST happen in init() ONLY!
// game/src/lib.rs
#![no_std]
mod zx; // FFI module - fetched from GitHub, NEVER edit or copy inline
use zx::*;
static mut PLAYER_TEX: u32 = 0;
static mut LEVEL_MESH: u32 = 0;
static mut JUMP_SFX: u32 = 0;
#[no_mangle]
pub extern "C" fn init() {
// CRITICAL: ALL rom_*() calls MUST be in init() - nowhere else!
unsafe {
PLAYER_TEX = rom_texture_str("player");
LEVEL_MESH = rom_mesh_str("level");
JUMP_SFX = rom_sound_str("jump");
}
}
#[no_mangle]
pub extern "C" fn update() {
// Game logic only - NO resource loading here!
}
#[no_mangle]
pub extern "C" fn render() {
// Drawing only - NO resource loading here!
}
# Full build (generate + compile + pack)
cd game
nether build
# Run game
nether run
# Skip generation (just recompile WASM)
nether build --no-compile
cargo build -p game --target wasm32-unknown-unknown --release
nether pack
# Run generators only (debug)
python .studio/generate.py
# Regenerate after git clone
cd game && nether build
generated/ directory[[assets.*]] entries reference generated filesrom_texture(), rom_mesh(), rom_sound()This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.