wx4-skill

Automate WeChat 4.x messaging, group management, and AI chatbot replies on Windows.

Updated May 19, 2026
One-click install
npx skills add https://github.com/Peng-Rao/wx4py --skill wx4-skill-peng-rao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wx4-skill
Source: https://github.com/Peng-Rao/wx4py/tree/main/wx4-skill
Command: npx skills add https://github.com/Peng-Rao/wx4py --skill wx4-skill-peng-rao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wx4py.

What problem does it solve? Manually sending the same message to multiple WeChat groups, distributing files one by one, updating group announcements, and monitoring group chats for mentions are repetitive and error-prone tasks. This Skill automates those operations through the wx4py Python library, which drives the WeChat 4.x Windows desktop client via UI automation. ## Core Features & Use Cases - Batch Messaging & File Distribution: Send text messages or files to multiple groups or contacts in one script, with optional scheduled delivery using libraries like schedule. - Group Management: Retrieve member lists, set group nicknames, toggle do-not-disturb, pin chats, and update group announcements (including Markdown-formatted announcements). - Chat History Export: Pull chat history for today, yesterday, the past week, or all time, then export to JSON or CSV for analysis. - Multi-Group Listening & AI Auto-Reply: Monitor multiple groups simultaneously, forward messages between groups or contacts via rules, and auto-reply only when @-mentioned using an OpenAI-compatible API or a custom callback. - Use Case: A team lead needs to send a daily 5 PM reminder to three department groups and collect yesterday's discussion from a project group into a CSV. A short wx4py script handles both automatically. ## Quick Start Ask the assistant to use the wx4-skill to batch send a notification message to your specified WeChat groups, after confirming wx4py is installed and WeChat is logged in on Windows.

Frequently Asked Questions about wx4-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch send messages to multiple WeChat groups with Python?

Use wx4py's chat_window.batch_send method with a list of group names and target_type='group'. Connect via WeChatClient, preferably with a context manager, and the message is delivered to each group sequentially through UI automation.

How to build a WeChat group chatbot that replies only when mentioned?

Use wx4py's process_groups with an AsyncCallbackHandler configured with auto_reply=True and reply_on_at=True. The handler checks event.is_at_me, so only messages @-mentioning your group nickname trigger a reply, which can come from an OpenAI-compatible API or custom callback.

Does wx4py work on macOS or Linux?

No, wx4py only supports Windows 10 and 11 because it automates the WeChat 4.x Windows desktop client through UI automation. The WeChat client must be installed, logged in, and kept in the foreground during operation.

Why does wx4py fail to find the WeChat window or controls?

A WeChatNotFoundError means the client is not open or logged in, while ControlNotFoundError indicates a UI element was not located. Keep WeChat running and visible, avoid manually operating the window during automation, and verify the client version is supported.

Can wx4py export WeChat chat history for analysis?

Yes, chat_window.get_chat_history retrieves messages for today, yesterday, the past week, or all time from a contact or group. Results include type, content, and time fields, which you can save as JSON or CSV, though sender names are not available due to UIA limitations.

What are the limitations of WeChat UI automation with wx4py?

Image and voice messages cannot be fully captured, sender names are unavailable in chat history, and the WeChat window must stay in the foreground. Modifying group announcements also requires admin privileges in the target group.