/bios-plugin:bios-capsule-installfrom bios-plugin
Installs a vendor UEFI BIOS capsule from Linux using fwupd when the vendor is not on LVFS and only provides a Windows package or bare capsule. Includes preflight checks and cabinet building.
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.
fwupd can apply any UEFI capsule the firmware advertises through its ESRT (EFI System Resource Table), not only packages from the LVFS. A vendor that ships BIOS updates only as a Windows installer usually wraps a capsule image inside it; packaged into a fwupd cabinet, it installs from Linux.
Prior art: derjohn's gist for the Huawei MateBook X Pro 2018/2019, which this skill generalises.
Verified once, end to end: a Huawei MateBook X Pro 2020 went from BIOS 1.07 to 1.26 through this route on 2026-11-16 (fwupd 1.9.32, Secure Boot off, systemd-boot). For any other model, treat the flash as unverified until a result is recorded in REFERENCE.md; the firmware there may encode versions differently or behave differently on reboot.
| Use this skill when... | Use something else when... |
|---|---|
| You have a vendor capsule image and want to install it from Linux | The vendor is on the LVFS: fwupdmgr update |
| Checking whether a machine can take a capsule update at all | Finding the firmware file first: bios-plugin:bios-firmware-fetch |
bash "${CLAUDE_SKILL_DIR}/scripts/capsule-preflight.sh" --min-battery 30
It reads, and changes nothing: DMI model and BIOS version, UEFI and Secure
Boot state, the ESRT system-firmware entry (class GUID, current and lowest
supported version), whether fwupd lists System Firmware as Updatable
and with which Problems, whether the packager and gcab exist, the
OnlyTrusted setting, charger and battery, ESP free space, the boot order,
and whether the removable-media fallback loader \EFI\BOOT\BOOTX64.EFI
exists. Some reads need root; it tries sudo -n and reports what it could not
read.
| Result | Meaning |
|---|---|
no_esrt | The firmware offers no capsule interface; this route is closed |
not_updatable | fwupd will not update the device; read its Problems |
FWUPD_PROBLEMS=Device requires AC power… | Only the charger is missing; plug it in before installing |
secure_boot_on | fwupd's EFI helper must be the signed build |
no_fallback_loader | Do not flash: if the update wipes the boot entries, nothing boots the OS. Install a fallback loader first |
fwupd compares the cabinet's release version with the ESRT fw_version
integer, so the cab should carry the integer the firmware will report after
the update. Read the current one from the preflight (ESRT_FW_VERSION,
ESRT_VERSION_HEX).
On the Huawei Insyde firmware this was verified on, BIOS x.yy is stored with
the decimal digits written as hex digits: 1.07 reads 65543 (0x00010007) and
1.26 reads 65574 (0x00010026). Compute the target the same way:
printf '%d\n' $(( (0x1 << 16) | 0x26 )) # BIOS 1.26 -> 65574
That encoding is an observation on one vendor's firmware, not a standard.
Before relying on it, check that the preflight's ESRT_VERSION_AS_HEX_DIGITS
equals BIOS_VERSION for the current version. A single sample cannot tell the
encodings apart when every digit is below ten (1.07 fits both 0x0007 and
decimal 7), so a version with an 8 or 9 in the minor, or a second sample, is
what confirms it.
A wrong target does not stop the flash: the firmware applies its own image and reports its own version. It does make fwupd's post-reboot comparison fail.
Needs fwupd's /usr/share/fwupd/firmware_packager.py (fwupd 1.9 names it
that, not firmware-packager) and gcab.
bash "${CLAUDE_SKILL_DIR}/scripts/build-capsule-cab.sh" \
--bin UEFI_FW.bin --sha256 <image sha256> \
--guid <ESRT_FW_CLASS> --version <target integer> \
--name "<Model> BIOS" --vendor <Vendor> --out firmware.cab
sudo fwupdtool get-details firmware.cab
get-details must show the cab attached to the System Firmware device
with New version equal to the target. If it lists no matching device, the
GUID is wrong; stop.
Hand over scripts/install-capsule.sh for the user to run in their own
terminal. It asks for confirmation and the sudo password, so it does not run
from an agent session:
./install-capsule.sh --cab firmware.cab --sha256 <cab sha256> --model <DMI product_name> \
--guid <ESRT_FW_CLASS> --target-version <target integer> --min-battery 30
What it does, in order:
\EFI\BOOT\BOOTX64.EFI exists on the ESP, and saves
efibootmgr -v to ~/efibootmgr-before-update-<timestamp>.txt.flash.OnlyTrusted off, because a locally built cab is not signed
by the LVFS, then asserts the file holds exactly one OnlyTrusted=false
and one [fwupd] section.fwupdmgr install --no-reboot-check, restores the config file from a
backup on exit, and tells the user to reboot.fwupd ≥ 1.9 reads /etc/fwupd/fwupd.conf; older releases read daemon.conf,
which the script falls back to. The file is usually mode 0640 root, so every
read goes through sudo. A plain grep fails silently there and sends a naive
script into its append branch, which writes a second [fwupd] section.
Before handing it over, confirm with AskUserQuestion that the user accepts
the risk: a firmware update cannot be rolled back, and a failed flash can make
the machine unbootable. Remind them to keep the charger connected through the
reboot.
cat /sys/class/dmi/id/bios_version /sys/class/dmi/id/bios_date
bash "${CLAUDE_SKILL_DIR}/scripts/capsule-preflight.sh"
sudo efibootmgr -v
Judge the result from the firmware, not from fwupd. Success is
bios_version showing the new version, and the ESRT entry reporting
fw_version and last_attempt_version at the new value with
last_attempt_status 0.
fwupd's history can say "Failed" after a successful flash. On the verified
machine it reported boot entry missing: no 'Linux Firmware Updater' entry found, because the firmware update had wiped the NVRAM boot entries,
including fwupd's own. fwupdmgr clear-results <device-id> then failed with
failed to clear_result using uefi_capsule: unspecified error, so the stale
"Failed" stays in the history. It is not evidence that the flash failed.
Check the boot entries. Compare efibootmgr -v with the file saved before
flashing. On the verified machine BootOrder came back as only the generic
"EFI Hard Drive" entry: the distribution's entry and fwupd's were gone, and the
machine booted only through the fallback \EFI\BOOT\BOOTX64.EFI. Recreate the
OS entry from the saved record, with the disk and partition of the ESP and the
loader path the old entry pointed at:
sudo efibootmgr -c -d /dev/nvme0n1 -p 1 -L "<distribution name>" -l '\EFI\systemd\systemd-bootx64.efi'
Record the outcome in REFERENCE.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub laurigates/claude-plugins --plugin bios-plugin7 skills in this plugin
/bios-external-programmerRead or write a laptop's SPI flash in-circuit with flashrom, using an ESP32-S3 dev board as serprog programmer or a Pico/CH341A. Use when the OS cannot write the flash./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./bios-setup-variablesRead or change hidden UEFI setup options from Linux via efivarfs, using offsets from the setup form (IFR). Use when a BIOS option is hidden from the setup menu./bios-update-diffFind what a BIOS update changed (microcode, EC, ACPI, ME) from boot logs and the new image. Use when a BIOS changelog says nothing useful./ec-firmware-analysisLocate, verify and reverse-engineer laptop EC firmware from a BIOS image or flash dump. Use when EC power, charging or wake behaviour needs explaining.Other plugins' skills for the same job