搜索

PythonReactSEOPDF
OpenClaw

wxauto

微信自动化操作。通过 wxautox4 RESTful API 实现发送消息、获取聊天记录、监听消息、好友管理等功能。Use when: (1) 发送微信消息给好友或群聊,(2) 读取微信聊天记录,(3) 监听新消息,(4) 获取好友列表或群聊列表,(5) 接受好友申请,(6) 切换聊天窗口等微信操作。

cluic0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cluic/wxauto

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

微信自动化

通过本地 HTTP 服务操作微信,支持消息收发、监听、好友管理等功能。

前置要求

  1. 安装 wxautox4:

    pip install wxautox4
    

    注意:需windows系统,python3.9,3.10,3.11,3.12 64位,其他python版本暂不支持

  2. 激活 wxautox4:

    wxautox4 -a your-activation-code
    

    获取:https://docs.wxauto.org/plus

  3. 部署 API 服务:

    • 克隆项目:https://github.com/cluic/wxauto-restful-api
    • 配置 config.yaml
    • 启动服务:python run.py

服务配置

  • 认证:Bearer Token(见 config.yaml 的 auth.token,默认值为 token)
  • 服务状态文件:~/.wxautox/service_status.json(服务启动时自动生成,请查看该文件获取服务信息)
自动配置检测

服务启动后会自动将运行信息写入 ~/.wxautox/service_status.json。wxapi.py 脚本会:

  1. 自动读取此文件获取连接配置
  2. 验证服务是否真的在运行(通过 API 健康检查)
  3. 如果服务未运行,自动启动服务(需要服务目录存在)

服务目录搜索顺序:

  • ../wxauto-restful-api(相对于 skill 目录)
  • ~/wxauto-restful-api
  • WXAPI_SERVICE_DIR 环境变量指定的路径
手动配置方式(可选)

如果需要覆盖自动配置,优先级从高到低:

  1. 命令行参数

    python wxapi.py --base-url "http://localhost:9000" --token "my-token" send "好友" "消息"
    
  2. 环境变量

    $env:WXAPI_BASE_URL = "http://localhost:9000"
    $env:WXAPI_TOKEN = "my-token"
    # 或者
    $env:WXAPI_PORT = "9000"
    $env:WXAPI_SERVICE_DIR = "/path/to/wxauto-restful-api"
    
  3. service_status.json - 自动检测(推荐)

  4. config.yaml - 服务目录下的配置文件

  5. 默认值 - http://localhost:8000, token 为 token

启动服务

首次使用前需要启动服务:

# 进入服务目录
cd /path/to/wxauto-restful-api

启动服务

python run.py

或后台启动(Windows):

Start-Process python -ArgumentList "run.py" -WorkingDirectory "C:\path\to\wxauto-restful-api" -WindowStyle Hidden

如果服务已运行,脚本会自动连接;如果服务未运行且配置了服务目录,脚本会自...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cluic/wxauto
Version
—
Commit
a2194db920c32f87666b4f62bb8001b049d179ba
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# 微信自动化

通过本地 HTTP 服务操作微信,支持消息收发、监听、好友管理等功能。

## 前置要求

1. **安装 wxautox4**:
   
   ```bash
   pip install wxautox4
   ```
   
   > 注意:需windows系统,python3.9,3.10,3.11,3.12 64位,其他python版本暂不支持
   
2. **激活 wxautox4**:

   ```bash
   wxautox4 -a your-activation-code
   ```

   > 获取:https://docs.wxauto.org/plus

3. **部署 API 服务**:

   - 克隆项目:https://github.com/cluic/wxauto-restful-api
   - 配置 `config.yaml`
   - 启动服务:`python run.py`

## 服务配置

- 认证:Bearer Token(见 `config.yaml` 的 `auth.token`,默认值为 `token`)
- 服务状态文件:`~/.wxautox/service_status.json`(服务启动时自动生成,请查看该文件获取服务信息)

### 自动配置检测

服务启动后会自动将运行信息写入 `~/.wxautox/service_status.json`。wxapi.py 脚本会:
1. 自动读取此文件获取连接配置
2. 验证服务是否真的在运行(通过 API 健康检查)
3. 如果服务未运行,自动启动服务(需要服务目录存在)

服务目录搜索顺序:
- `../wxauto-restful-api`(相对于 skill 目录)
- `~/wxauto-restful-api`
- `WXAPI_SERVICE_DIR` 环境变量指定的路径

### 手动配置方式(可选)

如果需要覆盖自动配置,优先级从高到低:

1. **命令行参数**
   ```powershell
   python wxapi.py --base-url "http://localhost:9000" --token "my-token" send "好友" "消息"
   ```

2. **环境变量**
   
   ```powershell
   $env:WXAPI_BASE_URL = "http://localhost:9000"
   $env:WXAPI_TOKEN = "my-token"
   # 或者
   $env:WXAPI_PORT = "9000"
   $env:WXAPI_SERVICE_DIR = "/path/to/wxauto-restful-api"
   ```

3. **service_status.json** - 自动检测(推荐)

4. **config.yaml** - 服务目录下的配置文件

5. **默认值** - `http://localhost:8000`, token 为 `token`

## 启动服务

首次使用前需要启动服务:

```powershell
# 进入服务目录
cd /path/to/wxauto-restful-api
```

# 启动服务
```
python run.py
```

或后台启动(Windows):

```powershell
Start-Process python -ArgumentList "run.py" -WorkingDirectory "C:\path\to\wxauto-restful-api" -WindowStyle Hidden
```

如果服务已运行,脚本会自动连接;如果服务未运行且配置了服务目录,脚本会自...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.