fedora-hyprland-installer Skill
在 Fedora Linux 上安装、配置、验证、修复、更新和卸载 Hyprland,支持 GPU 自动识别(NVIDIA/AMD/Intel)。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Fedora Hyprland Installer Skill
This skill provides an automated, safety-first workflow for managing Hyprland on Fedora Linux.
Script Path Resolution Directive
When agy is launched from a user's working directory, bundled scripts do NOT reside in ./scripts/.
The agent MUST first locate the base directory of the fedora-hyprland-installer skill (e.g., /.agents/skills/fedora-hyprland-installer, ~/.gemini/antigravity-cli/skills/fedora-hyprland-installer, or the skill repository root) and define it as SKILL_DIR.
All bundled scripts MUST be executed using their full path relative to SKILL_DIR: /scripts/.sh.
Core Directives & Safety Rules
- Fedora-First: Always use Fedora tools (
dnf,systemctl,loginctl). Never useapt,pacman, oryay. - Never Blindly Execute: Inspect the system prior to any installation or modification.
- Preserve Existing Desktop: Do not uninstall GNOME, KDE, or any existing desktop environment. Hyprland should be added as a session choice in the display manager (GDM/SDDM/LightDM).
- Mandatory Backup: Always create a timestamped backup in
~/.local/state/fedora-hyprland-installer/backups/before writing or altering configurations in~/.config/hypr/,~/.config/waybar/, etc. - GPU Awareness: Check whether the system uses NVIDIA, AMD, Intel, or Hybrid graphics before configuring environment variables or graphics drivers. Never use arbitrary
.runinstallers for NVIDIA; rely on Fedora/RPM Fusion repositories. - Privileged Operations: Sudo commands must be clearly identified and communicated to the user. Do not hardcode passwords.
- Idempotency: Running actions multiple times must be safe and avoid duplicate config lines.
Workflow Guide
1. Installation Workflow
When the user asks to "Install Hyprland" or "Setup Hyprland on Fedora":
- Execute
/scripts/detect-system.shand/scripts/detect-gpu.sh. - Execute
/scripts/preflight.shto verify Fedora release, network, package manager, and sudo access. - Execute
/scripts/backup.shto preserve any pre-existing configurations. - Execute
/scripts/install.shto install Hyprland, Wayland portal packages (xdg-desktop-portal-hyprland,xdg-desktop-portal-gtk), PipeWire/WirePlumber, terminal, launcher, status bar, and authentication agent. - Execute
/scripts/configure.shto write a clean, functional initial Hyprland config (~/.config/hypr/hyprland.conf) tailored to detected terminal/launcher and GPU environment variables. - Execute
/scripts/verify.shto ensure binaries, portal services, PipeWire, and login desktop entries (/usr/share/wayland-sessions/hyprland.desktop) exist and validate. - Present a summary report detailing installed packages, backup paths, and login instructions.
2. Repair Workflow
When the user asks to "Fix Hyprland", "Hyprland won't start", "No audio", "Screen sharing broken":
- Run
/scripts/detect-system.shand inspect system logs (journalctl -xe,journalctl --user -u xdg-desktop-portal). - Execute
/scripts/repair.shto identify missing portals, PipeWire states, broken symlinks, or GPU driver mismatches. - Apply minimal, targeted repairs without re-installing unchanged packages.
- Execute
/scripts/verify.sh.
3. Update Workflow
When the user asks to "Update Hyprland":
- Run
/scripts/backup.sh. - Refresh Fedora package metadata (
sudo dnf check-update hyprland). - Update Hyprland and related Wayland packages via
/scripts/install.sh --update. - Validate configuration syntax and verify system integrity via
/scripts/verify.sh.
4. Uninstall Workflow
When the user asks to "Uninstall Hyprland":
- Explain to the user which packages will be removed.
- Run
/scripts/backup.sh. - Execute
/scripts/uninstall.shto cleanly remove Hyprland packages while preserving base desktop environments (GNOME/KDE) and user backup files.