wechat-automation
当用户要求"微信监听"、"消息提取"、"Agent 开发"、"wxauto"、"Accessibility API"、"UI 自动化"、"输入框控制"、"Platform Agent",或者提到"微信自动化"、"消息监控"、"WeChat monitoring"时使用此技能。用于开发 WeReply 的 Platform Agent(Windows wxauto 或 macOS Accessibility API)、实现微信消息监听、消息提取、输入框控制和 Agent 错误处理。
npx skills add majiayu000/claude-skill-registry --skill wechat-automation-cacr92-wereply-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# WeChat Automation Skill Expert guidance for WeChat monitoring and automation using wxauto (Windows) and Accessibility API (macOS). ## Overview WeReply uses Platform-specific Agents to monitor WeChat conversations and control the input box: - **Windows Agent**: Python 3.12 + wxauto v4 - **macOS Agent**: Swift + Accessibility API - **Communication**: JSON protocol via stdin/stdout with Rust Orchestrator ## Architecture Pattern ``` 微信窗口 ↓ (UI Automation) Platform Agent ├→ 监听消息(定时轮询) ├→ 提取消息内容 ├→ 发送到 Orchestrator (JSON via stdout) └→ 接收命令 (JSON via stdin) ↓ 控制输入框(写入建议) ``` ## Windows Agent - wxauto v4 ### Installation and Setup ```bash # 安装依赖 pip install wxauto==4.0.0 # 确保微信已登录且窗口可见 ``` ### Message Monitoring Pattern ```python import json import time import sys from wxauto import WeChat class WeChatMonitor: def __init__(self, interval_ms: int = 500): """ 初始化微信监听器 Args: interval_ms: 监听间隔(毫秒),默认 500ms """ self.wechat = WeChat() self.interval_ms = interval_ms self.last_message_id = None def start_monitoring(self): """开始监听微信消息""" try: while True: # 获取当前聊天窗口的最新消息 messages = self.wechat.GetAllMessage() if messages and len(messages) > 0: latest_message = messages[-1] # 检查是否是新消息(避免重复处理) mess
- Overview
- Architecture Pattern
- Windows Agent - wxauto v4
- Installation and Setup
- Message Monitoring Pattern
- Input Box Control Pattern
- Command Handling Pattern
- macOS Agent - Accessibility API
- Swift Implementation Pattern
- Input Writer (Swift)
- Message Deduplication Strategy
- Time-based Deduplication
- Performance Optimization
- Polling Interval Tuning
pip install wxauto==4.0.0
What does the wechat-automation skill do?
当用户要求"微信监听"、"消息提取"、"Agent 开发"、"wxauto"、"Accessibility API"、"UI 自动化"、"输入框控制"、"Platform Agent",或者提到"微信自动化"、"消息监控"、"WeChat monitoring"时使用此技能。用于开发 WeReply 的 Platform Agent(Windows wxauto 或 macOS Accessibility API)、实现微信消息监听、消息提取、输入框控制和 Agent 错误处理。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill wechat-automation-cacr92-wereply-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
