/xonovex-native:writing-c99from xonovex-native
Provides C99 coding guidelines covering memory management, fixed-width types, const-correctness, error handling, and portable idioms for libraries, CLI tools, and system utilities.
Ships in xonovex-native. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write portable C99 with explicit ownership, bounded operations, and checked errors.
const, designated initializers (ZII), small functions, see references/designated-initializers.md, references/const-correctness.md<stdint.h> for sized/serialized data; size_t for counts and indices, see references/fixed-width-types.mdinline functions over macros where practical, see references/inline-functions.mdstrlen/strcat/strtok rescans, see references/string-views.mdINT_MAX + 1 lets the compiler eliminate "impossible" code pathsint* to float* is UB unless via union or memcpy: silently miscompiled at higher optimization levelsmalloc returns memory that's max-aligned; custom arenas must preserve alignment for _Bool/double/SIMD types.field = x) zero-fill unmentioned members: a missing field becomes silent zero, not a compile errorlong is 32-bit on Windows and 64-bit on most 64-bit Unix targets: a struct of int/long serializes and hashes differently per platform; use <stdint.h> exact-width types for any stored or shared dataint against an unsigned size_t converts the int: a negative value becomes a huge size_t and the bounds check passes; keep counts/indices in size_t end to end-std=c99 usually still means the GNU dialect: set C_EXTENSIONS OFF for true ISO C99, then #define _XOPEN_SOURCE 700 or POSIX calls (readlink, strnlen, ssize_t) become implicit-declaration errors-Wextra's -Wmissing-field-initializers/-Wmissing-braces fire on intentional zero-init: suppress those two, keep the rest of -Werroreval-output.json (opens in a new tab)eval-trigger.json (opens in a new tab)moon.yml (opens in a new tab)references/build-and-warnings.md (opens in a new tab)references/compound-literals.md (opens in a new tab)references/const-correctness.md (opens in a new tab)references/designated-initializers.md (opens in a new tab)references/error-handling.md (opens in a new tab)references/fixed-width-types.md (opens in a new tab)references/inline-functions.md (opens in a new tab)references/memory-management.md (opens in a new tab)references/string-views.md (opens in a new tab)references/value-types.md (opens in a new tab)sources.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub xonovex/platform --plugin xonovex-native8 skills in this plugin
/applying-data-oriented-designUse when making data layouts cache-friendly for performance-critical code, in any language. Triggers on SoA vs AoS or AoSoA, cache misses, hot/cold field splitting, component storage layout, batch processing, handles vs pointers, pointer chasing, even when the user doesn't say 'data-oriented' or 'cache'./debugging-native-codeUse when finding the cause of a crash, memory corruption, leak, or intermittent bug in native C or C++ code, or making a class of bug impossible by design. Triggers on segfaults, access violations, use-after-free, callstacks, .dmp crash dumps, freed-memory fill patterns (0xdddddddd), heisenbugs, 'works on my machine', git bisect, minimal repro, assertions, ASan/UBSan/TSan, determinism, record/replay, even when the user doesn't say 'debugging'./managing-memoryUse when deciding how memory is allocated, owned, and freed in manual-memory code, in any language. Triggers on caller-provided buffers, arena, bump or linear allocators, object pools, free lists, virtual-memory reserve/commit, scratch allocators, object lifetimes, single ownership and borrowing, leaks, use-after-free, double-free, even when the user doesn't say 'memory' or 'allocator'./using-cmakeUse when writing or editing CMake builds for C or C++ projects on CMake 3.20+. Triggers on `CMakeLists.txt` and `*.cmake` files, adding targets, target_link_libraries, PUBLIC/PRIVATE/INTERFACE visibility, FetchContent, find_package, CTest, install rules, even when the user doesn't say 'CMake'./writing-c99-opinionatedUse when writing or editing systems or embedded C99 libraries with no hidden allocation, caller-provided buffers, and handle indices. Triggers on file naming that looks inconsistent, `.c`/`.h` files named `*_type.h`, `*_impl.h`, `*_soa.h` or `*_simde.h`, scalar/AoS/SoA/SIMD variants with parity tests, alignment macros, headers that include no headers, opaque handles, function-pointer plugin registries, hot-reloadable modules, and a C API for Lua, C#, Python or Rust FFI bindings, even when the user doesn't say 'opinionated'./writing-cross-platform-codeUse when porting native C or C++ software to another OS or to the web, or putting OS calls behind one platform layer. Triggers on scattered platform #ifdefs, function-pointer OS interfaces, porting to Linux, Emscripten/WebAssembly, emscripten_set_main_loop, ALLOW_MEMORY_GROWTH, WebGL or WebGPU from a Vulkan engine, /dev/input, evdev, gamepad hotplug, even when the user doesn't say 'portable'.