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-code

Installs into .claude/skills of the current project.

Files

WeChat Send

概览

这个 skill 用来在 macOS 桌面版微信里发送消息,优先走稳定的 UI 自动化顺序:

  1. 激活 WeChat 并确认它是前台应用
  2. 用快捷键打开搜索或切换会话
  3. 联系人名和消息正文都通过剪贴板粘贴,避免输入法拦截

何时使用

  • 用户明确要求在 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.py
  • scripts/send_message

Sponsors

Details

Repository
github.com/jasoft/ursoft-skills
First seen
Jun 3, 2026

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs