
Wechat Send
This automates sending WeChat messages on macOS by driving the desktop client through UI automation and clipboard tricks instead of typing directly, which sidesteps input method interference with Chinese text. It uses osascript to focus WeChat, trigger keyboard shortcuts, and paste both contact names and message content from the clipboard. The workflow is straightforward: run a doctor check to verify dependencies, then call the send_message script with a contact name and message body. The main gotcha is you need Accessibility permissions granted, and if you have duplicate contact names you might message the wrong person. It's purpose built for macOS desktop WeChat when you need programmatic sending without fighting IME issues.
- skills.sh installs
- 318
- GitHub stars
- 1
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jasoft/ursoft-skills --skill wechat-send --agent claude-codeInstalls into .claude/skills of the current project.
Files
WeChat Send
概览
这个 skill 用来在 macOS 桌面版微信里发送消息,优先走稳定的 UI 自动化顺序:
- 激活 WeChat 并确认它是前台应用
- 用快捷键打开搜索或切换会话
- 联系人名和消息正文都通过剪贴板粘贴,避免输入法拦截
何时使用
- 用户明确要求在 macOS 微信客户端给联系人发消息
- 直接键入中文容易被输入法干扰,必须改用剪贴板粘贴
不要在这些场景优先使用这个 skill:
- 用户只是要发网页微信消息
- 目标环境不是 macOS 桌面
前置依赖
- macOS 已安装并登录 WeChat
- 运行环境已授予 Accessibility 权限
标准工作流
1. 先做依赖体检
python3 scripts/wechat_auto.py doctor
这个检查会确认:
WeChat是否可启动osascript、pbcopy、pbpaste是否可用
任一必需项缺失时,命令会输出错误并以非 0 退出。
2. 直接发送消息
从 skill 根目录执行:
scripts/send_message "文件传输助手" "测试消息"
需要调试信息时:
python3 scripts/wechat_auto.py send "文件传输助手" "测试消息" --debug --delay 0.8
快速命令
- 体检:
python3 scripts/wechat_auto.py doctor
- 发送消息:
scripts/send_message "张三" "你好,这是自动消息"
常见风险
- 没有 Accessibility 权限时,快捷键会失败
- 微信未在前台时,粘贴内容会发到错误应用
- 联系人重名时,单靠回车选中可能进入错误会话
参考文件
scripts/wechat_auto.pyscripts/send_message
Sponsors
Details
- Repository
- github.com/jasoft/ursoft-skills
- First seen
- Jun 3, 2026