bios-setup-variables
БесплатноЗапускает вложенные скриптыНе проверенRead 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.
от laurigates★ 61 звезда на GitHubОб этом скилле
BIOS Setup Variables (hidden options via efivarfs)
Insyde, AMI and Phoenix firmware keep their setup options in ordinary UEFI
variables (Setup, PchSetup, CpuSetup, SaSetup, MeSetupStorage, …).
Most options the vendor hides from the menu are still defined in the setup
form (IFR) and still read at boot. Knowing the option's variable and byte
offset is enough to read it from Linux, and on many machines to change it.
Tested on one machine: a Huawei MateBook X Pro 2020 (Insyde, BIOS 1.26), where
PchSetupoffset 0x4 ("DeepSx Power Policies") was changed 0 → 4 and the laptop booted normally with it. Firmware that locks its setup variables (variable policy,VarCheck) refuses the write;noop(Step 4) finds out without changing anything.
When to Use This Skill
| Use this skill when... | Use something else when... |
|---|---|
| An option exists in the setup form but not in the menu | The option is in the menu: change it there |
| Auditing the current value of hidden options | Building a full option list from the form: see Step 1 |
| Reverting a setup variable from a backup | The machine no longer boots: reset the firmware settings (CMOS/RTC battery or vendor key combo) |
Step 1: Find the option in the setup form
Extract the setup forms from a firmware image (the vendor capsule, or a flash
backup from bios-plugin:bios-flash-protection-audit):
- Find the setup driver (
SetupUtility,Setup,AdvancedSetup) withUEFIExtract <image> alland search for the option's prompt string. - Run IFRExtractor-RS on that
module (
ifrextractor <module>.efi verbose) to get a text dump.
In the dump, a question names its variable store by a local id; the varstore lines map that id to the EFI variable's name, GUID and size:
VarStoreEfi Guid: 4570B7F1-ADE8-4943-8DC3-406472842384, VarStoreId: 0x5, ..., Size: 0x6EC, Name: "PchSetup"
OneOf Prompt: "DeepSx Power Policies", ..., VarStoreId: 0x5, VarOffset: 0x4, ..., Size: 8, Min: 0x0, Max: 0x4
OneOfOption Option: "Disabled" Value: 0, Default, MfgDefault
OneOfOption Option: "Enabled in S4-S5/Battery" Value: 3
OneOfOption Option: "Enabled in S4-S5" Value: 4
VarStoreIdis local to itsFormSet: map it with the varstore lines of the same formset.VarOffsetis relative to the variable's data.Sizeis in bits forOneOf/Numeric.- The varstore
Sizeis the variable's data size. Pass it as--data-size, so a firmware update that changes the layout is caught before any write. - An option inside
SuppressIf/GrayOutIfis hidden or greyed out under that condition. Hiding it does not stop the firmware reading it.
A parser that turns a whole dump into one table with live values is being
written and is not part of this skill yet. Until then, work from the dump by
hand: grep -n 'Prompt: "<option>"' finds the question, and the nearest
preceding VarStoreEfi line with the same VarStoreId in that FormSet
names the variable.
Step 2: Read the current value
bash "${CLAUDE_SKILL_DIR}/scripts/setup-var.sh" --var PchSetup-4570b7f1-ade8-4943-8dc3-406472842384 --offset 0x4 --data-size 0x6EC show
The efivarfs file is the variable's 4-byte attribute word followed by its data; the script adds that header to the offset. Needs root (via sudo).
Step 3: Back up
bash "${CLAUDE_SKILL_DIR}/scripts/setup-var.sh" --var <Name-GUID> backup --out <Name>.before.bin
Copy the backup off the machine as well.
Step 4: Check that writes are accepted
bash "${CLAUDE_SKILL_DIR}/scripts/setup-var.sh" --var <Name-GUID> noop
This writes the variable back unchanged and confirms the content is identical. If the write is refused, the firmware locks the variable and the option cannot be changed from the OS.
Step 5: Set the value (ask first)
Writing a setup variable is a firmware change that can stop the machine from booting until its settings are reset. Confirm with the user, then:
bash "${CLAUDE_SKILL_DIR}/scripts/setup-var.sh" --var <Name-GUID> --offset 0x4 --data-size 0x6EC --product <DMI product> --bios <version> --allowed 0,3,4 set 4
cmp -l <Name>.before.bin /sys/firmware/efi/efivars/<Name-GUID> # exactly one line expected
Safety properties of the script:
- It refuses unless the DMI product, BIOS version and variable size match.
- It refuses unless the value is among the form's options.
- It refuses if more bytes than
--sizewould change. - It writes attributes and data in one
write(), afterchattr -i.
The firmware reads the variable at power-on, so the change applies after a
reboot. Re-run show after the reboot: some firmware resets a value it
considers invalid.
To undo: setup-var.sh --var <Name-GUID> restore <Name>.before.bin, then
reboot.
Gotchas
cmpexits 1 when files differ. Underset -o pipefailan unguardedcmp | wc -laborts the script before the write. The script guards it; ke
Установить bios-setup-variables в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(bash ${CLAUDE_SKILL_DIR}/scripts/setup-var.sh * show)Bash(bash ${CLAUDE_SKILL_DIR}/scripts/setup-var.sh * backup *)Bash(ls /sys/firmware/efi/efivars*)Bash(sha256sum *)Bash(cmp *)ReadGrepGlobAskUserQuestionВложенные файлы
FAQ
Что делает скилл bios-setup-variables?
Read 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-setup-variables?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bios-setup-variables запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic