🖱️
简介
基于 cliclick 命令行工具实现 Mac 鼠标键盘自动化控制,支持点击、输入、快捷键等操作,适用于本地自动化场景。
原始描述
Control mouse and keyboard on Mac using cliclick. Use when you need to automate clicking, typing, or controlling the mouse cursor.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
Claude Codeunzip -o skill.zip -d ~/.claude/skills/mouse-keyboard/
其它 Agent解压到它自己的 skills 目录,目录名用 mouse-keyboard
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: mouse-keyboard description: Control mouse and keyboard on Mac using cliclick. Use when you need to automate clicking, typing, or controlling the mouse cursor.
Mouse & Keyboard Control
Use cliclick tool for mouse/keyboard automation on Mac.
Tools
exec
Use exec to run cliclick commands.
Available Commands
c:X,Y- Click at coordinates X,Yc:~100,~200- Click at relative positionw:500- Wait 500mst:hello- Type "hello"kd:cmd- Key down commandku:cmd- Key up commandp:return- Press return/enterp:space- Press spacep:tab- Press tabm:X,Y- Move mouse to X,Ydp- Double clickrc:X,Y- Right click at X,Y
Common Workflows
Click at position
cliclick c:500,300
Type text
cliclick t:Hello World
Click and type
cliclick c:500,300 && cliclick t:username
Keyboard shortcut
cliclick kd:cmd ku:cmd # Press cmd
Move and click
cliclick m:100,100 && cliclick c:100,100
Getting Coordinates
Use cliclick p to print current mouse position, or use macOS screenshot tool (Shift+Cmd+4) to get coordinates.
Notes
- Coordinates are screen-based (0,0 is top-left)
- Use
osascriptfor more complex keyboard operations - Combine with
sleepfor timing
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。