# Send Desktop Guardian to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "desktop-guardian",
    "name": "Desktop Guardian",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/s3rous/desktop-guardian",
    "canonicalUrl": "https://clawhub.ai/s3rous/desktop-guardian",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/desktop-guardian",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=desktop-guardian",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "assets/config.example.yaml",
      "references/hammerspoon-setup.md",
      "references/macos-permissions.md",
      "references/policies.md",
      "scripts/desktop-query.swift"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/desktop-guardian"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/desktop-guardian",
    "downloadUrl": "https://openagent3.xyz/downloads/desktop-guardian",
    "agentUrl": "https://openagent3.xyz/skills/desktop-guardian/agent",
    "manifestUrl": "https://openagent3.xyz/skills/desktop-guardian/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/desktop-guardian/agent.md"
  }
}
```
## Documentation

### Desktop Guardian

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

### 🖥️ 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:

Install Hammerspoon if needed
Install the DesktopGuardian Spoon
Guide you through Accessibility permission
Compile the Swift fallback for degraded mode
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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: s3rous
- Version: 2.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/desktop-guardian)
- [Send to Agent page](https://openagent3.xyz/skills/desktop-guardian/agent)
- [JSON manifest](https://openagent3.xyz/skills/desktop-guardian/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/desktop-guardian/agent.md)
- [Download page](https://openagent3.xyz/downloads/desktop-guardian)