# Wechat Reader

> 查询微信聊天记录、联系人、群聊。基于 chatlog-bot 本地解密数据库。触发场景：'查微信聊天记录'、'微信群总结'、'搜微信消息'、'wechat history'、'查群聊'、'微信联系人'。

- Skill: `xingfanxia/wechat-reader` (Agent Skill)
- Install (CLI): `npx skillmds@latest add xingfanxia/wechat-reader`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xingfanxia/wechat-reader/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: xingfanxia (https://skillmd.com/u/xingfanxia)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/xingfanxia/wechat-reader

---


# WeChat Reader — Local DB Query via chatlog-bot

Query WeChat chat history, contacts, and group chats from locally decrypted databases.

## Prerequisites

chatlog-bot server running at `http://127.0.0.1:5030`.

```bash
# Check health
curl -s http://127.0.0.1:5030/health
```

## API Reference

| Endpoint | Description |
|----------|-------------|
| `GET /api/v1/session` | List recent conversations |
| `GET /api/v1/chatlog?keyword=<name>&limit=50` | Chat history (fuzzy match) |
| `GET /api/v1/contact?keyword=<name>` | Search contacts |
| `GET /api/v1/chatroom?keyword=<name>` | Search group chats |
| `GET /health` | Health check |

## Usage Examples

```bash
# List recent sessions
curl -s "http://127.0.0.1:5030/api/v1/session"

# Get chat history by name or chatroom ID
curl -s "http://127.0.0.1:5030/api/v1/chatlog?keyword=AI生产力训练营&limit=200"

# Search contacts
curl -s "http://127.0.0.1:5030/api/v1/contact?keyword=鸭哥"
```

## Key Re-extraction

If WeChat restarts, run: `./scripts/rekey.sh`

## Limitations

- Read-only (cannot send messages)
- Keys tied to WeChat session — re-extract after restart
- Binary messages (images, stickers) appear as garbled data

