Omarchy: AI 代理的系统管理护栏 - Openclaw 技能

作者:互联网

2026-03-26

AI教程

什么是 Omarchy?

Omarchy 是 Linux 系统的智能操作层,专门设计用于引导 AI 代理执行原生工作流。该 Openclaw 技能集成优先使用包含 160 多个专门脚本的目录,而不是依赖可能绕过系统状态管理的通用 Linux 命令。它确保诸如主题切换、软件包管理和服务重启等任务通过官方包装器处理,从而维护系统完整性并避免临时执行命令的常见陷阱。

通过将该技能视为一种操作模式而非仅仅是命令列表,它强制执行最佳实践,例如只读检查和高影响操作的确认。这种方法使 Omarchy 成为管理复杂桌面环境和系统级配置最可靠的 Openclaw 技能之一。

下载入口:https://github.com/openclaw/skills/tree/main/skills/achals-iglu/omarchy

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install omarchy

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 omarchy。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Omarchy 应用场景

  • 在不破坏会话状态的情况下重启 Waybar 或 Hyprland 等桌面组件。
  • 使用验证依赖关系的原生包装器安装或删除系统软件包。
  • 在 VS Code、浏览器和 Obsidian 等多个应用程序中同步主题。
  • 使用针对性的重启脚本排查 Wi-Fi、蓝牙和音频等硬件问题。
  • 通过静态检查发现安全的系统命令,而不是进行风险较大的试错执行。
Omarchy 工作原理
  1. 识别需要操作的特定系统组件,如 UI、网络或软件包管理器。
  2. 在 Openclaw 技能脚本目录中定位合适的命令族。
  3. 对脚本头进行静态检查,以了解预期目的并避免参数错误。
  4. 在进行更改之前,首先执行只读或状态命令以验证当前系统状态。
  5. 使用针对性的刷新或重启包装器,而不是通用的进程终止命令,以保留环境变量。
  6. 向用户建议高影响的操作,并在执行修改系统的脚本之前等待确认。

Omarchy 配置指南

要启用这些 Openclaw 技能,请确保您的代理环境可以访问 Omarchy 二进制目录。

# 确保 Omarchy bin 目录在您的 PATH 中
export PATH="$HOME/.local/share/omarchy/bin:$PATH"

# 验证安装并检查当前版本
omarchy-version

Omarchy 数据架构与分类体系

该技能使用可执行脚本的结构化目录运行。每个脚本都包含用于引导代理的文档头。

功能分类 脚本前缀 用途
UI 管理 omarchy-refresh-* 安全更新 Waybar 或 Hyprland 等 UI 组件
软件包控制 omarchy-pkg-* 处理具有状态感知的安装和卸载
服务恢复 omarchy-restart-* 重启 pipewire 或蓝牙等服务而不产生附带损害
主题流水线 omarchy-theme-* 跨多个应用程序同步视觉风格
更新工作流 omarchy-update-* 管理分阶段的系统和固件更新
name: omarchy
description: "Omarchy operating guardrails for day-to-day system work: assume the host is Omarchy by default, choose Omarchy-native workflows first, map user intent to the correct omarchy-* wrapper/script family, and avoid generic Linux commands that conflict with Omarchy behavior. Use whenever handling local system tasks on this host unless the user explicitly says it is not Omarchy; prioritize safe Omarchy commands, prevent non-Omarchy shortcuts (e.g., ad-hoc process killing/relaunch patterns), troubleshoot desktop behavior, and validate the right script before execution."

Omarchy Skill

Treat this skill as an Omarchy operating mode, not just a command catalog. When working on an Omarchy system, prefer Omarchy-native wrappers and workflows over generic Linux one-liners that may bypass expected state handling. Use local script docs and names to choose the correct path. Each script has documentation at the top describing its purpose. DO NOT RUN A SCRIPT UNTIL YOU ARE SURE OF ITS PURPOSE.

Operating rules

  1. Start with command name matching and in-file comments under /home/achals/.local/share/omarchy/bin.
  2. Prefer read-only/status commands first (*list*, *status*, *current*, *available*, *version*).
  3. Ask before broad or high-impact actions (*install*, *remove*, *reinstall*, *update*, *pkg*, *setup*, *set*).
  4. Avoid bulk discovery execution. Do static inspection first.
  5. Never assume omarchy-* scripts support standard CLI flags or parameters (including --help). Treat each script as custom; inspect its file/header comments first.

Worked examples (good vs bad)

Use these patterns whenever you operate on Omarchy. The goal is not "run an omarchy command at all costs"; the goal is to avoid bypassing Omarchy’s intended state-management flows.

1) Restarting Waybar

User intent: "Waybar is broken, restart it."

  • Bad (generic shortcut):
    • pkill waybar && waybar
  • Good (Omarchy-native):
    • omarchy-restart-waybar
  • Why: Omarchy wrappers usually handle environment/session assumptions better than raw kill-and-relaunch one-liners.

2) Applying config/UI refresh after edits

User intent: "I changed config, apply it."

  • Bad:
    • restarting random processes manually until things look fixed
  • Good:
    • use targeted refresh script first, e.g. omarchy-refresh-waybar, omarchy-refresh-hyprland, omarchy-refresh-config (pick by component)
  • Why: refresh scripts are explicit and reversible; manual shotgun restarts are noisy and risky.

3) Package management task

User intent: "Install/remove package X."

  • Bad:
    • using raw pacman/yay first without checking Omarchy wrappers
  • Good:
    • inspect and prefer omarchy-pkg-* flow (...-present, ...-missing, then ...-install/...-remove)
  • Why: wrapper flow keeps behavior consistent with Omarchy expectations.

4) Theme change request

User intent: "Switch theme / sync theme to apps."

  • Bad:
    • editing dotfiles manually first and restarting random apps
  • Good:
    • omarchy-theme-list -> omarchy-theme-set -> app-specific follow-ups if needed (omarchy-theme-set-vscode, ...-browser, ...-obsidian)
  • Why: Omarchy theme pipeline may include extra integration steps beyond plain config edits.

5) Audio/Bluetooth/Wi?Fi issue

User intent: "Audio/Bluetooth/Wi?Fi stopped behaving."

  • Bad:
    • broad process killing (killall pipewire, random daemon restarts)
  • Good:
    • use targeted wrapper restarts such as omarchy-restart-pipewire, omarchy-restart-bluetooth, omarchy-restart-wifi
  • Why: targeted wrappers reduce collateral damage and match Omarchy’s service model.

6) "What command should I run?" discovery flow

User intent: ambiguous request like "fix my display stack".

  • Bad:
    • execute many commands to discover options (for c in omarchy-*; do $c --help; done)
  • Good:
    1. Statically inspect names in /home/achals/.local/share/omarchy/bin
    2. Read top-of-file script comments for likely candidates
    3. Start with read-only/status scripts
    4. Propose 1-3 likely commands and ask before high-impact actions
  • Why: static inspection is safer, faster, and follows no-bulk-probing policy.

7) Update workflow

User intent: "Update system."

  • Bad:
    • directly running full update steps without checking availability/state
  • Good:
    • check first: omarchy-update-available (and related status)
    • then execute appropriate Omarchy update path with confirmation for impactful steps
  • Why: staged update flow reduces surprise breakage.

Decision template (apply every time)

For any Omarchy task, follow this mini-checklist:

  1. Identify component (UI, package, theme, network, update, device, etc.)
  2. Find matching omarchy-* family by name and script header comments
  3. Prefer read-only/status command first
  4. Use targeted omarchy-refresh-*/omarchy-restart-* over raw kill/relaunch
  5. Ask before high-impact actions (install/remove/reinstall/update/setup/set)

Omarchy command catalog (static, local)

Total commands: 161

battery (2)

  • omarchy-battery-monitor
  • omarchy-battery-remaining

branch (1)

  • omarchy-branch-set

channel (1)

  • omarchy-channel-set

cmd (12)

  • omarchy-cmd-apple-display-brightness
  • omarchy-cmd-audio-switch
  • omarchy-cmd-first-run
  • omarchy-cmd-missing
  • omarchy-cmd-present
  • omarchy-cmd-reboot
  • omarchy-cmd-screenrecord
  • omarchy-cmd-screensaver
  • omarchy-cmd-screenshot
  • omarchy-cmd-share
  • omarchy-cmd-shutdown
  • omarchy-cmd-terminal-cwd

debug (1)

  • omarchy-debug

dev (1)

  • omarchy-dev-add-migration

drive (3)

  • omarchy-drive-info
  • omarchy-drive-select
  • omarchy-drive-set-password

font (3)

  • omarchy-font-current
  • omarchy-font-list
  • omarchy-font-set

hibernation (3)

  • omarchy-hibernation-available
  • omarchy-hibernation-remove
  • omarchy-hibernation-setup

hook (1)

  • omarchy-hook

hyprland (3)

  • omarchy-hyprland-window-close-all
  • omarchy-hyprland-window-pop
  • omarchy-hyprland-workspace-toggle-gaps

install (9)

  • omarchy-install-chromium-google-account
  • omarchy-install-dev-env
  • omarchy-install-docker-dbs
  • omarchy-install-dropbox
  • omarchy-install-steam
  • omarchy-install-tailscale
  • omarchy-install-terminal
  • omarchy-install-vscode
  • omarchy-install-xbox-controllers

launch (14)

  • omarchy-launch-about
  • omarchy-launch-audio
  • omarchy-launch-bluetooth
  • omarchy-launch-browser
  • omarchy-launch-editor
  • omarchy-launch-floating-terminal-with-presentation
  • omarchy-launch-or-focus
  • omarchy-launch-or-focus-tui
  • omarchy-launch-or-focus-webapp
  • omarchy-launch-screensaver
  • omarchy-launch-tui
  • omarchy-launch-walker
  • omarchy-launch-webapp
  • omarchy-launch-wifi

lock (1)

  • omarchy-lock-screen
  • omarchy-menu
  • omarchy-menu-keybindings

migrate (1)

  • omarchy-migrate

notification (1)

  • omarchy-notification-dismiss

pkg (9)

  • omarchy-pkg-add
  • omarchy-pkg-aur-accessible
  • omarchy-pkg-aur-add
  • omarchy-pkg-aur-install
  • omarchy-pkg-drop
  • omarchy-pkg-install
  • omarchy-pkg-missing
  • omarchy-pkg-present
  • omarchy-pkg-remove

powerprofiles (1)

  • omarchy-powerprofiles-list

refresh (14)

  • omarchy-refresh-applications
  • omarchy-refresh-chromium
  • omarchy-refresh-config
  • omarchy-refresh-fastfetch
  • omarchy-refresh-hypridle
  • omarchy-refresh-hyprland
  • omarchy-refresh-hyprlock
  • omarchy-refresh-hyprsunset
  • omarchy-refresh-limine
  • omarchy-refresh-pacman
  • omarchy-refresh-plymouth
  • omarchy-refresh-swayosd
  • omarchy-refresh-walker
  • omarchy-refresh-waybar

reinstall (4)

  • omarchy-reinstall
  • omarchy-reinstall-configs
  • omarchy-reinstall-git
  • omarchy-reinstall-pkgs

remove (1)

  • omarchy-remove-dev-env

reset (1)

  • omarchy-reset-sudo

restart (15)

  • omarchy-restart-app
  • omarchy-restart-bluetooth
  • omarchy-restart-btop
  • omarchy-restart-hyprctl
  • omarchy-restart-hypridle
  • omarchy-restart-hyprsunset
  • omarchy-restart-mako
  • omarchy-restart-opencode
  • omarchy-restart-pipewire
  • omarchy-restart-swayosd
  • omarchy-restart-terminal
  • omarchy-restart-walker
  • omarchy-restart-waybar
  • omarchy-restart-wifi
  • omarchy-restart-xcompose

setup (3)

  • omarchy-setup-dns
  • omarchy-setup-fido2
  • omarchy-setup-fingerprint

show (2)

  • omarchy-show-done
  • omarchy-show-logo

snapshot (1)

  • omarchy-snapshot

state (1)

  • omarchy-state

theme (13)

  • omarchy-theme-bg-install
  • omarchy-theme-bg-next
  • omarchy-theme-current
  • omarchy-theme-install
  • omarchy-theme-list
  • omarchy-theme-remove
  • omarchy-theme-set
  • omarchy-theme-set-browser
  • omarchy-theme-set-gnome
  • omarchy-theme-set-obsidian
  • omarchy-theme-set-templates
  • omarchy-theme-set-vscode
  • omarchy-theme-update

toggle (5)

  • omarchy-toggle-idle
  • omarchy-toggle-nightlight
  • omarchy-toggle-screensaver
  • omarchy-toggle-suspend
  • omarchy-toggle-waybar

tui (2)

  • omarchy-tui-install
  • omarchy-tui-remove

tz (1)

  • omarchy-tz-select

update (14)

  • omarchy-update
  • omarchy-update-analyze-logs
  • omarchy-update-available
  • omarchy-update-available-reset
  • omarchy-update-branch
  • omarchy-update-confirm
  • omarchy-update-firmware
  • omarchy-update-git
  • omarchy-update-keyring
  • omarchy-update-perform
  • omarchy-update-restart
  • omarchy-update-system-pkgs
  • omarchy-update-time
  • omarchy-update-without-idle

upload (1)

  • omarchy-upload-log

version (4)

  • omarchy-version
  • omarchy-version-branch
  • omarchy-version-channel
  • omarchy-version-pkgs

voxtype (5)

  • omarchy-voxtype-config
  • omarchy-voxtype-install
  • omarchy-voxtype-model
  • omarchy-voxtype-remove
  • omarchy-voxtype-status

webapp (4)

  • omarchy-webapp-handler-hey
  • omarchy-webapp-handler-zoom
  • omarchy-webapp-install
  • omarchy-webapp-remove

windows (1)

  • omarchy-windows-vm