WeReply: Skill for Claude Code

.claude/skills/wechat-automation/SKILL.md

wechat-automation is a skill for Claude Code from cacr92/WeReply. It costs 111 tokens per session (4,194 once invoked), scanned A, original, MIT.

A skill for building WeChat automation agents, where WeChat is a messaging application. It covers monitoring conversations, extracting messages, and controlling the message input box on Windows with wxauto or macOS with Accessibility API.

In plain words
What is it for?
Use it to listen for new WeChat messages, extract their content, send JSON through standard input and output, and write suggested text into the chat input.
Why use it?
It provides a platform-specific way to connect the WeChat window to an agent and exchange structured messages with a Rust orchestrator. This avoids treating Windows and macOS automation as if they used the same interface.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is cacr92/WeReply's own configuration. It tells Claude Code how to work on WeReply itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything WeReply configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cacr92/WeReply. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cacr92/WeReply/main/.claude/skills/wechat-automation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cacr92/WeReply

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wechat-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/cacr92/wereply/wechat-automation/github.svg)](https://agentmods.dev/skills/cacr92/wereply/wechat-automation)
Your own site
<a href="https://agentmods.dev/skills/cacr92/wereply/wechat-automation"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/wechat-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wechat-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/cacr92/wereply/wechat-automation"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/wechat-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket fail 18 Mar 2026
  • Snyk warn 16 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00111 $0.04194
Opus 5 $0.00056 $0.02097
Sonnet 5 $0.00022 $0.00839
Haiku 4.5 $0.00011 $0.00419

Measured 11d ago against content hash dc38cc513b39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

wechat-automation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/wechat-automation/SKILL.md · 641 lines

How it starts

The opening of the file, as written. The whole thing — 641 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

# 安装依赖
pip install wxauto==4.0.0

# 确保微信已登录且窗口可见

Message Monitoring Pattern

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]

                    # 检查是否是新消息(避免重复处理)
                    message_id = self._generate_message_id(latest_message)
                    if message_id != self.last_message_id:
                        self.last_message_id = message_id
                        self._send_message_to_orchestrator(latest_message)

                # 间隔等待
                time.sleep(self.interval_ms / 1000.0)

        except KeyboardInterrupt:
            self._send_error("监听被用户中断")
        except Exception as e:
            self._send_error(f"监听错误: {str(e)}")

    def _generate_message_id(self, message) -> str:
        """生成消息唯一ID(用于去重)"""
        # 结合时间戳、发送者、内容生成ID
        content = message.get('content', '')
        sender = message.get('sender', '')
        timestamp = message.get('time', '')
        return f"{sender}:{timestamp}:{hash(content)}"

    def _send_message_to_orchestrator(self, message):
        """
        发送消息到 Rust Orchestrator

        格式:
        {
            "type": "MessageNew",
            "content": "消息内容",
            "sender": "发送者",
            "timestamp": "2024-01-23T10:30:00"
        }
        """
        payload = {
            "type": "MessageNew",
            "content": message.get('content', ''),
            "sender": message.get('sender', ''),
            "timestamp": message.get('time', '')
        }

        # 输出到 stdout(Rust 会读取)
        print(json.dumps(payload, ensure_ascii=False), flush=True)

    def _send_error(self, error_message: str):
        """发送错误信息到 Orchestrator"""
        payload = {
            "type": "Error",
            "message": error_message
        }
        print(json.dumps(payload, ensure_ascii=False), flush=True)

# 使用示例
if __name__ == '__main__':
    monitor = WeChatMonitor(interval_ms=500)
    monitor.start_monitoring()

Read the full file on GitHub · 641 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 641 lines · 111 tokens per session scan A dc38cc513b39

Subscribe to this mod's changes

wechat-automation is a skill published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It adds 111 tokens to every session and 4,194 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens