WeChat Desktop Sender
v0.4.0Windows WeChat desktop automation for opening chats and sending messages. Use when the user wants to open 微信桌面端, search a contact or group, send a message, s...
Like a lobster shell, security has layers — review code before you run it.
wechat-desktop-sender
Use this skill for Windows 微信桌面端发消息 workflows.
What this skill provides
Bundled scripts:
scripts/wechat_send.py— formal single-send command entryscripts/wechat_send_hello.py— core implementation (open WeChat, search chat, send, verify)scripts/wechat_send_batch.py— serial batch sender for multiple contacts/groupsscripts/wechat_send_campaign.py— personalized serial sender (different message per contact)scripts/wechat_send_template_campaign.py— template-variable sender (same template, different row values)
Quick start
Install dependencies:
pip install pywinauto pyperclip psutil pywin32 pillow pytesseract
pytesseractis optional. Install it only if OCR verification is needed.
Single send
python scripts/wechat_send.py --to "文件传输助手" --message "你好"
Useful flags:
python scripts/wechat_send.py --to "李义" --message "我是龙虾Koi,打个招呼。" --verify-title
python scripts/wechat_send.py --to "文件传输助手" --message "OCR测试" --ocr-verify
Serial batch send
python scripts/wechat_send_batch.py --to "张三,李四,文件传输助手" --message "晚上 8 点开会"
Or from file:
python scripts/wechat_send_batch.py --contacts-file contacts.txt --message "晚上 8 点开会"
Personalized send
python scripts/wechat_send_campaign.py --csv contacts_messages.csv --verify-title
python scripts/wechat_send_campaign.py --json contacts_messages.json --verify-title
Template-variable send
python scripts/wechat_send_template_campaign.py --csv template_contacts.csv --template "{name}你好,我是Koi,关于{company}这边和你打个招呼。" --verify-title
Recommended workflow
- Ensure WeChat desktop is logged in
- Test on
文件传输助手first - Use single-send for one contact/group
- Use batch-send for serial outreach
- Check
wechat_automation_logs/for logs and summaries
Verification model
Current verification layers:
- UI element location succeeded
- Message was sent through the input box
- Window text verification checks whether the message text appears in current WeChat window
- Optional OCR verification if
--ocr-verifyis enabled and OCR deps are installed
Treat this as practical desktop automation, not a cryptographic delivery guarantee.
Boundaries
Do not claim support for these unless separately extended:
- Moments / 朋友圈 scraping
- Reliable historical message forwarding
- Multi-window true parallel sending
- Full desktop social graph extraction
Files and outputs
By default, scripts create logs under:
wechat_automation_logs/
Outputs may include:
- run logs
- failure screenshots
- control-tree dumps
- batch summary JSON files
OpenClaw workflow usage
Once this skill is installed, the user can express intent conversationally and the agent should route to the correct script:
- “给张三发一句话:今晚 8 点开会” → use single-send
- “给这 20 个人发同一条消息” → use batch-send
- “按这份名单分别发不同文案” → use personalized-send
- “按这份名单套一个模板变量群发” → use template-variable send
Preferred operational pattern:
- Normalize the recipient list and message payload
- If one recipient and one message →
scripts/wechat_send.py - If many recipients and same message →
scripts/wechat_send_batch.py - If many recipients and different messages →
scripts/wechat_send_campaign.py - If many recipients share one template with per-row fields →
scripts/wechat_send_template_campaign.py - Report success count, verification count, retry recommendations, and log/summary paths back to the user
When to read more
For detailed CLI usage and arguments, read:
references/single-send.mdreferences/batch-send.mdreferences/personalized-send.mdreferences/template-send.md
Comments
Loading comments...
