WeChat Automation API skill
wechat-automation-api
A skill for agents on Windows that sends text, images and files through an already running desktop WeChat, with an HTTP API and a queue as well
- 193 ★ on the repository
- Last commit
Broad access
Why this level
- The skill sends real messages and files from your WeChat account to any contact or group, and a sent message cannot be recalled
- A typo in a contact name can send personal data or a file to the wrong recipient
- Bulk automated sending from a personal account may break service rules and lead to restrictions
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/wechat-automation-apiDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The skill sends real messages and files from your WeChat account to any contact or group, and a sent message cannot be recalled
- A typo in a contact name can send personal data or a file to the wrong recipient
- Bulk automated sending from a personal account may break service rules and lead to restrictions
This is third-party code. Review the repository files before installing.
What it does
The skill lets an agent send WeChat messages on Windows: text, an image by link or a file from disk. It drives the window of an already running, signed-in client through UI Automation (`uiautomation`), without hooks or the WeChat protocol. The agent runs `python scripts/skill_cli.py --to "Contact" --content "Text"`, adding `--action sendpic` or `--action sendfile` for an image or a file. The script finds the chat in the list or through search, pastes the content from the clipboard, presses Enter and exits. With `--json` the answer arrives as `success`, `code`, `message`, `to` and `action` fields. A second entry point serves long-term integration: a Flask service on `127.0.0.1:8808` with a token, a message queue and a configurable gap between sends (`message_interval`). If the service is running, the skill switches to the queue on its own so requests do not collide over the WeChat window. The `--no-api` flag brings back the synchronous mode with the real result. Typical tasks: send a work chat the outcome of a search or a test run, forward a generated report, or tell a contact that a job is finished. WeChat 4.0 and newer is supported.
Who it is for. Windows users with desktop WeChat who want agents to deliver results into a chat so they do not have to check the terminal.
Good fit when
- An agent finished a long search or build and the result should go to File Transfer or a work group in WeChat
- A generated xlsx or PDF report should reach a contact without dragging the file by hand
- An external system needs a local HTTP entry that queues messages with a pause between sends
- You test the automation on File Transfer before sending to real contacts
Not a fit when
- WeChat runs on macOS, Linux or in a browser: the skill uses Windows UI Automation and the desktop client
- You need to receive and read incoming messages: the skill only sends, and the catalog has claude-code-wechat-channel for receiving
- You need a headless server or a locked screen: Windows UI Automation is usually unavailable when the screen is locked
Example request
Find fresh AI news, write a short summary and send it in WeChat to the contact 文件传输助手Limitations
- Windows 10 or 11, Python 3.7 or newer and a running, signed-in desktop WeChat are required. On stripped-down Windows builds, turn on Narrator first or window elements are not recognized.
- The contact or group name in `--to` must match the WeChat name exactly, otherwise `CONTACT_NOT_FOUND` or sending to the wrong chat may occur.
- The agent splits long text into parts of about 2,000 characters; on failure the skill does not resend, by the author's rules.
- The repository has no license. A new WeChat version may break element lookup and need edits in `wechat_controller.py`.
How to disable. Delete the skill folder from the agent's skills directory. If you ran the HTTP API, stop `scripts/app.py` or the `run.bat` window and delete `config.json` with the token.
FAQ
How do I install the skill?
Ask the agent to install the skill from https://github.com/LAVARONG/wechat-automation-api and send a test to the contact 文件传输助手. By hand, `pip install -r requirements.txt` in the project folder is enough if desktop WeChat is already running.
Do I need to run the HTTP API for ordinary sending?
No. For one-off messages the skill runs a command and exits, while the HTTP service is for permanent integration and a queue. If the service is already running, the skill sends through it by default.
How do I send a file or image from disk?
Pass the file path in `--content` and set `--action sendfile`. For an image by link use `--action sendpic`, and a local path is pasted by `sendpic` without downloading. An absolute path like `C:\tmp\report.xlsx` works best.
What if the skill stops working after I close a remote desktop?
Windows blocks UI Automation in a locked session. For RDP the project ships `disconnect_rdp.bat`, which switches the session to the console with `tscon` so the WeChat window stays reachable.
What does the skill return after sending?
A 发送成功 or 发送失败 line with an error code such as `CONTACT_NOT_FOUND`. For scripting add `--json`: the answer carries `success`, `code`, `message`, `to` and `action` fields.
Discussion
No questions or reviews yet.
Related
SkillsA CLI that passes your WeChat messages to an agent through the official ClawBot (iLink) and sends replies back
The Vercel chat-sdk skill: the agent writes Slack, Teams, Discord and Telegram bots from one codebase and picks the adapters.
Claude Code interviews you about your business, then writes, tests and deploys a WhatsApp bot with per-customer memory
WeCom channel for OpenClaw: the agent replies in corporate WeChat, and personal WeChat connects through the same app
MCP server and wincli CLI: agents drive Windows apps by control name through UI Automation instead of screen coordinates
AI Agent Skills by sanjay3290
AI Agent Skills
Cross-platform agent skills: read-only PostgreSQL, MySQL and MSSQL queries, Google Workspace, Jira, Telegram, text-to-speech and research
README in short
The Chinese README opens with two entry points, the skill and the HTTP API, and recommends the skill as the main one. Example prompts for the agent, CLI commands for text, image and file, service setup, notes on the desktop session and the project layout follow.
README badge
Original SKILL.md
--- name: "wechat-automation" description: "微信发信能力:通过 Windows 桌面微信发送文本、图片URL或本地文件。适合各类 Agent 在本机直接发送一次性消息。触发词:给[某人]发微信、通知[某人]、把这个用微信发给[某人]、用微信发个图片、把本地文件发给[某人]" --- # 微信自动发信 Skill 赋予智能体掌控 Windows 桌面微信直接向真实用户或群组发送文本、图片URL或本地文件的能力。本 Skill 默认以同步命令行方式运行,执行一次命令发送一次消息,命令结束后立即退出。 只发送微信消息时,不需要专门启动后台 HTTP API,不需要运行 `run.bat`,也不需要调用 `scripts/app.py`。但**如果后台 HTTP API 恰好已在运行**,本 Skill 会**自动改走 API 队列模式**发送,以避免多个请求同时直接操作微信窗体造成冲突,详见下文「执行模式与结果判定」。 ## 应用场景 - **信息推送**:当你作为智能体完成了某项长耗时的搜索、总结或生图任务后,可以将最终结果或报告链接直接通过微信发送给用户指定的联系人。 - **定时催办/打卡通知**:结合智能体的定时任务机制,向目标群组发送通知。 - **跨平台转发**:将抓取到的内容(特别如新闻图片、数据图表链接)作为微信信息直接转发。 - **任务链收尾**:先完成搜索、分析、运行命令、生成报告等任务,再把最终摘要或结果通过微信发送给指定联系人或群。 - **本地文件转发**:把 Agent 生成的报告、截图、表格、压缩包、本地图片等文件直接发给指定联系人或群。 ## 典型触发语句 - “帮我给 **LAVA** 发个微信,就说**我今天晚点到**。” - “把刚才总结的**会议纪要**发到**工作群**里。” - “下载这个图片,用微信发给 **文件传输助手**。” - “帮我通知一下 **张三**,让他**明天带电脑**。” - “查询今天关于 **AI** 的最新新闻,整理成简洁总结,然后通过微信发送到联系人 **文件传输助手**。” - “把这次运行结果总结整理,通过微信发送到 **项目通知群**。” - “把本机上的 **C:\tmp\report.xlsx** 通过微信发送给 **文件传输助手**。” - “把刚生成的截图发到 **项目群**。” ## 作为 Skill 调用的规范指令 本 Skill 调用后会直接返回结果并退出,不会常驻内存。请在项目根目录中使用以下语法调用: ### 发送文本消息 ```powershell python scripts/skill_cli.py --to "联系人或群组名称" --content "你要发送的具体文本" ``` ### 发送图片消息 ```powershell python scripts/skill_cli.py --to "联系人或群组名称" --content "https://example.com/image.png" --action "sendpic" ```