baoyu-wechat-summary
Summarizes WeChat group chat highlights into a structured digest using the local wx-cli binary (https://github.com/jackwener/wx-cli). Generates a normal digest by default; a roast (毒舌) version is opt-in. Maintains per-group history (history.json + history-digests.jsonl), per-user profiles, and per-group fact memory (memory.md) across runs, with privacy guardrails baked in. Use when the user asks to "总结群聊", "群聊精华", "群聊摘要", "summarize group chat", "group chat digest", mentions a WeChat group name with a time range, says "帮我看看 XX 群最近聊了什么", "XX 群有什么值得看的", or asks to "回溯画像" / "初始化画像" / "backfill pr
npx skills add JimLiu/baoyu-skills --skill baoyu-wechat-summary --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Summarizes WeChat group chat highlights into a structured digest using a local wx-cli binary. By default it generates a normal digest; a roast version is optional. It maintains per-group history (history.json + history-digests.jsonl), per-user profiles, and per-group memory (memory.md) across runs with privacy guardrails. It is invoked when the user asks to summarize group chat or similar phrases, including specific group names and time ranges; it can also initialize or backfill profiles.
How it works
- Parses user request to extract group name, time range (convertible to --since/--until), and which version(s) to generate (normal, roast, or both) based on defaults and explicit roast/normal indicators.
- Resolves the target group by querying wx contacts and handles ambiguity with user prompts if needed.
- Determines the group folder path as {data_root}/{group_id}-{sanitized_group_name}/, applying name sanitization rules and optional group-rename handling.
- Identifies the group owner via wx members or memory.md, without asserting ownership if unavailable, and updates records accordingly.
- Fetches messages for the group within the specified range, redirecting output to a temporary file for audit and processing, and supports incremental mode using last_digest.last_message_time.
- Parses messages to extract relevant fields (id, from_wxid, from_nickname, content, timestamp, chat_type, quotes), normalizing timestamps to display format and preserving attribution.
- Substitutes self_display for messages from self_wxid, scans for ambiguous nicknames to disambiguate via wx contacts, and records mappings in memory.md for future runs.
- Loads user profiles from profiles and (if roast) profiles-roast, builds a profile context (not written to final digest), and loads group memory from memory.md if present.
- Detects existing in-chat digests and @bot requests as optional steps to adjust the digest scope or respond to bot-directed prompts.
When to use it
Use when the user asks for group digest related actions, including phrases like "总结群聊", "群聊精华", "群聊摘要", "summarize group chat", or mentions a group with a time range; or asks to backfill or initialize profiles.
What it can touch
- External tool: wx-cli via the shell (wx) for: whoami, sessions, contacts, members, history.
- Local folders under data_root for each group: {group_id}-{sanitized_group_name} with subfolders profiles/ and profiles-roast/ and memory.md.
- History and memory files: history.json, history-digests.jsonl, memory.md, and per-user profile files under profiles/ and profiles-roast/.
Caveats
- wx-cli access is sandbox-restricted; commands must run with dangerousDisableSandbox: true. If the environment blocks wx, setup references must be consulted.
- The agent should not assert ownership unless sourced by wx members or memory.md entries; if neither source provides ownership, the summary must avoid asserting a group owner.
- If data_root is customized, that path is used for all group digests; otherwise defaults to project_root/wechat.
- The roast version adds content style; only generated if requested via inputs like roast indicators or explicit keywords.
- Any single-step or multi-step workflow steps depend on user prompts for disambiguation or preference when necessary.
# WeChat Group Summary 群聊精华提取专家。把零散的微信群聊记录提炼成结构化、可读性强的简报,并维护跨次运行的群聊历史与群友画像。底层依赖外部 [wx-cli](https://github.com/jackwener/wx-cli) 二进制(`wx` 命令),不打包脚本。 > **⚠️ Sandbox restriction** > > wx-cli reads from `~/.wx-cli/` (config, cache, daemon socket) and from WeChat's data directory (`~/Library/Containers/com.tencent.xinWeChat/` on macOS). Both paths are outside Claude Code's default sandbox. Every `wx` command in this skill needs to run with `dangerouslyDisableSandbox: true` from the start — don't waste a sandbox attempt first. The user can use `/sandbox` to view/edit restrictions. ## References(按需加载) 本文件只保留工作流骨架;细节拆在 `references/` 下,**执行到对应步骤时再读,不要一开始全部读入**: | 参考文件 | 内容 | 何时读 | |---------|------|-------| | [references/setup.md](references/setup.md) | 环境检查(wx-cli 安装/权限/初始化)、wx-cli 命令速查、排障手册 | 新环境首次运行,或任何 `wx` 命令失败时 | | [references/output-formats.md](references/output-formats.md) | 两版摘要的 Section 顺序、格式与内容规范、输出骨架、自检清单 | Round 2 动笔前 | | [references/profiles.md](references/profiles.md) | 画像文件格式、更新规则、隐私红线、回溯流程 | Step 3.7 / 8.5 / Step 9 | | [references/group-memory.md](references/group-memory.md) | 群级事实记忆的写入门槛、防注入、格式 | Step 8.6 | ## User Input Tools When this skill prompts the user, follow this
- References(按需加载)
- User Input Tools
- Prerequisites
- Preferences (EXTEND.md)
- Supported keys
- First-Time Setup (BLOCKING)
- Workflow
- Step 1: Parse the user's request
- Step 2: Find the group + resolve folder path
- Step 2.5: Look up the group owner(群主)
- Step 3: Fetch messages
- Step 3.5: Parse the message schema
- Step 3.6: Resolve self + ambiguous nicknames
- Step 3.7: Load user profiles
wx whoami --json 2>/dev/null
wx sessions --json --limit 20 2>/dev/null
wx contacts --query "<group_name>" --json
wx members "<group_name_or_id>" --json
wx history "<group_name_or_id>" --since YYYY-MM-DD --until YYYY-MM-DD -n 5000 --json
wx history "<group_name_or_id>" --since YYYY-MM-DD --until YYYY-MM-DD -n 5000 --json > "$TMPDIR/wx-messages.json"
wc -c "$TMPDIR/wx-messages.json"
jq 'length' "$TMPDIR/wx-messages.json"
grep "原话片段" "$TMPDIR/wx-messages.json" # or jq 'map(select(.content | contains("原话片段")))'What does the baoyu-wechat-summary skill do?
Summarizes WeChat group chat highlights into a structured digest using the local wx-cli binary (https://github.com/jackwener/wx-cli). Generates a normal digest by default; a roast (毒舌) version is opt-in. Maintains per-group history (history.json + history-digests.jsonl), per-user profiles, and per-group fact memory (memory.md) across runs, with privacy guardrails baked in. Use when the user asks to "总结群聊", "群聊精华", "群聊摘要", "summarize group chat", "group chat digest", mentions a WeChat group name with a time range, says "帮我看看 XX 群最近聊了什么", "XX 群有什么值得看的", or asks to "回溯画像" / "初始化画像" / "backfill pr
How do I install it?
Run `npx skills add JimLiu/baoyu-skills --skill baoyu-wechat-summary --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From JimLiu/baoyu-skills, a repository with 24,562 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
