oem-hardware-hooks
БесплатноБез исполняемых скриптовНе проверенOEM hardware first-boot setup hooks in projectbluefin/common. Use when adding hardware-specific setup, understanding hook directories and versioning contract…
от projectbluefin★ 34 звезды на GitHubОб этом скилле
oem-hardware-hooks — OEM Hardware First-Boot Setup in common
How to add, move, or maintain hardware-specific first-boot setup hooks
in projectbluefin/common. Covers the hook directories, the versioning
contract, shellcheck requirements, and what belongs here vs upstream.
When to Use
- Adding new hardware-specific first-boot behavior to
projectbluefin/common - Migrating a hook from a downstream repo (bluefin, bluefin-lts) into common
- Debugging a hook that burned its stamp prematurely or never ran
- Adding a new OEM vendor to the data-driven
20-oem-brew.shhook
When NOT to Use
- Adding Fedora/Bluefin-version-specific logic that should stay downstream
- Installing packages that depend on services only one variant ships
- Anything requiring
brew install --caskwithout trust (use Brewfile)
Hook directories
Two directories are scanned automatically at first boot — no registration needed:
Rule of thumb for where to place desktop or session settings
- Image default for all users →
system_files/bluefin/usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override - Locked (users cannot override) → update both the override and
system_files/bluefin/etc/dconf/db/distro.d/locks/01-bluefin-locked-settings - One-time first-boot action for current user →
system_files/shared/usr/share/ublue-os/user-setup.hooks.d/with theversion-script-check/version-script-commitcontract - Do not create a new GNOME schema override file for a single setting when the existing Bluefin override already exists.
| Directory | Runner | Runs as |
|---|---|---|
system_files/shared/usr/share/ublue-os/system-setup.hooks.d/ |
ublue-system-setup (systemd system service) |
root |
system_files/shared/usr/share/ublue-os/user-setup.hooks.d/ |
ublue-user-setup (systemd user service) |
current user |
Name scripts with a numeric prefix (10-, 20-) to control execution order.
The version-script-check / version-script-commit contract
Every hook must begin with:
# shellcheck disable=SC1091
source /usr/lib/ublue/setup-services/libsetup.sh
version-script-check <name> <type> <version> || exit 0
and end its body with:
version-script-commit <name> <type> <version>
<name>— a stable slug (e.g.framework,theming)<type>—system,user, orprivileged— must match the runner<version>— integer; bump when you want the hook to re-run on existing systems
Critical when migrating: use the same version number as the downstream hook. Bumping it re-runs the hook on every existing system on next boot.
version-script-check is a read-only gate that fires AFTER all preconditions pass — it records no version. Call version-script-commit at the end of the hook body, after the work succeeds, to write the stamp. The legacy version-script records before the body runs and is kept only for existing downstream callers; do not use it in new hooks. See references/hook-patterns.md for the canonical safe pattern and anti-pattern.
Shellcheck requirement
CI (validate.yml) runs shellcheck -e SC1091,SC2207 on all *.sh files in system_files/.
Always suppress SC1091 inline:
# shellcheck disable=SC1091
source /usr/lib/ublue/setup-services/libsetup.sh
What belongs in common vs downstream
Move to common when the hook:
- Has no Fedora/Bluefin-version-specific dependency
- Should apply to ALL variants including bluefin-lts
- Is pure hardware detection (DMI vendor/product, CPU vendor, BIOS version)
Leave in the downstream repo when the hook:
- Depends on packages or services only that variant ships
- Uses
brew install --cask(depends on tap trust being configured first) - Requires dconf keys only present in one variant's GNOME extension set
Hardware currently in common
| Hook | Type | What it does |
|---|---|---|
system-setup.hooks.d/10-framework.sh |
system | Intel Framework keyboard karg; Framework 13 Ryzen 7040 suspend fix; AMD 3.5mm jack (kernel-aware) |
system-setup.hooks.d/11-asus.sh |
system | Enables asusd.service + asus-shutdown.service once asusctl is installed |
user-setup.hooks.d/10-theming.sh |
user | Framework scroll/font tweaks; Thelio Astra Ampere logo (non-brew vendors) |
user-setup.hooks.d/20-oem-brew.sh |
user | Generic OEM brew install + logo set (data-driven) |
user-setup.hooks.d/12-framework-color.sh |
user | Assigns factory ICC color profiles to Framework 13/16 displays via colormgr |
Red Flags
- Using the legacy
version-scriptin a new hook, or calling any gate before checking transient preconditions (the legacy gate permanently burns the stamp) - Bumping the version number when migrating a hook from downstream (causes re-run on all existing machines)
- Dropping un-scoped WirePlumber snippets into
system_files/shared/usr/share/wireplumber/wireplumber.conf.d/(hardware quirks must e
Установить oem-hardware-hooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл oem-hardware-hooks?
OEM hardware first-boot setup hooks in projectbluefin/common. Use when adding hardware-specific setup, understanding hook directories and versioning contract, or applying shellcheck requirements.
Как установить скилл oem-hardware-hooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл oem-hardware-hooks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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