/xonovex-native:writing-lock-free-codefrom xonovex-native
Guides writing and reviewing shared-memory concurrent code with atomics, lock-free data structures, and custom synchronization. Covers memory ordering, CAS, ABA problem, SPSC/MPSC/MPMC queues, hazard pointers, RCU, false sharing, spinlocks, and work-stealing.
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.
Choose concurrency primitives by their progress guarantees, memory ordering, and reclamation requirements; verify them under contention.
<stdatomic.h>); applies to systems code with atomic, threading, and job-scheduling primitives.compare_exchange_weak in a loop; reload the expected value on failure, see references/atomics-and-cas.mdvolatile is not atomic and gives no ordering. It never makes concurrent C correct; use _Atomic/atomic_*.compare_exchange_weak may fail spuriously even when the value matches, only ever use it inside a retry loop.memory_order_* argument or a fenceeval-output.json (opens in a new tab)eval-trigger.json (opens in a new tab)moon.yml (opens in a new tab)references/aba-problem.md (opens in a new tab)references/atomics-and-cas.md (opens in a new tab)references/false-sharing.md (opens in a new tab)references/lock-free-stack.md (opens in a new tab)references/locks-and-backoff.md (opens in a new tab)references/memory-model.md (opens in a new tab)references/memory-ordering.md (opens in a new tab)references/mpmc-bounded-queue.md (opens in a new tab)references/mpsc-queue.md (opens in a new tab)references/progress-guarantees.md (opens in a new tab)references/safe-memory-reclamation.md (opens in a new tab)references/scalable-architecture.md (opens in a new tab)references/spsc-ring-buffer.md (opens in a new tab)references/testing-and-verification.md (opens in a new tab)sources.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
lock-free, concurrency, atomics, memory-ordering, cas, synchronization
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-c99Use when writing, editing, or reviewing plain C99 code such as libraries, CLI tools, and system utilities. Triggers on `.c`/`.h` files, designated initializers, fixed-width types, const-correctness, malloc/free, inline functions vs macros, string handling, error return codes, sanitizers, even when the user doesn't say 'C'./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'.