Loading...
Loading...
This skill is used to automatically send WeChat messages via scripts on macOS/Windows. Use this skill when you need to "send WeChat messages", "send messages to WeChat friends", "send WeChat messages automatically", "send messages in WeChat groups", or mention "wechat message", "WeChat automation". macOS uses AppleScript + cliclick, while Windows uses PowerShell. Select the corresponding script according to the platform.
npx skill4agent add tiancheng91/skills wechat-messageosascript scripts/wechat_automation_script.applescript "<Contact Name>" "<Message Content>"powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "<Contact Name>" "<Message Content>"| Parameter | Required | Description |
|---|---|---|
| Contact Name | Yes | WeChat contact name or group name, must be an exact match |
| Message Content | Yes | The message text to be sent |
osascript scripts/wechat_automation_script.applescript "Zhang San" "Hello, are you free today?"
osascript scripts/wechat_automation_script.applescript "Work Group" "Hello everyone!"powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "Zhang San" "Hello, are you free today?"
powershell -ExecutionPolicy Bypass -File scripts/wechat_automation_script.ps1 "Work Group" "Hello everyone!"Cmd+FCtrl+FCmd+H-ExecutionPolicy Bypass^f.ps1brew install cliclick-ExecutionPolicy Bypass| Problem | Possible Cause | Solution |
|---|---|---|
| Message not sent | Focus not on input box | Do not switch windows during execution, try again |
| Contact not found | Name does not match | Confirm that the contact/group name is exactly the same as in WeChat |
| macOS script unresponsive | Accessibility permissions not granted | Check Terminal and other applications in "Accessibility" |
| macOS mouse click ineffective | cliclick not installed or insufficient permissions | |
| Windows cannot execute script | Execution policy restriction | Use |
| Garbled Chinese characters when sending | Encoding issue | Use UTF-8 encoding in the terminal |
wechat-message/
├── SKILL.md # This skill description
├── README.md # Usage instructions
├── examples/
│ └── sample.md # Usage examples
└── scripts/
├── wechat_automation_script.applescript # macOS script
└── wechat_automation_script.ps1 # Windows script