/bios-plugin:bios-external-programmerfrom bios-plugin
Reads or writes a laptop's SPI flash in-circuit using flashrom with an ESP32-S3, Pico, or CH341A programmer. Use when the OS cannot write the flash region.
Ships in bios-plugin. 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; scripts run unread.
When the chipset write-protects a flash region from the OS
(bios-plugin:bios-flash-protection-audit shows WP=1 with FLOCKDN=1), the
only way to write it is a programmer clipped onto the chip. flashrom's
serprog protocol lets a cheap microcontroller board do that job.
Status: the ESP32-S3 firmware from Step 1 compiles and has been checked by reading its source. No in-circuit read or write with it has been verified yet. The 16 MB write reported upstream was a 1.8 V chip at 250 kHz through a level shifter. Verify a read against a known backup before any write.
| Use this skill when... | Use something else when... |
|---|---|
| The OS cannot write the flash region you need to change | The OS can write it: flashrom -p internal |
| Recovering a machine whose firmware no longer boots | Only reading is needed and the OS can read: bios-plugin:bios-flash-protection-audit |
| Board | Works? | Notes |
|---|---|---|
| ESP32-S3 (Seeed XIAO ESP32-S3, Waveshare ESP32-S3-Zero, …) | Yes, with thisiseth/esp32-serprog | 3.3 V logic, native USB Serial/JTAG (no baud limit). Needs ESP-IDF ≥ 6.0 and a pin edit |
| Raspberry Pi Pico (RP2040) | Yes, with pico-serprog (firmware and steps in the libreboot SPI guide) | The best-trodden route; libreboot removed RP2350 support, so buy an RP2040 |
| Raspberry Pi (40-pin) | Yes, flashrom linux_spi via /dev/spidev0.0 | 3.3 V native |
| CH341A | Yes, flashrom ch341a_spi | Some boards put 5 V on the data lines; use a 3.3 V-modified one |
| Arduino Nano/Uno | Possible (frser-duino) | 5 V logic needs dividers; its 3.3 V pin cannot power an in-circuit chip |
| CP2102, CH340 (USB-UART) | No | UART only; flashrom cannot drive SPI through them |
flashrom's serprog programmer is in Homebrew's flashrom (macOS and Linux)
and in distro packages, so the host side needs no source build.
bash "${CLAUDE_SKILL_DIR}/scripts/build-xiao-serprog.sh" ./esp32-serprog-build
The script:
0ca3c7e, 2026-07-23).IDF_PATH, default ~/esp/esp-idf).It prints the binaries' hashes and the flash offsets. On a XIAO Sense, remove the camera/SD expansion board, whose SD slot shares GPIO7/8/9.
Flash the board (hold BOOT while plugging in if it does not enumerate):
cd ./esp32-serprog-build/xiao-serprog-out && python -m esptool --chip esp32s3 -p <port> -b 460800 --before default-reset --after hard-reset write-flash --flash-mode dio --flash-size 2MB --flash-freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 main.bin
ESP-IDF v6 ships esptool v5 (write-flash, not write_flash). The port is
/dev/cu.usbmodem* on macOS and /dev/ttyACM* on Linux.
| Chip pin | Signal | XIAO pin | Note |
|---|---|---|---|
| 1 | CS# | D1 (GPIO2) | 47 Ω in series |
| 2 | SO / MISO | D9 (GPIO8) | 47 Ω in series |
| 3 | WP# | 3V3 | through 10 kΩ |
| 4 | GND | GND | |
| 5 | SI / MOSI | D10 (GPIO9) | 47 Ω in series |
| 6 | SCLK | D8 (GPIO7) | 47 Ω in series |
| 7 | HOLD# / RESET# | 3V3 | through 10 kΩ |
| 8 | VCC | 3V3 | one supply only |
Pin 1 is next to the dot on the package. A WSON-8 chip has the same pinout but no legs, so a SOIC clip will not grip; use a pogo-pin probe or solder wires.
Safety order:
S_PIN_STATE). Unplug the clip before powering the laptop.flashrom -p serprog:dev=<port>,spispeed=2M --flash-name
flashrom -p serprog:dev=<port>,spispeed=2M -r ext-1.bin
flashrom -p serprog:dev=<port>,spispeed=2M -r ext-2.bin
sha256sum ext-1.bin ext-2.bin <backup-from-the-os>.bin
-c "<name>" from its list, matching the part number printed on
the chip.spispeed (4M, 8M) only after reads match at the lower speed.Writing is a separate decision, and needs the user's go-ahead:
flashrom -p serprog:dev=<port>,spispeed=2M -w patched.bin # verifies automatically
flashrom -p serprog:dev=<port>,spispeed=2M -r after.bin && cmp after.bin patched.bin
Keep the original dump off the machine. Restoring it the same way is the recovery path.
src/serprog/main/main.c.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
spi-flash, flashrom, bios-recovery, firmware-programming, serprog
7 skills in this plugin
/bios-capsule-installInstall a vendor UEFI capsule from Linux via fwupd. Use when a vendor is not on LVFS and its BIOS update ships only as a Windows package or bare capsule./bios-firmware-fetchFetch vendor BIOS/UEFI updates from the vendor's update service. Use when a support site no longer lists a model's BIOS, or a download needs provenance checks./bios-flash-protection-auditAudit Intel PCH SPI flash protection and Boot Guard from Linux, read-only, and take a verified full flash backup. Use when planning a firmware patch or an external flash.npx claudepluginhub laurigates/claude-plugins --plugin bios-pluginOther plugins' skills for the same job