Interactive WeChat group digest workflow. Reuse saved recent groups, let the user choose a time preset or custom range, then generate either a structured text summary or a local web digest from real wx-cli chat data. Use when the user asks for 微信群聊日报、群聊摘要、群聊信息报、summary from WeChat chat history, or wants a reusable skill that wraps wx-cli / baoyu-style setup without deployment.
Resources
7Install
npx skillscat add qianzhu18/wx-summary-skill Install via the SkillsCat registry.
WeChat Summary Skill
把微信群聊提取做成一个可复用、可交互的摘要流程。
这个 skill 只负责:
- 选择群聊
- 选择时间范围
- 选择输出模式
- 保存最近使用的群和默认配置
- 生成文字摘要或本地网页信息报
它不负责部署。
User Input Rule
When asking the user for choices:
- Prefer built-in user-input tools exposed by the runtime.
- If no such tool exists, ask concise numbered questions in plain text.
- Batch compatible questions when possible.
Prerequisites
When running the bundled Python scripts below:
- use
python3on macOS / Linux - use
py -3on Windows PowerShell - use
pythononly if that is your machine's Python 3 launcher
Before doing anything else, verify these in order:
python3 scripts/check_wechat_env.pyIf the doctor fails:
- tell the user the exact failing command
- read references/setup-without-baoyu.md
- guide them through upstream
wx-cliinstall / init before continuing
This skill should reuse existing baoyu preferences when available, but it must also work without baoyu by using repo-native config.
Shared Config
This skill reads two layers of local configuration:
- repo-native config for
data_root, optionalself_wxid,self_display, and optionalwx_bin - baoyu preferences for
self_wxid,self_display, and optionaldata_root - skill state for recent groups and preferred output presets
Load the skill state first:
python3 scripts/skill_state.py inspectThat command returns:
- the resolved config paths
- recent groups
- default time preset
- default summary mode
- default text/web styles
- default data root
If there is no repo-native config and no baoyu config yet, initialize one:
python3 scripts/skill_state.py init-config --scope project --data-root ./wechatUse the returned recent_group_choices as the first question. If there are no saved groups yet, the list should effectively be Other.
Interaction Flow
1. Pick the group
Start from the saved recent groups returned by scripts/skill_state.py inspect.
- If the user picks a recent group, reuse its
group_idandgroup_name. - If the user picks
Other, ask for the target group name or keyword, then run:
wx contacts --query "<group keyword>" --jsonFilter to chatrooms only (username ending in @chatroom).
- If one match remains, use it.
- If multiple match, ask the user to choose.
- If none match, fall back to:
wx sessions --jsonand search there before giving up.
The user's chosen group should be saved back into the recent-group list after the run.
2. Pick the time range
Offer these presets first:
1d- 1 day3d- 3 days7d- 1 week14d- 2 weeks30d- 1 monthcustom
Use the saved default preset as the recommended option.
For preset ranges, resolve absolute dates with:
python3 scripts/resolve_time_range.py --preset 7dFor custom, ask the user for since and until in YYYY-MM-DD, then run:
python3 scripts/resolve_time_range.py --since YYYY-MM-DD --until YYYY-MM-DD3. Pick the output mode
Offer:
text- structured text digestwebpage- local web digest
Use the saved default summary mode as the recommended option.
4. Pick the style
Use the saved style default for the chosen mode.
Current built-in styles:
- text mode:
growth-brief-v1 - webpage mode:
daily-report-v1
Do not ask an extra style question unless:
- the user explicitly asks to change style, or
- more than one style is available for that mode
5. Save the session defaults
After the user confirms group + time range + mode, persist them:
python3 scripts/skill_state.py save-session \
--scope project \
--group-id "<group_id>" \
--group-name "<group_name>" \
--duration-preset 7d \
--summary-mode text \
--text-style growth-brief-v1 \
--web-style daily-report-v1Rules:
- Keep only the most recent groups near the front of the list.
- Default to
projectscope unless the user explicitly asks for global reuse. - If the user asks for global reuse across projects, use
xdgscope.
Fetch + Analyze
Once group and date range are fixed, always build a local analysis bundle first:
python3 scripts/prepare_wechat_digest.py \
--chat "<group_name>" \
--since YYYY-MM-DD \
--until YYYY-MM-DD \
--data-root "<data_root>"This writes:
raw/*.messages.jsonraw/*.stats.jsonanalysis/*.analysis.jsonanalysis/*.briefing.md
Read the generated briefing before opening raw messages. It is the cheapest way to understand the selected range.
Output Modes
Text mode
Read:
references/text-summary-format.md
Use the analysis bundle plus raw messages only when needed, then write a markdown digest to:
<group_dir>/<since>_<until>.text-summary.mdThe final text output must follow the section structure in references/text-summary-format.md.
Webpage mode
Read:
references/webpage-mode.mdreferences/summary-schema.md
Then:
- Draft
summary.json - Render the local site with:
python3 scripts/render_web_digest.py \
--summary /abs/path/to/summary.json \
--analysis /abs/path/to/analysis.jsonThis writes local output only:
<group_dir>/<since>_<until>.web.md<group_dir>/site/index.html<group_dir>/dist/index.html<group_dir>/history.json
Do not add deployment steps.
When To Read Raw Messages
The analysis bundle is usually enough. Open raw messages only when:
- a quote needs verification
- a hotspot feels too vague
- you need the exact wording for demand / connector attribution
- the same nickname might refer to multiple people
Do not dump the whole raw payload into context if the date range is large. Use jq slices or targeted searches.
Output Discipline
- Use real group names and real participant names.
- Keep counts and dates accurate.
- Keep explicit facts separate from your inference.
- Do not fabricate links.
- Do not add deployment advice unless the user explicitly asks for it.