desktop-control▌
patrickporto/desktop-agent · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Control mouse, keyboard, and screen for cross-platform desktop automation.
- ›Five command categories: mouse control (movement, clicks, drag, scroll), keyboard input (typing, hotkeys, key presses), screen capture and analysis (screenshots, image/text location via OCR), message dialogs (alerts, confirmations, prompts), and application control (open, focus, list windows)
- ›Supports Windows, macOS, and Linux with platform-specific shortcuts and application launching
- ›Image location with confi
Desktop Control Skill
This skill provides comprehensive desktop automation capabilities through PyAutoGUI, allowing AI agents to control the mouse, keyboard, take screenshots, and interact with the desktop environment.
How to Use This Skill
As an AI agent, you can invoke desktop automation commands using the uvx desktop-agent CLI.
Command Structure
All commands follow this pattern:
uvx desktop-agent <category> <command> [arguments] [options]
Categories:
mouse- Mouse controlkeyboard- Keyboard inputscreen- Screenshots and screen analysismessage- User dialogsapp- Application control (open, focus, list windows)
Available Commands
🖱️ Mouse Control (mouse)
Control cursor movement and clicks.
# Move cursor to coordinates
uvx desktop-agent mouse move <x> <y> [--duration SECONDS]
# Click at current position or specific coordinates
uvx desktop-agent mouse click [x] [y] [--button left|right|middle] [--clicks N]
# Specialized clicks
uvx desktop-agent mouse double-click [x] [y]
uvx desktop-agent mouse right-click [x] [y]
uvx desktop-agent mouse middle-click [x] [y]
# Drag to coordinates
uvx desktop-agent mouse drag <x> <y> [--duration SECONDS] [--button BUTTON]
# Scroll (positive=up, negative=down)
uvx desktop-agent mouse scroll <clicks> [x] [y]
# Get current mouse position
uvx desktop-agent mouse position
Examples:
# Move to center of 1920x1080 screen
uvx desktop-agent mouse move 960 540 --duration 0.5
# Right-click at specific location
uvx desktop-agent mouse right-click 500 300
# Scroll down 5 clicks
uvx desktop-agent mouse scroll -5
⌨️ Keyboard Control (keyboard)
Type text and execute keyboard shortcuts.
# Type text
uvx desktop-agent keyboard write "<text>" [--interval SECONDS]
# Press keys
uvx desktop-agent keyboard press <key> [--presses N] [--interval SECONDS]
# Execute hotkey combination (comma-separated)
uvx desktop-agent keyboard hotkey "<key1>,<key2>,..."
# Hold/release keys
uvx desktop-agent keyboard keydown <key>
uvx desktop-agent keyboard keyup <key>
Examples:
# Type text with natural delay
uvx desktop-agent keyboard write "Hello World" --interval 0.05
# Copy selected text
uvx desktop-agent keyboard hotkey "ctrl,c"
# Open Task Manager
uvx desktop-agent keyboard hotkey "ctrl,shift,esc"
# Press Enter 3 times
uvx desktop-agent keyboard press enter --presses 3
Common Key Names:
- Modifiers:
ctrl,shift,alt,win - Special:
enter,tab,esc,space,backspace,delete - Function:
f1throughf12 - Arrows:
up,down,left,right
🖼️ Screen & Screenshots (screen)
Capture screenshots and analyze screen content. Supports targeting specific windows.
# Take screenshot
uvx desktop-agent screen screenshot <filename> [--region "x,y,width,height"] [--window <title>] [--active]
# Locate image on screen or within window
uvx desktop-agent screen locate <image_path> [--confidence 0.0-1.0] [--window <title>] [--active]
uvx desktop-agent screen locate-center <image_path> [--confidence 0.0-1.0] [--window <title>] [--active]
# Locate text using OCR within window
uvx desktop-agent screen locate-text-coordinates <text> [--window <title>] [--active]
uvx desktop-agent screen read-all-text [--window <title>] [--active]
# Utility commands
uvx desktop-agent screen pixel <x> <y>
uvx desktop-agent screen size
uvx desktop-agent screen on-screen <x> <y>
Examples:
# Screenshot of active window
uvx desktop-agent screen screenshot active.png --active
# Screenshot of a specific application
uvx desktop-agent screen screenshot chrome.png --window "Google Chrome"
# Locate image within Notepad
uvx desktop-agent screen locate-center button.png --window "Notepad"
💬 Message Dialogs (message)
Display user interaction dialogs.
# Show alert
uvx desktop-agent message alert "<text>" [--title TITLE] [--button BUTTON]
# Show confirmation dialog
uvx desktop-agent message confirm "<text>" [--title TITLE] [--buttons "OK,Cancel"]
# Prompt for input
uvx desktop-agent message prompt "<text>" [--title TITLE] [--default TEXT]
# Password input
uvx desktop-agent message password "<text>" [--title TITLE] [--mask CHAR]
Examples:
# Simple alert
uvx desktop-agent message alert "Task completed!"
# Get user confirmation
uvx desktop-agent message confirm "Continue with operation?"
# Ask for user input
uvx desktop-agent message prompt "Enter your name:"
📱 Application Control (app)
Control applications across Windows, macOS, and Linux.
# Open an application by name
uvx desktop-agent app open <name> [--arg ARGS...]
# Focus on a window by title/name
uvx desktop-agent app focus <name>
# List all visible windows
uvx desktop-agent app list
Examples:
# Windows: Open Notepad
uvx desktop-agent app open notepad
# Windows: Open Chrome with a URL
uvx desktop-agent app open "chrome" --arg "https://google.com"
# macOS: Open Safari
uvx desktop-agent app open "Safari"
# Focus on a specific window
uvx desktop-agent app focus "Untitled - Notepad"
# List all open windows
uvx desktop-agent app list
Common Automation Workflows
Workflow 1: Open Application and Type
# Open notepad directly (cross-platform)
uvx desktop-agent app open notepad
# Wait for app to open, then focus it
uvx desktop-agent app focus notepad
# Type some text
uvx desktop-agent keyboard write "Hello from Desktop Skill!"
Workflow 2: Screenshot + Analysis
# Get screen size first
uvx desktop-agent screen size
# Take full screenshot
uvx desktop-agent screen screenshot current_screen.png
# Check if specific UI element is visible
uvx desktop-agent screen locate save_button.png
Workflow 3: Form Filling
# Click first field
uvx desktop-agent mouse click 300 200
# Fill field
uvx desktop-agent keyboard write "John Doe"
# Tab to next field
uvx desktop-agent keyboard press tab
# Fill second field
uvx desktop-agent keyboard write "[email protected]"
# Submit form (Enter)
uvx desktop-agent keyboard press enter
Workflow 4: Copy/Paste Operations
# Select all text
uvx desktop-agent keyboard hotkey "ctrl,a"
# Copy
uvx desktop-agent keyboard hotkey "ctrl,c"
# Click destination
uvx desktop-agent mouse click 500 600
# Paste
uvx desktop-agent keyboard hotkey "ctrl,v"
Safety Considerations
When using this skill, AI agents should:
- Verify coordinates: Use
screen sizeandon-screenbefore clicking - Add delays: Insert appropriate delays between commands for UI responsiveness
- Validate images: Ensure image files exist before using
locatecommands - Handle failures: Commands may fail if windows change or elements move
- User safety: Always confirm destructive actions with user via
message confirm
Troubleshooting
PyAutoGUI Fail-Safe
PyAutoGUI has a fail-safe: moving mouse to screen corner aborts operations. This is a safety feature.
Image not found
When using screen locate, ensure:
- Image file exists and path is correct
- Adjust
--confidence
How to use desktop-control on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add desktop-control
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches desktop-control from GitHub repository patrickporto/desktop-agent and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate desktop-control. Access the skill through slash commands (e.g., /desktop-control) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★27 reviews- ★★★★★James Gonzalez· Dec 28, 2024
desktop-control has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aisha Martin· Dec 28, 2024
desktop-control reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Yash Thakker· Nov 23, 2024
desktop-control is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Kiara Malhotra· Nov 19, 2024
desktop-control fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Amina Farah· Nov 19, 2024
I recommend desktop-control for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Anaya Yang· Nov 11, 2024
Keeps context tight: desktop-control is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Dhruvi Jain· Oct 14, 2024
Keeps context tight: desktop-control is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Kiara Johnson· Oct 10, 2024
We added desktop-control from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Anika Kim· Oct 10, 2024
Useful defaults in desktop-control — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Anika Johnson· Oct 2, 2024
desktop-control is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 27