/claude-for-hardware:codegen-validationfrom claude-for-hardware
Validates compiler backend codegen by executing machine code on real CPU or emulator. Use when debugging 'assembly looks right but answer is wrong' bugs.
Ships in claude-for-hardware. 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.
None: SKILL.md is the whole skill.
A codegen backend is correct when the code it emits computes the right answer on a real machine. Reading the assembly proves nothing; a plausible-looking instruction sequence with a wrong ABI detail or a clobbered callee-saved register passes every eyeball review and fails on hardware.
Core principle: Execution-validate. Compile a known program, run the output on a real CPU or a fast emulator, and assert the observed result. If you didn't run it, you don't know it works.
known program (expected result known)
-> codegen -> machine code
-> run on real CPU / fast emulator
-> assert observed result == expected
Execution validation reliably catches the codegen bugs that look fine on paper:
select/conditional-move lowering that picks the wrong operand.These are exactly the bugs that turn into silicon respins or weeks of "intermittent" debugging if they escape. A handful of executed tests finds them in seconds.
Order tests so each new one depends only on capabilities already validated:
When a higher test fails and the lower ones pass, the bug is in the new capability. That ordering is the debugger.
| Smell | Do instead |
|---|---|
| "The disassembly looks correct" | Execute it and assert the result |
| Test asserts "no crash" | Assert the actual computed value |
| Slow full-system sim per test | Fast target emulator, run every build |
| One big program as the only test | Capability-ordered tests, smallest first |
| Skipping ABI/spill tests | Those are exactly where the bugs hide |
river-emulator. That harness caught real codegen bugs (select lowering, critical-edge splitting, return-address save) that passed inspection.vulcan-target/<arch>; validation is a first-class part of bring-up, not an afterthought.differential-verification.What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/bare-metal-bringupUse when bringing up bare-metal or kernel code on a new architecture, SoC, or board (RISC-V, ARM, x86, ESP32) and it won't boot, hangs after boot, or faults early; covers trap vectors, MMU/PMP, syscall ABI, and boot ordering/differential-verificationUse when verifying a hardware DUT (a CPU core, FPGA, or netlist) against a golden reference model, building coverage-guided fuzzing, or detecting where silicon diverges from a simulator like Spike, an emulator, or SPICE/firmware-boot-chainUse when building or debugging a firmware and boot chain (RISC-V SBI, UEFI, ACPI, a bootloader handoff like Limine to an OS) or adding measured boot with a TPM, and a stage fails to hand off to the nextnpx claudepluginhub lilithsemi/claude-for-hardware --plugin claude-for-hardwareOther plugins' skills for the same job