desktop-automation

Automate mouse, keyboard, screen capture, and window management with robotgo in Go.

2|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/hightemp/go_computer_use_mcp_server --skill desktop-automation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: desktop-automation
Source: https://github.com/hightemp/go_computer_use_mcp_server/tree/main/.github/skills/desktop-automation
Command: npx skills add https://github.com/hightemp/go_computer_use_mcp_server --skill desktop-automation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns, gotchas, and best practices for cross-platform desktop automation with robotgo in Go. Covers display requirements, mouse/keyboard APIs, screenshot handling, window management, multi-monitor support, CGO, X11 specifics, and testing headless environments. Use when implementing or debugging robotgo-based tools, handling display errors, working with screen coordinates, or setting up headless CI testing.

Core Features & Use Cases

  • Display requirements: ensure a valid X11 display is set for Linux, and provide guidance for headless CI with Xvfb.
  • Mouse API: full examples of moving, clicking, dragging, and scrolling across monitors.
  • Keyboard API: key taps, modifiers, and text input across OSes.
  • Screen / Screenshot API: capturing regions or full screens, encoding to PNG, and returning base64 payloads for transport.
  • Window Management API: focusing, moving, resizing, and toggling window states across platforms.
  • Multi-Monitor Support: coordinate across displays and determine display counts.
  • OCR (via gosseract): text extraction from screenshots using Tesseract.
  • Testing headless environments: CI-friendly patterns and Xvfb usage.
  • Gotchas & troubleshooting: common pitfalls and safe usage notes.

Quick Start

Install Go, configure a project that uses the robotgo patterns, and begin implementing your desktop automation tasks.

Frequently Asked Questions about desktop-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate cross-platform desktop tasks like mouse and keyboard control using Go?

Cross-platform desktop automation in Go is handled using the robotgo library, which provides APIs for mouse movement, clicking, key taps, and text input across Windows, macOS, and Linux.

What do I need to run robotgo desktop automation in a headless CI environment?

Running robotgo in headless CI requires CGO-enabled Go tooling and a virtual framebuffer like Xvfb on Linux to provide a valid X11 display for screen capture and input simulation.

How do I capture screenshots and encode them as base64 with robotgo?

Screen capture in robotgo involves grabbing specific regions or full screens and encoding them to PNG, which can then be returned as base64 payloads for transport in testing workflows.

Why does robotgo fail with display errors on Linux during desktop automation?

Display errors on Linux occur because robotgo requires a valid X11 display, meaning you must configure your environment correctly or use Xvfb for headless setups to avoid failures.

Can I manage windows and support multi-monitor setups with Go desktop automation?

Window management and multi-monitor support are possible with robotgo, allowing you to focus, move, resize windows, and calculate coordinates across multiple physical displays.

Does robotgo support extracting text from captured screenshots?

Text extraction from screenshots is supported by integrating gosseract for OCR, utilizing Tesseract to process screen captures and extract readable text for automated testing workflows.