AgentSkillsCN

osctrl-desktop-automation

在通过 OSCTRL CLI 自动化桌面交互时使用——包括鼠标操作、键盘输入、屏幕截图、窗口管理。在执行鼠标操作前,务必先获取当前上下文信息。

SKILL.md
--- frontmatter
name: osctrl-desktop-automation
description: Use when automating desktop interactions via OSCTRL CLI - mouse, keyboard, screen capture, window management. ALWAYS get context before mouse operations.

OSCTRL Desktop Automation Skill

When to Use

  • Automating mouse clicks, movements, drags
  • Typing text or pressing keys programmatically
  • Managing windows (focus, move, resize, minimize/maximize)
  • Taking screenshots for verification
  • Reading/writing clipboard
  • Launching or listing processes

Critical Rule

ALWAYS call osctrl context before any mouse operation. Never click blindly.

Quick Reference

CommandPurpose
osctrl contextGet screen size, mouse position, active window
osctrl mouse move <x> <y>Move cursor
osctrl mouse clickLeft click
osctrl keyboard type <text>Type text
osctrl keyboard hotkey <keys...>Key combination (ctrl c, alt f4)
osctrl screen capture --output <path>Screenshot
osctrl window focus <title>Focus window

Workflow

code
1. osctrl context              # Get state
2. Validate coordinates        # Within screen bounds
3. osctrl window focus <app>   # Ensure correct window
4. osctrl mouse move <x> <y>   # Position cursor
5. osctrl mouse click          # Execute action
6. osctrl screen capture       # Verify result

See Also

Full instructions available in docs/ai-instructions/ for:

  • Claude Code (CLAUDE.md)
  • Cursor (.cursorrules)
  • OpenAI Codex
  • Gemini CLI