Desktop Guardian for Openclaw

A powerful macOS GUI automation and monitoring tool for OpenClaw that enables agents to interact with windows, apps, and system dialogs.

s3rous
v2.0.0
Feb 23, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install desktop-guardian

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install desktop-guardian using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Desktop Guardian?

Desktop Guardian is a comprehensive automation suite designed for the Openclaw Skills ecosystem, leveraging Hammerspoon to provide deep access to the macOS desktop environment. It empowers AI agents to perform complex tasks like querying window states, clicking UI elements, and managing browser tabs with granular precision.

Beyond simple execution, it acts as an active monitor, identifying system alerts and enforcing user-defined desktop policies to maintain an organized workspace. By bridging the gap between LLM reasoning and the macOS Accessibility API, it provides a robust framework for desktop management within the Openclaw Skills architecture.

Desktop Guardian Use Cases

  • Enabling AI agents to interact with native macOS applications and system dialogs
  • Automatically dismissing non-critical system popups and permission prompts
  • Enforcing desktop cleanliness by closing unauthorized apps or excess browser tabs
  • Monitoring for security alerts or hardware prompts that require human intervention
  • Streamlining macOS accessibility workflows within the Openclaw Skills framework

How Desktop Guardian Works

  1. The skill initializes via Hammerspoon and a background LaunchAgent to monitor the desktop state.
  2. It continuously snapshots open windows, active apps, and system dialogs via the macOS Accessibility API.
  3. The automation engine evaluates these snapshots against a YAML-based policy file located in the user directory.
  4. If a violation is detected (e.g., too many browser tabs or unauthorized apps), it executes pre-defined actions like closing windows or sending keypresses.
  5. For critical prompts, it can alert the user via external integrations, ensuring humans stay in the loop for sensitive security decisions.

Desktop Guardian Setup

To install this component of the Openclaw Skills library, execute the following command in your terminal:

bash scripts/install.sh

This script handles Hammerspoon installation, configures the DesktopGuardian Spoon, and sets up necessary LaunchAgents. You will be prompted to grant Accessibility permissions to Hammerspoon during this process. Configuration is managed via ~/.openclaw/skills/desktop-guardian/policy.yaml.

Desktop Guardian Data Schema & Taxonomy

The skill organizes its operation through a specific directory structure and metadata taxonomy:

Component Description
policy.yaml Core configuration defining app whitelists, tab limits, and auto-dismiss rules
KILL_SWITCH A file-based trigger to instantly halt all automation actions for safety
violation.log An audit trail of every automated action and policy violation detected by the agent
state.json Internal tracking for alert cooldowns and snapshot history to prevent duplicate notifications

Desktop Guardian Advanced Features

  • Chrome DevTools Protocol (CDP) integration for granular control over individual browser tabs and window counts
  • Swift Fallback Mode allows for monitor-only functionality even if Hammerspoon is unavailable or disabled
  • Safety Guardrails include a hardcoded button blacklist (Allow, Delete, Install) to prevent destructive system actions
  • Configurable Kill Switch providing an immediate manual override for all desktop automations
  • Extensive Helper CLI for validating configs, logging violations, and generating daily activity summaries within the Openclaw Skills environment

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*