From xonovex-skill-cross-platform
Use when making native C/C++ software portable across operating systems and targets: isolating all OS/windowing/input/audio calls behind one platform-abstraction interface, ordering a port to a new OS, building to the web via Emscripten/WebAssembly (cooperative main loop, async file/network, GL ES/WebGPU mapping, 32-bit pointers, memory growth), and reading input devices like gamepads. Triggers on scattered platform #ifdefs, function-pointer OS interfaces, porting to Linux/web, emscripten_set_main_loop, ALLOW_MEMORY_GROWTH, WebGL from a Vulkan engine, /dev/input, evdev, gamepad hotplug, even when the user doesn't say 'portable'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/xonovex-skill-cross-platform:cross-platform-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
How to make native C/C++ software portable across operating systems and targets by concentrating every OS dependency behind a thin abstraction, porting one backend at a time, and reaching new targets including the web and new input hardware. The renderer architecture itself lives in gpu-rendering-guide (and gpu-rendering-vulkan-guide for one API); build-system mechanics live in cmake-guide; the...
How to make native C/C++ software portable across operating systems and targets by concentrating every OS dependency behind a thin abstraction, porting one backend at a time, and reaching new targets including the web and new input hardware. The renderer architecture itself lives in gpu-rendering-guide (and gpu-rendering-vulkan-guide for one API); build-system mechanics live in cmake-guide; the C dialect's per-platform file-naming in c99-opinionated-guide.
#ifdef or call an OS API directly, see references/platform-abstraction-layer.md#ifdef - Platform variance lives in backend translation units, not in portable logic, see references/platform-abstraction-layer.md/dev/input, prefer stable by-id/by-path symlinks over eventN, see references/input-devices.mdBTN_GAMEPAD) and read per-axis range/deadzone, see references/input-devices.mdselect/poll then read; watch the directory for plug/unplug, see references/input-devices.mdvoid f() → void f(void), unused vars, and declaration mismatches rather than suppressing.memcmp keyed on the byte layout; widen keys and re-pad for that build.while (running) loop hangs the browser tab; the browser owns the frame clock, so the frame must be a callback that returns each iteration.fopen that "works natively" returns nothing in the browser unless the file was preloaded into the virtual filesystem or fetched asynchronously first./dev/input is not necessarily the device you want — a keyboard and a gamepad both appear there; verify capability bits before mapping.eventN numbers and per-device axis ranges are not stable or symmetric; bind off the by-id symlink and normalize using the queried min/max and flat deadzone.#ifdefs, or adding a per-platform backendGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub xonovex/platform --plugin xonovex-skill-cross-platform