Display name or keyword for the contact/group search box
--file
required
Path to a markdown file (.md, .markdown, .txt) containing the message to send
--window-title
微信
Window title to match (case-sensitive partial match)
--search-delay
1.0
Seconds to wait after typing contact before pressing Enter
--typing-delay
0.8
Seconds to wait after pasting message before sending
--pause
0.8
General pause between actions in seconds
--screenshot-dir
None
Optional folder to store a screenshot after sending
--force-launch
False
Force attempt to launch WeChat if not running
--max-retries
3
Maximum retry attempts to find/activate WeChat window
--retry-delay
3.0
Seconds to wait between retry attempts
--confirm
False
Wait for manual contact selection after search
--confirm-delay
2.0
Seconds to wait when --confirm is used
--check-only
False
Only check if WeChat is running, do not send
--use-center
False
Use window center position for input box
Important: This script ONLY supports sending markdown files. Use --file to specify the path to your message file. Plain text messages are no longer supported directly.
Auto-launch paths
The script attempts to launch WeChat from these locations in order:
%ProgramFiles%\Tencent\WeChat\WeChat.exe
%ProgramFiles(x86)%\Tencent\WeChat\WeChat.exe
%LocalAppData%\Programs\WeChat\WeChat.exe
C:\Program Files\Tencent\WeChat\WeChat.exe
C:\Program Files (x86)\Tencent\WeChat\WeChat.exe
D:\Program Files\Tencent\WeChat\WeChat.exe
Safety notes
Add an approval gate before sending to prevent accidental messages.
Keep message length moderate; pyperclip pastes full content but huge payloads may fail.
UI automation is fragile—theme or layout changes may require timing tweaks.
For reliability, keep WeChat logged in and unlocked.
Auto-launch requires WeChat to be installed in a standard location.
Troubleshooting
Symptom
Fix
Could not find a window matching title
Use --force-launch to auto-start, or manually open WeChat.
WeChat in tray
Script attempts recovery; try --max-retries 5 for more attempts.
Script hangs after Ctrl+F
Increase --search-delay or close pop-up dialogs.
Message not sent
Ensure chat input is focused; verify there are no rich-text restrictions.
Screenshot path missing
Provide --screenshot-dir and ensure the path is writable.
Auto-launch failed
Check WeChat is installed in one of the standard paths.
Exit codes
Code
Meaning
0
Success (or --check-only with WeChat running)
1
Failure (or --check-only with WeChat not running)
File list
SKILL.md — this manifest & instructions
scripts/send_wechat.py — automation script
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: aidotnet-opencowork-wechat-ui-sender3description: WeChat UI Sender4---56# WeChat UI Sender78Automate the Windows WeChat client to push messages from an AI Agent to a specific contact or group using UI-level simulation.910## When to use this skill1112- Need to notify a person or group in personal WeChat (non-enterprise) from an AI workflow.13- No access to official WeChat/WeCom APIs, so UI automation is acceptable.14- Want basic auditing via optional screenshots after each send.15- WeChat may be closed, minimized to tray, or not running — script can auto-launch.1617Avoid this skill if an official API (WeCom bot/app) is available—API integrations are more stable and secure.1819## Requirements20211. Windows desktop with the WeChat PC client installed and logged in.222. Python 3.9+ environment with:23 ```bash24 pip install pyautogui pyperclip pygetwindow pillow psutil25 ```263. Resolution scaling should be 100% for best accuracy.274. Skill runner must allow clipboard access (pyperclip) and simulated keyboard shortcuts.2829## New features3031- **Auto-launch**: Use `--force-launch` to automatically start WeChat if not running.32- **Tray recovery**: Script detects minimized/tray state and attempts restoration.33- **Retry logic**: Configurable retry attempts with `--max-retries` and `--retry-delay`.34- **Status check**: Use `--check-only` to verify WeChat status without sending.3536## Scripts overview3738| Script | Purpose | Dependencies |39| ------------------------ | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |40| `scripts/send_wechat.py` | Activate WeChat, locate contact via Ctrl+F, paste message, press Enter, optional screenshot | `pyautogui`, `pyperclip`, `pygetwindow`, `pillow`, `psutil` |4142## Usage steps43441. **Install dependencies (first time only)**4546 ```bash47 pip install pyautogui pyperclip pygetwindow pillow psutil48 ```49502. **Basic usage** - Write message to a markdown file first, then send5152 ```bash53 # Create a message file first54 echo "Your message here" > message.md5556 # Send using the markdown file57 python scripts/send_wechat.py "CONTACT_OR_GROUP_NAME" --file message.md58 ```59603. **Auto-launch if closed**6162 ```bash63 python scripts/send_wechat.py "Group Name" --file message.md --force-launch64 ```65664. **Check WeChat status**6768 ```bash69 python scripts/send_wechat.py "dummy" --file message.md --check-only70 ```71725. **Full options**73 ```bash74 python scripts/send_wechat.py "CONTACT_OR_GROUP_NAME" \75 --file "C:\\path\\to\\message.md" \76 --window-title "微信" \77 --search-delay 0.6 \78 --typing-delay 0.2 \79 --screenshot-dir C:\\temp\\wechat-captures \80 --force-launch \81 --max-retries 5 \82 --retry-delay 3.0 \83 --confirm84 ```8586## Command options8788| Option | Default | Description |89| ------------------ | ------------ | ----------------------------------------------------------------------------- |90| `contact` | required | Display name or keyword for the contact/group search box |91| `--file` | **required** | Path to a markdown file (.md, .markdown, .txt) containing the message to send |92| `--window-title` | `微信` | Window title to match (case-sensitive partial match) |93| `--search-delay` | 1.0 | Seconds to wait after typing contact before pressing Enter |94| `--typing-delay` | 0.8 | Seconds to wait after pasting message before sending |95| `--pause` | 0.8 | General pause between actions in seconds |96| `--screenshot-dir` | None | Optional folder to store a screenshot after sending |97| `--force-launch` | False | Force attempt to launch WeChat if not running |98| `--max-retries` | 3 | Maximum retry attempts to find/activate WeChat window |99| `--retry-delay` | 3.0 | Seconds to wait between retry attempts |100| `--confirm` | False | Wait for manual contact selection after search |101| `--confirm-delay` | 2.0 | Seconds to wait when `--confirm` is used |102| `--check-only` | False | Only check if WeChat is running, do not send |103| `--use-center` | False | Use window center position for input box |104105> **Important**: This script ONLY supports sending markdown files. Use `--file` to specify the path to your message file. Plain text messages are no longer supported directly.106107## Auto-launch paths108109The script attempts to launch WeChat from these locations in order:1101111. `%ProgramFiles%\Tencent\WeChat\WeChat.exe`1122. `%ProgramFiles(x86)%\Tencent\WeChat\WeChat.exe`1133. `%LocalAppData%\Programs\WeChat\WeChat.exe`1144. `C:\Program Files\Tencent\WeChat\WeChat.exe`1155. `C:\Program Files (x86)\Tencent\WeChat\WeChat.exe`1166. `D:\Program Files\Tencent\WeChat\WeChat.exe`117118## Safety notes119120- Add an approval gate before sending to prevent accidental messages.121- Keep message length moderate; pyperclip pastes full content but huge payloads may fail.122- UI automation is fragile—theme or layout changes may require timing tweaks.123- For reliability, keep WeChat logged in and unlocked.124- Auto-launch requires WeChat to be installed in a standard location.125126## Troubleshooting127128| Symptom | Fix |129| ---------------------------------------- | ------------------------------------------------------------------------- |130| `Could not find a window matching title` | Use `--force-launch` to auto-start, or manually open WeChat. |131| WeChat in tray | Script attempts recovery; try `--max-retries 5` for more attempts. |132| Script hangs after Ctrl+F | Increase `--search-delay` or close pop-up dialogs. |133| Message not sent | Ensure chat input is focused; verify there are no rich-text restrictions. |134| Screenshot path missing | Provide `--screenshot-dir` and ensure the path is writable. |135| Auto-launch failed | Check WeChat is installed in one of the standard paths. |136137## Exit codes138139| Code | Meaning |140| ---- | --------------------------------------------------- |141| 0 | Success (or `--check-only` with WeChat running) |142| 1 | Failure (or `--check-only` with WeChat not running) |143144## File list145146- `SKILL.md` — this manifest & instructions147- `scripts/send_wechat.py` — automation script148149---150> Converted and distributed by [TomeVault](https://tomevault.io/claim/aidotnet) — claim your Tome and manage your conversions.151<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/aidotnet-opencowork-wechat-ui-sender in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
WeChat UI Sender It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.