{
  "schemaVersion": "1.0",
  "item": {
    "slug": "xdotool-control",
    "name": "Xdotool Control",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/jeremysommerfeld8910-cpu/xdotool-control",
    "canonicalUrl": "https://clawhub.ai/jeremysommerfeld8910-cpu/xdotool-control",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/xdotool-control",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=xdotool-control",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json",
      "scripts/browser_action.sh",
      "scripts/click_extension.sh",
      "scripts/find_and_click.sh",
      "scripts/snap_verify_click.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/xdotool-control"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/xdotool-control",
    "agentPageUrl": "https://openagent3.xyz/skills/xdotool-control/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xdotool-control/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xdotool-control/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "xdotool-control",
        "body": "Automate mouse, keyboard, and window operations on the Linux desktop. Primary use: clicking Chrome extension icons, interacting with GUI apps when browser CDP isn't connected."
      },
      {
        "title": "Quick Start",
        "body": "# Find a window\nxdotool search --name \"Google Chrome\"\n\n# Click at screen coordinates\nxdotool mousemove 1800 56 click 1\n\n# Type text into focused window\nxdotool type \"hello world\"\n\n# Screenshot current state\nscrot /tmp/snap.png"
      },
      {
        "title": "1. Find + Focus + Click",
        "body": "# Find Chrome window, focus it, click at position\nWIN=$(xdotool search --name \"Google Chrome\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nsleep 0.3\nxdotool mousemove X Y click 1"
      },
      {
        "title": "2. Screenshot → Verify → Click Loop",
        "body": "Use this when you need to click an element but don't know its exact position:\n\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/snap_verify_click.sh \\\n  \"Google Chrome\" \\    # Window name pattern\n  \"extension_icon\" \\   # What to look for (label for your snap files)\n  1830 56              # Coordinates to click\n\nOr use the full loop script for unknown positions:\n\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/find_and_click.sh \\\n  \"Google Chrome\" \\\n  /tmp/target_icon.png \\  # Template image to match (ImageMagick compare)\n  10                       # Max attempts"
      },
      {
        "title": "3. Click Chrome Extension Icon",
        "body": "bash ~/.openclaw/workspace/skills/xdotool-control/scripts/click_extension.sh \"OpenClaw\"\n# or\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/click_extension.sh \"Dawn\"\n\nThis focuses Chrome and clicks the extensions puzzle-piece area, then scans for the named extension."
      },
      {
        "title": "4. Tab Switching",
        "body": "# Switch to next tab\nWIN=$(xdotool search --name \"Google Chrome\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nxdotool key ctrl+Tab\n\n# Switch to specific tab (1-indexed)\nxdotool key ctrl+2   # Tab 2\nxdotool key ctrl+3   # Tab 3\n\n# Open new tab\nxdotool key ctrl+t\n\n# Type a URL into address bar\nxdotool key ctrl+l\nsleep 0.2\nxdotool type \"https://example.com\"\nxdotool key Return"
      },
      {
        "title": "5. Type Into Window",
        "body": "WIN=$(xdotool search --name \"Terminal\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nsleep 0.2\nxdotool type --clearmodifiers \"command to type here\"\nxdotool key Return"
      },
      {
        "title": "6. Approve tmux Prompt (for Clawdy daemon)",
        "body": "SESSION=$(tmux ls | grep claude-session | head -1 | cut -d: -f1)\ntmux send-keys -t \"$SESSION\" \"Yes\" Enter"
      },
      {
        "title": "Window Management",
        "body": "# List all windows with names\nxdotool search --name \"\" | while read wid; do\n  name=$(xdotool getwindowname \"$wid\" 2>/dev/null)\n  [ -n \"$name\" ] && echo \"$wid $name\"\ndone | head -20\n\n# Get window geometry (position + size)\nxdotool getwindowgeometry $WIN_ID\n\n# Move window to front\nxdotool windowraise $WIN_ID\n\n# Resize window\nxdotool windowsize $WIN_ID 1280 800\n\n# Move window\nxdotool windowmove $WIN_ID 0 0"
      },
      {
        "title": "Screenshot Utilities",
        "body": "# Full desktop screenshot\nscrot /tmp/desktop.png\n\n# Specific window\nscrot -u /tmp/active_window.png  # Currently active window\n\n# Crop a region (x,y,width,height)\nscrot -a 1400,0,480,60 /tmp/toolbar.png\n\n# With delay\nscrot -d 2 /tmp/delayed.png\n\nRead screenshots with Claude's Read tool — it renders images inline."
      },
      {
        "title": "Chrome-Specific Patterns",
        "body": "# Chrome toolbar extension icons are typically at:\n# y ≈ 56 (vertical center of toolbar)\n# x varies by number of pinned extensions, roughly:\n#   Last icon:       screen_width - 30\n#   Second-to-last:  screen_width - 60\n#   Puzzle piece:    screen_width - 90 (unpinned extensions menu)"
      },
      {
        "title": "Clicking a Pinned Extension Icon",
        "body": "# Always auto-detect screen width — never hardcode\nread SCREEN_W SCREEN_H <<< $(xdotool getdisplaygeometry)\nTOOLBAR_Y=56\n\n# Take a toolbar snapshot first to verify positions\nscrot -a \"$((SCREEN_W-300)),0,300,70\" /tmp/toolbar_snap.png\n# Read /tmp/toolbar_snap.png to see icon positions visually\n\n# Then click\nxdotool mousemove $((SCREEN_W - 60)) $TOOLBAR_Y click 1"
      },
      {
        "title": "Dependencies",
        "body": "# Required\nsudo apt-get install xdotool scrot\n\n# Optional — enables template matching in find_and_click.sh\nsudo apt-get install imagemagick\n\n# Check all deps at once:\nfor dep in xdotool scrot convert; do\n  command -v \"$dep\" &>/dev/null && echo \"✓ $dep\" || echo \"✗ $dep (missing)\"\ndone"
      },
      {
        "title": "Tips & Gotchas",
        "body": "Always windowactivate --sync before clicking — without --sync, the click may fire before focus lands\nAdd sleep 0.3 after focus change before interacting with Chrome\nCoordinates are screen-absolute, not window-relative — factor in window position from getwindowgeometry\nxdotool type vs xdotool key: use type for text strings, key for special keys (ctrl+t, Return, Escape)\n--clearmodifiers on type prevents Shift/Ctrl state from leaking into typed text\nscrot -u captures only the currently active window — make sure to activate the right window first\nImageMagick compare can do pixel-level template matching for verify loops (see find_and_click.sh)"
      }
    ],
    "body": "xdotool-control\n\nAutomate mouse, keyboard, and window operations on the Linux desktop. Primary use: clicking Chrome extension icons, interacting with GUI apps when browser CDP isn't connected.\n\nQuick Start\n# Find a window\nxdotool search --name \"Google Chrome\"\n\n# Click at screen coordinates\nxdotool mousemove 1800 56 click 1\n\n# Type text into focused window\nxdotool type \"hello world\"\n\n# Screenshot current state\nscrot /tmp/snap.png\n\nCore Patterns\n1. Find + Focus + Click\n# Find Chrome window, focus it, click at position\nWIN=$(xdotool search --name \"Google Chrome\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nsleep 0.3\nxdotool mousemove X Y click 1\n\n2. Screenshot → Verify → Click Loop\n\nUse this when you need to click an element but don't know its exact position:\n\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/snap_verify_click.sh \\\n  \"Google Chrome\" \\    # Window name pattern\n  \"extension_icon\" \\   # What to look for (label for your snap files)\n  1830 56              # Coordinates to click\n\n\nOr use the full loop script for unknown positions:\n\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/find_and_click.sh \\\n  \"Google Chrome\" \\\n  /tmp/target_icon.png \\  # Template image to match (ImageMagick compare)\n  10                       # Max attempts\n\n3. Click Chrome Extension Icon\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/click_extension.sh \"OpenClaw\"\n# or\nbash ~/.openclaw/workspace/skills/xdotool-control/scripts/click_extension.sh \"Dawn\"\n\n\nThis focuses Chrome and clicks the extensions puzzle-piece area, then scans for the named extension.\n\n4. Tab Switching\n# Switch to next tab\nWIN=$(xdotool search --name \"Google Chrome\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nxdotool key ctrl+Tab\n\n# Switch to specific tab (1-indexed)\nxdotool key ctrl+2   # Tab 2\nxdotool key ctrl+3   # Tab 3\n\n# Open new tab\nxdotool key ctrl+t\n\n# Type a URL into address bar\nxdotool key ctrl+l\nsleep 0.2\nxdotool type \"https://example.com\"\nxdotool key Return\n\n5. Type Into Window\nWIN=$(xdotool search --name \"Terminal\" | head -1)\nxdotool windowactivate --sync \"$WIN\"\nsleep 0.2\nxdotool type --clearmodifiers \"command to type here\"\nxdotool key Return\n\n6. Approve tmux Prompt (for Clawdy daemon)\nSESSION=$(tmux ls | grep claude-session | head -1 | cut -d: -f1)\ntmux send-keys -t \"$SESSION\" \"Yes\" Enter\n\nWindow Management\n# List all windows with names\nxdotool search --name \"\" | while read wid; do\n  name=$(xdotool getwindowname \"$wid\" 2>/dev/null)\n  [ -n \"$name\" ] && echo \"$wid $name\"\ndone | head -20\n\n# Get window geometry (position + size)\nxdotool getwindowgeometry $WIN_ID\n\n# Move window to front\nxdotool windowraise $WIN_ID\n\n# Resize window\nxdotool windowsize $WIN_ID 1280 800\n\n# Move window\nxdotool windowmove $WIN_ID 0 0\n\nScreenshot Utilities\n# Full desktop screenshot\nscrot /tmp/desktop.png\n\n# Specific window\nscrot -u /tmp/active_window.png  # Currently active window\n\n# Crop a region (x,y,width,height)\nscrot -a 1400,0,480,60 /tmp/toolbar.png\n\n# With delay\nscrot -d 2 /tmp/delayed.png\n\n\nRead screenshots with Claude's Read tool — it renders images inline.\n\nChrome-Specific Patterns\n# Chrome toolbar extension icons are typically at:\n# y ≈ 56 (vertical center of toolbar)\n# x varies by number of pinned extensions, roughly:\n#   Last icon:       screen_width - 30\n#   Second-to-last:  screen_width - 60\n#   Puzzle piece:    screen_width - 90 (unpinned extensions menu)\n\nClicking a Pinned Extension Icon\n# Always auto-detect screen width — never hardcode\nread SCREEN_W SCREEN_H <<< $(xdotool getdisplaygeometry)\nTOOLBAR_Y=56\n\n# Take a toolbar snapshot first to verify positions\nscrot -a \"$((SCREEN_W-300)),0,300,70\" /tmp/toolbar_snap.png\n# Read /tmp/toolbar_snap.png to see icon positions visually\n\n# Then click\nxdotool mousemove $((SCREEN_W - 60)) $TOOLBAR_Y click 1\n\nDependencies\n# Required\nsudo apt-get install xdotool scrot\n\n# Optional — enables template matching in find_and_click.sh\nsudo apt-get install imagemagick\n\n# Check all deps at once:\nfor dep in xdotool scrot convert; do\n  command -v \"$dep\" &>/dev/null && echo \"✓ $dep\" || echo \"✗ $dep (missing)\"\ndone\n\nTips & Gotchas\nAlways windowactivate --sync before clicking — without --sync, the click may fire before focus lands\nAdd sleep 0.3 after focus change before interacting with Chrome\nCoordinates are screen-absolute, not window-relative — factor in window position from getwindowgeometry\nxdotool type vs xdotool key: use type for text strings, key for special keys (ctrl+t, Return, Escape)\n--clearmodifiers on type prevents Shift/Ctrl state from leaking into typed text\nscrot -u captures only the currently active window — make sure to activate the right window first\nImageMagick compare can do pixel-level template matching for verify loops (see find_and_click.sh)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/jeremysommerfeld8910-cpu/xdotool-control",
    "publisherUrl": "https://clawhub.ai/jeremysommerfeld8910-cpu/xdotool-control",
    "owner": "jeremysommerfeld8910-cpu",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/xdotool-control",
    "downloadUrl": "https://openagent3.xyz/downloads/xdotool-control",
    "agentUrl": "https://openagent3.xyz/skills/xdotool-control/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xdotool-control/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xdotool-control/agent.md"
  }
}