wechat-daily

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

微信日报 Skill

WeChat Daily Skill

总览

Overview

本 Skill 从微信 Mac 4.x 的本地加密数据库中提取聊天记录,生成每日 AI 精华摘要日报。
适用条件:
  • macOS 系统
  • 微信 Mac 4.x 已安装
  • Python 3.9+

This Skill extracts chat records from the encrypted local database of WeChat Mac 4.x and generates daily AI-powered essence summary reports.
Applicable Conditions:
  • macOS system
  • WeChat Mac 4.x installed
  • Python 3.9+

执行流程

Execution Flow

Phase 1: 环境检测(每次执行)

Phase 1: Environment Check (Each Execution)

检查
~/.config/wechat-daily.json
是否存在且包含
wxid
db_base_path
  • 不存在或不完整 → 进入 Phase 2(首次配置)
  • 存在且完整 → 进入 Phase 3(生成日报)
Check if
~/.config/wechat-daily.json
exists and contains
wxid
or
db_base_path
:
  • Does not exist or is incomplete → Enter Phase 2 (First-time Configuration)
  • Exists and is complete → Enter Phase 3 (Generate Daily Report)

Phase 2: 首次配置(新用户引导)

Phase 2: First-time Configuration (New User Guide)

Step 2a: 安装 Python 依赖

Step 2a: Install Python Dependencies

bash
pip3 install pycryptodome zstandard
bash
pip3 install pycryptodome zstandard

Step 2b: 提取数据库密钥

Step 2b: Extract Database Keys

运行密钥提取脚本:
bash
python3 {{SKILL_DIR}}/scripts/extract_keys.py
脚本会自动:
  1. 检查微信是否安装
  2. 复制微信到
    ~/Desktop/WeChat.app
    并 codesign 去掉 Hardened Runtime
  3. 检查/安装 frida
  4. Kill 微信 → frida spawn 启动 → 注入 hook 捕获密钥
  5. 提示用户登录微信并等待 30 秒
  6. 自动检测 wxid 和数据库路径
  7. 输出
    ~/.config/wechat-keys.json
    和更新
    ~/.config/wechat-daily.json
重要:脚本运行后需要用户手动登录微信,密钥会在启动时自动捕获。
Run the key extraction script:
bash
python3 {{SKILL_DIR}}/scripts/extract_keys.py
The script will automatically:
  1. Check if WeChat is installed
  2. Copy WeChat to
    ~/Desktop/WeChat.app
    and remove Hardened Runtime via codesign
  3. Check/install frida
  4. Kill WeChat → spawn and start via frida → inject hook to capture keys
  5. Prompt user to log in to WeChat and wait 30 seconds
  6. Automatically detect wxid and database path
  7. Output
    ~/.config/wechat-keys.json
    and update
    ~/.config/wechat-daily.json
Important: After running the script, the user needs to manually log in to WeChat, and the keys will be automatically captured during startup.

Step 2c: 选择监控对象

Step 2c: Select Monitored Objects

运行列表脚本展示所有群聊和联系人:
bash
python3 {{SKILL_DIR}}/scripts/list_contacts.py
然后向用户提问(使用 AskUserQuestion 工具):
问题 1: "你想监控哪些群聊?请从上面的列表中选择,输入群聊名称(多个用逗号分隔)。"
问题 2: "你想监控哪些具体的个人?请输入联系人备注名或昵称(多个用逗号分隔),没有可以跳过。"
用户回答后,将选择保存到
~/.config/wechat-daily.json
monitor_groups
monitor_contacts
字段。
Run the list script to display all group chats and contacts:
bash
python3 {{SKILL_DIR}}/scripts/list_contacts.py
Then ask the user questions (using the AskUserQuestion tool):
Question 1: "Which group chats do you want to monitor? Please select from the above list and enter the group chat names (separate multiple with commas)."
Question 2: "Which specific individuals do you want to monitor? Please enter the contact's remark name or nickname (separate multiple with commas), you can skip if none."
After the user answers, save the selections to the
monitor_groups
and
monitor_contacts
fields in
~/.config/wechat-daily.json
.

Step 2d: 配置输出路径

Step 2d: Configure Output Path

向用户提问:
问题 3: "日报保存到哪个目录?"(默认
~/Documents/wechat-daily
保存到配置文件的
report_dir
字段。
Ask the user:
Question 3: "Which directory should the daily report be saved to?" (Default:
~/Documents/wechat-daily
)
Save to the
report_dir
field in the configuration file.

Step 2e: 生成首份日报

Step 2e: Generate First Daily Report

配置完成后,自动执行 Phase 3。
After configuration is complete, automatically execute Phase 3.

Phase 3: 生成日报

Phase 3: Generate Daily Report

Step 3a: 运行提取脚本

Step 3a: Run Extraction Script

默认取昨天 08:00 到今天 08:00 的完整数据:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py
如果用户指定了具体日期(如"4月16日的日报"、"2026-04-16"),用日期模式:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py YYYY-MM-DD
如果用户有自定义配置文件路径:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py --config /path/to/config.json
By default, extract complete data from 08:00 yesterday to 08:00 today:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py
If the user specifies a specific date (e.g., "Daily report for April 16", "2026-04-16"), use the date mode:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py YYYY-MM-DD
If the user has a custom configuration file path:
bash
python3 {{SKILL_DIR}}/scripts/wechat_daily.py --config /path/to/config.json

Step 3b: 读取原始报告

Step 3b: Read Original Report

读取 Step 3a 生成的原始报告文件。报告路径从脚本输出中获取,或在配置的
report_dir
下查找
YYYY-MM-DD.md
Read the original report file generated in Step 3a. The report path can be obtained from the script output, or find
YYYY-MM-DD.md
under the configured
report_dir
.

Step 3c: 生成精华摘要

Step 3c: Generate Essence Summary

你是一个群聊精华提取专家。根据原始消息,按以下格式重写报告:
格式要求:
  • 开头:1-2段自然语言概括当天最核心的内容(不使用 markdown 格式)
  • 正文:按群分类,每个群提取有价值的讨论要点
  • 不使用 markdown 加粗和标题语法,用 emoji + 列表
  • 链接保持原样
  • 保留关键人名
  • 结尾固定格式"本简报由AI自动生成"
分类参考(根据实际内容灵活选用):
  • 🛠 工具技巧/实战经验
  • 💰 资源推荐
  • 📡 行业动态
  • 💡 观点碰撞
  • 🎭 群友趣事
  • 🐟 群聊日常
  • 📈 投资/加密
  • 💬 话题讨论
内容规范:
  • 重点突出,过滤不重要的闲聊
  • 语言通俗,保留群友的生动表达和金句
  • 图片、语音、表情等非文本消息不写入摘要
  • 系统消息(撤回、加群等)不写入摘要
  • 不写人名,只总结精华内容(除非是公众人物或用户特别指定)
  • 不写私聊摘要(除非用户配置了 monitor_contacts)
  • 不写"其他群聊速览"
  • 每个群的消息数量标注在群名后面,如
    群名(123条)
  • 群与群之间用
    ---
    分隔
You are an expert in extracting group chat essences. Rewrite the report based on the original messages according to the following format:
Format Requirements:
  • Opening: 1-2 paragraphs of natural language summarizing the most core content of the day (no markdown format)
  • Body: Classify by group, extract valuable discussion points for each group
  • Do not use markdown bold and heading syntax, use emoji + lists
  • Keep links as they are
  • Retain key names
  • Fixed ending format: "This briefing is automatically generated by AI"
Classification Reference (flexibly use according to actual content):
  • 🛠 Tool Tips/Practical Experience
  • 💰 Resource Recommendations
  • 📡 Industry Trends
  • 💡 View Collisions
  • 🎭 Group Member Interesting Stories
  • 🐟 Daily Group Chat
  • 📈 Investment/Crypto
  • 💬 Topic Discussions
Content Specifications:
  • Highlight key points and filter unimportant small talk
  • Use popular language, retain vivid expressions and golden phrases from group members
  • Do not include non-text messages such as images, voices, and emojis in the summary
  • Do not include system messages (retraction, joining group, etc.) in the summary
  • Do not write names, only summarize essence content (unless it is a public figure or specifically designated by the user)
  • Do not write private chat summaries (unless the user has configured monitor_contacts)
  • Do not write "Other Group Chat Quick Overview"
  • Mark the number of messages for each group after the group name, e.g.,
    Group Name (123 messages)
  • Separate groups with
    ---

Step 3d: 写入文件

Step 3d: Write to File

将精华摘要覆盖写入:
{report_dir}/YYYY-MM-DD.md
然后告诉用户日报已生成,简要概括今天最核心的1-2件事。

Overwrite the essence summary to:
{report_dir}/YYYY-MM-DD.md
Then inform the user that the daily report has been generated, and briefly summarize the 1-2 most core things of the day.

配置文件格式

Configuration File Format

~/.config/wechat-daily.json
json
{
  "wxid": "wxid_xxx",
  "db_base_path": "~/Library/Containers/.../db_storage",
  "monitor_groups": ["群名1", "群名2"],
  "monitor_contacts": [],
  "report_dir": "~/Documents/wechat-daily",
  "time_mode": "8am_to_8am"
}
~/.config/wechat-keys.json
(自动生成,不要手动编辑):
json
{
  "message_0": "hex_key",
  "contact": "hex_key",
  "session": "hex_key"
}

~/.config/wechat-daily.json
:
json
{
  "wxid": "wxid_xxx",
  "db_base_path": "~/Library/Containers/.../db_storage",
  "monitor_groups": ["Group Name 1", "Group Name 2"],
  "monitor_contacts": [],
  "report_dir": "~/Documents/wechat-daily",
  "time_mode": "8am_to_8am"
}
~/.config/wechat-keys.json
(automatically generated, do not edit manually):
json
{
  "message_0": "hex_key",
  "contact": "hex_key",
  "session": "hex_key"
}

依赖

Dependencies

  • Python 3.9+
  • pycryptodome
  • zstandard
  • frida + frida-tools(仅首次密钥提取时需要)
  • Python 3.9+
  • pycryptodome
  • zstandard
  • frida + frida-tools (only required for first-time key extraction)