Token导航 LogoToken导航TokenDH.com
开发操作浏览器clawhub未标认证来源可访问clear审计提醒

desktop-guardian桌面守护者

Agent Skill

desktop-guardian 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

20,556

周安装

848

GitHub Stars

公开资料未说明

下载量

6,716
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:desktop-guardian(桌面守护者)
来源仓库:https://github.com/s3rous/desktop-guardian
安装命令:
openclaw skills install desktop-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install desktop-guardian

简介

用于辅助前端页面和组件开发。desktop-guardian 属于开发类 Skill,可作为该场景下的辅助能力补充。

  • 适合维护前端项目、生成组件或检查界面实现。
  • 支持 macOS GUI 自动化和桌面控制,基于 Hammerspoon 提供完全访问权限。
  • 使用时需结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,注意可能触发命令执行或文件读写。

SKILL.md

name
desktop-guardian
description
macOS GUI automation and desktop control for OpenClaw, powered by Hammerspoon. Gives your agent full access to interact with the Mac desktop — query windows, manage apps, close browser tabs, click dialog buttons, dismiss popups, and send keypresses. Includes an always-on desktop guardian that actively monitors for system dialogs, permission prompts, error popups, and unauthorized apps, taking action automatically or alerting you when human input is needed. Use when: (1) your agent needs to interact with the macOS GUI, (2) monitoring and responding to desktop popups/dialogs/alerts, (3) managing open apps, browser windows, and tabs, (4) enforcing desktop cleanliness policies, (5) any macOS Accessibility automation from OpenClaw.

Desktop Guardian

Full macOS GUI access and desktop automation for OpenClaw, powered by Hammerspoon.

What It Does

🖥️ GUI Access

  • Query all open windows, apps, and dialogs with full detail (titles, buttons, states)
  • Close specific windows or tabs — not just kill entire apps
  • Click buttons in system dialogs and popups (with safety guardrails)
  • Send keypresses to any app
  • Quit or force-quit apps programmatically
  • Chrome DevTools Protocol integration for tab-level browser control

🛡️ Active Desktop Monitoring

  • Watches for system dialogs, permission prompts, error popups, and alerts in real-time
  • Auto-dismisses known-safe dialogs (e.g., "app downloaded from internet")
  • Alerts you via Telegram/chat when human input is needed (e.g., security prompts)
  • Detects and closes unauthorized apps and excess browser windows/tabs
  • Enforces configurable desktop policies via YAML rules
  • Logs every action for full audit trail

Requirements

  • macOS (Tahoe or later)
  • Hammerspoon (installed automatically) + Accessibility permission
  • Python 3 + PyYAML (installed automatically)
  • Optional: Chrome with --remote-debugging-port=9222 for tab-level control

Installation

bash scripts/install.sh

This will:

  1. Install Hammerspoon if needed
  2. Install the DesktopGuardian Spoon
  3. Guide you through Accessibility permission
  4. Compile the Swift fallback for degraded mode
  5. Set up config, logs, and LaunchAgent

Configuration

Config file: ~/.openclaw/skills/desktop-guardian/policy.yaml

See assets/config.example.yaml for all options. Key settings:

  • cleanup.enabled: Master switch for auto-cleanup (default: true)
  • cleanup.apps.whitelist: Apps allowed to run; others get closed
  • browsers.chrome.max_windows/max_tabs: Limits before auto-close
  • dialogs.auto_dismiss: Apps whose dialogs are safe to dismiss
  • dialogs.ignore: Apps whose dialogs should be silently ignored
  • alerts.notify_on_actions: Send notification for every auto-action

Chrome Tab Monitoring

For tab-level granularity, Chrome must run with CDP enabled:

open -a "Google Chrome" --args --remote-debugging-port=9222

Without CDP, only window counts are available.

Kill Switch

Instantly disable all actions:

touch ~/.openclaw/skills/desktop-guardian/KILL_SWITCH

Remove to re-enable:

rm ~/.openclaw/skills/desktop-guardian/KILL_SWITCH

Graceful Degradation

Without Hammerspoon, the skill runs in monitor-only mode using a Swift fallback binary. It can detect violations but cannot auto-close or dismiss anything.

helpers.py Subcommands

parse_config          — Output config as key=value pairs
validate_config       — Validate config (exit 0/1)
check_quiet           — Exit 0 if NOT in quiet hours
evaluate_snapshot     — Apply policy to snapshot JSON → violations + actions
parse_query           — Convert snapshot to key=value pairs
safe_hs_command       — Generate safe hs -c command string
update_state          — Update alert cooldown state
log_violation         — Append to violation log
daily_summary         — Generate daily summary
list_apps             — List apps from last snapshot
check_cooldown        — Check if alert cooldown has expired

Security

  • Never interpolates shell variables into hs -c commands
  • Hardcoded button blacklist: won't click Allow, Delete, Install, etc.
  • Hardcoded app blacklist: won't dismiss SecurityAgent, Keychain Access, etc.
  • All app names validated against ^[a-zA-Z0-9 ._-]+$
  • Config file mode 600, state uses atomic writes
  • Full audit log of every action taken

Uninstall

bash scripts/uninstall.sh

Removes LaunchAgent, Spoon, and init.lua entries. Preserves config/logs unless you choose to remove them. Does NOT uninstall Hammerspoon.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

97.05%
按下载量换算6,518

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills