搜索

PythonReactSEOPDF
OpenClaw

wechat

Read WeChat local data from SQLite databases. Supports listing contacts, chat sessions, searching messages, and viewing favorites. Use when the user needs to access their own WeChat data stored locally. Requires access to WeChat data directory. Read-only operations only.

alphafactor0 来源安装数☆ 0 仓库 Stars

安装与使用

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

SkillHub CLI

skillhub install alphafactor/wechat

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

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

查看来源 ↗使用指南

技能说明

微信本地数据读取工具

安全读取微信本地 SQLite 数据库,获取联系人、聊天记录、收藏等信息。

⚠️ 重要声明:本工具仅读取本地数据,不会修改任何文件。仅供用户查看自己的微信数据使用。

支持平台

  • ✅ macOS (通过 ~/Library/Containers/com.tencent.xinWeChat/)
  • ⚠️ Windows (通过自定义路径)
  • ❌ iOS/Android (无法直接访问本地数据库)

前提条件

1. 确保微信在电脑上登录过

本工具读取的是电脑版微信的本地数据库文件。

2. 权限检查
# 检查是否有权限访问微信数据目录
ls -la ~/Library/Containers/com.tencent.xinWeChat/

如果权限不足,可能需要:

# 授予终端完全磁盘访问权限
# 系统设置 → 隐私与安全 → 完全磁盘访问权限 → 添加终端

使用方法

列出找到的数据库
python3 scripts/wechat.py list
查看联系人列表
python3 scripts/wechat.py contacts

输出示例:

👥 联系人列表 (50 个):

序号   昵称/备注              微信号
--------------------------------------------------
1      张三                   zhangsan123
2      李四(同事)             lisi_work
3      家人群                 chatroom_xxx
查看最近会话
python3 scripts/wechat.py sessions --limit 20

输出示例:

💬 最近会话 (20 个):

📌    家人群                  2024-01-15 20:30:15
      💬 [图片]

🔴 5  张三                    2024-01-15 19:45:22
      💬 明天见!
搜索消息内容
python3 scripts/wechat.py search "关键词" --limit 50
查看收藏内容
python3 scripts/wechat.py favorites --limit 20
查看统计数据
python3 scripts/wechat.py stats

输出示例:

📊 微信数据统计:

📁 contact: /Users/xxx/Library/.../Contact.sqlite
📁 session: /Users/xxx/Library/.../Session.sqlite
📁 chat: /Users/xxx/Library/.../Chat.sqlite

----------------------------------------
👥 联系人数量: 1234
💬 会话数量: 156
📨 消息数量: 45678
⭐ 收藏数量: 89

命令参考

命令 功能 示例
list 列出数据库文件 wechat.py list
contacts 联系人列表 wechat.py contacts --limit 50...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/alphafactor/wechat
Version
—
Commit
1e7bdf9ca3448f5e1e28a885bb831380c7b2ec5d
分类来源
rules
状态
active
可见性
public

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

来源内容

SKILL.md
# 微信本地数据读取工具

安全读取微信本地 SQLite 数据库,获取联系人、聊天记录、收藏等信息。

⚠️ **重要声明**:本工具**仅读取**本地数据,不会修改任何文件。仅供用户查看自己的微信数据使用。

## 支持平台

- ✅ macOS (通过 ~/Library/Containers/com.tencent.xinWeChat/)
- ⚠️ Windows (通过自定义路径)
- ❌ iOS/Android (无法直接访问本地数据库)

## 前提条件

### 1. 确保微信在电脑上登录过

本工具读取的是电脑版微信的本地数据库文件。

### 2. 权限检查

```bash
# 检查是否有权限访问微信数据目录
ls -la ~/Library/Containers/com.tencent.xinWeChat/
```

如果权限不足,可能需要:
```bash
# 授予终端完全磁盘访问权限
# 系统设置 → 隐私与安全 → 完全磁盘访问权限 → 添加终端
```

## 使用方法

### 列出找到的数据库

```bash
python3 scripts/wechat.py list
```

### 查看联系人列表

```bash
python3 scripts/wechat.py contacts
```

输出示例:
```
👥 联系人列表 (50 个):

序号   昵称/备注              微信号
--------------------------------------------------
1      张三                   zhangsan123
2      李四(同事)             lisi_work
3      家人群                 chatroom_xxx
```

### 查看最近会话

```bash
python3 scripts/wechat.py sessions --limit 20
```

输出示例:
```
💬 最近会话 (20 个):

📌    家人群                  2024-01-15 20:30:15
      💬 [图片]

🔴 5  张三                    2024-01-15 19:45:22
      💬 明天见!
```

### 搜索消息内容

```bash
python3 scripts/wechat.py search "关键词" --limit 50
```

### 查看收藏内容

```bash
python3 scripts/wechat.py favorites --limit 20
```

### 查看统计数据

```bash
python3 scripts/wechat.py stats
```

输出示例:
```
📊 微信数据统计:

📁 contact: /Users/xxx/Library/.../Contact.sqlite
📁 session: /Users/xxx/Library/.../Session.sqlite
📁 chat: /Users/xxx/Library/.../Chat.sqlite

----------------------------------------
👥 联系人数量: 1234
💬 会话数量: 156
📨 消息数量: 45678
⭐ 收藏数量: 89
```

## 命令参考

| 命令 | 功能 | 示例 |
|------|------|------|
| `list` | 列出数据库文件 | `wechat.py list` |
| `contacts` | 联系人列表 | `wechat.py contacts --limit 50`...

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.