---
title: WeChat Group Daily Digest
description: Read WeChat group messages, extract public account articles and video content, and summarize article contents from URLs.
name: wechat-group-digest
trigger: When user asks for a summary of today's WeChat group messages, or wants to read articles shared in a WeChat group.
---
# WeChat Group Daily Digest Skill
## Overview
This skill provides a complete workflow for:
1. Querying WeChat group messages from EnMicroMsg.db
2. Identifying the correct group name via `rcontact.nickname`
3. Extracting public account (公众号) article URLs and video content IDs
4. Crawling and summarizing article content from WeChat article URLs
## Key Database Schema
### Group Name Location
**Critical Discovery**: Group names are stored in TWO places with different reliability:
1. **rcontact.nickname** = actual group display name set by user (e.g., "8-TGO和朋友们的AGI")
- This is the RELIABLE source for group identification
- Query: `SELECT username, nickname FROM rcontact WHERE username LIKE '%chatroom%' AND nickname LIKE '%KEYWORD%'`
2. **chatroom.chatroomnick** = group nickname field
- Almost always NULL in practice (do NOT rely on this)
- The field exists in schema but is rarely populated
3. **chatroom.displayname** = member list truncation (e.g., "杨攀🏂🎾、火星人、TGO-小晶...")
- Useful for member verification but NOT for group identification
- Can confirm you found the right group by checking member names
**Recommended approach**: Always query `rcontact` table for group name, then cross-reference with `chatroom` table if needed.
### Message Types
| Type | Meaning |
|------|---------|
| 1 | Text message |
| 3 | Image |
| 49 | Public account article / link share |
| 47 | Sticker/emoji |
| 43 | Video |
| 51/63 | Video channel (视频号) / live stream |
| 10000 | System message |
| 754974769 | Video channel (encrypted type code) |
| 973078577 | Live stream (encrypted type code) |
## Two-Layer Prompt Pipeline (Recommended Workflow)
Based on user feedback, the optimal workflow uses a **two-layer pipeline**:
### Layer 1: Content Editor Agent (Data → Newspaper)
Transform raw WeChat messages, articles, tweets, GitHub updates into a structured news report.
**Input**:
- WeChat group chat messages
- Public account article summaries
- Twitter/X discussions
- GitHub project updates
- Product release information
**Output**: Structured daily report in JSON/Markdown format
**Prompt V1 - AGI Daily Editor**:
```text
你是一名《AI时代日报》的主编。
请阅读以下内容:
{{微信群聊天记录}}
{{公众号摘要}}
{{推文摘要}}
{{产品发布信息}}
任务:
从所有内容中提取:
1. 今日最重要的4条新闻
2. 今日最有价值的5条观点
3. 今日最重要的人物
4. 今日最重要的项目
5. 今日最重要的趋势
要求:
不要简单摘要。
要按照科技日报编辑部的方式:
- 去重
- 聚类
- 提炼主题
- 总结行业意义
输出JSON:
{
"date":"2026-06-23",
"headline":"一句话总标题",
"hero_story":{
"title":"主标题",
"summary":"100字摘要"
},
"news":[
{
"title":"",
"summary":"",
"source":""
}
],
"quotes":[
{
"author":"",
"quote":""
}
],
"trend":{
"title":"",
"summary":""
}
}
```
**Prompt V2 - Daily Deep Editor** (Wall Street Journal / The Economist style):
```text
你是一名拥有30年经验的科技媒体总编辑。
请根据JSON内容:
{{日报JSON}}
完成以下工作:
1. 找出今天最大的行业主线
2. 生成报纸头版标题
3. 生成副标题
4. 给每条新闻重新命名
5. 给每条新闻写50字导语
6. 提炼5条最有洞察的观点
要求:
风格参考:
- 华尔街日报
- The Economist
- Wired
- MIT Technology Review
输出Markdown。
```
### Layer 2: Visual Design Agent (Newspaper → Poster)
Transform structured news report into a Victorian-era newspaper poster using GPT Image 2.
**Style**: 19th Century Steampunk Financial Newspaper
- Woodcut engraving illustration
- Aged yellow paper texture
- Victorian era printing press aesthetic
- The Economist cover style
- Black ink only on sepia paper
**CRITICAL RULE: Content-Only Prompting**
When generating infographics with GPT Image 2, NEVER let the model hallucinate fictional content. The user explicitly corrected: "没有的东西不要自己乱写" (don't make up content that doesn't exist).
**Always include in the prompt:**
```
CRITICAL RULES:
- ONLY use the content provided below
- DO NOT add fictional sections like "1880", "International News", "Editorial", "Advertisement", "Testimony", "Market Briefing"
- ONLY include sections that have actual content
- DO NOT invent dates, headlines, or news items not in the source data
```
**User explicitly corrected**: "你只需要把我们有的东西对吧展示出来,没有的东西不要自己乱写啊" — Only include actual content from source data, never invent fictional sections.
**GPT Image 2 Prompt (Content-Only - No Fictional Sections)**:
```text
Create a front-page Victorian newspaper poster.
CRITICAL RULES:
- ONLY use the content provided below
- DO NOT add fictional sections like "1880", "International News", "Editorial", "Advertisement", "Testimony", "Market Briefing"
- ONLY include sections that have actual content
- DO NOT invent dates, headlines, or news items not in the source data
- Use the EXACT dates and titles provided - do not invent dates
Style:
1880 Victorian newspaper
19th century financial times
The Economist cover
engraving illustration
woodcut etching
vintage printing press
old yellow paper
aged newspaper texture
ink engraving
black and white line art
Content (ONLY use this, do not add fictional content):
Masthead: "AI AGI 日报"
Date: "{date}"
Headline: "{headline}"
Hero Story:
Title: {hero_title}
Summary: {hero_summary}
News Articles:
{news_items}
Key Quotes:
{quotes}
Trend Analysis:
Title: {trend_title}
Summary: {trend_summary}
Layout:
- Large masthead "AI AGI 日报" on top
- Main headline in Chinese
- Hero story section with title and summary
- News articles in columns
- Key quotes section
- Trend analysis section
Main Illustration:
a symbolic AI industrial revolution scene
server rack shaking hands with printing press
technology meets industry
highly detailed engraving
center composition
Mood:
historical
authoritative
intellectual
industrial revolution
Color:
sepia paper
black ink only
Aspect ratio:
1:1
```
```
**GPT Image 2 Prompt (Content-Only - No Fictional Sections)**:
```text
Create a front-page Victorian newspaper poster.
CRITICAL RULES:
- ONLY use the content provided below
- DO NOT add fictional sections like "1880", "International News", "Editorial", "Advertisement", "Testimony", "Market Briefing"
- ONLY include sections that have actual content
- DO NOT invent dates, headlines, or news items not in the source data
- Use the EXACT dates and titles provided - do not invent dates
Style:
1880 Victorian newspaper
19th century financial times
The Economist cover
engraving illustration
woodcut etching
vintage printing press
old yellow paper
aged newspaper texture
ink engraving
black and white line art
Content (ONLY use this, do not add fictional content):
Masthead: "AI AGI 日报"
Date: "{date}"
Headline: "{headline}"
Hero Story:
Title: {hero_title}
Summary: {hero_summary}
News Articles:
{news_items}
Key Quotes:
{quotes}
Trend Analysis:
Title: {trend_title}
Summary: {trend_summary}
Layout:
- Large masthead "AI AGI 日报" on top
- Main headline in Chinese
- Hero story section with title and summary
- News articles in columns
- Key quotes section
- Trend analysis section
Main Illustration:
a symbolic AI industrial revolution scene
server rack shaking hands with printing press
technology meets industry
highly detailed engraving
center composition
Mood:
historical
authoritative
intellectual
industrial revolution
Color:
sepia paper
black ink only
Aspect ratio:
1:1
```
**Advanced Version** (Fusion Style):
- 40% New York Times 1900s front page
- 30% The Economist special edition
- 20% US dollar bill engraving style
- 10% Steampunk
**Key Illustration** (Soul of the image):
```text
server rack and industrial printing machine
shaking hands
engraving style
US dollar bill engraving
extremely detailed line work
woodcut illustration
banknote etching
centerpiece illustration
```
### Complete 4-Agent Pipeline
```text
微信群
公众号
Github
X/Twitter
↓
News Collector
↓
News Editor
↓
Layout Planner
↓
GPT Image 2
```
**Layout Planner Output** (JSON fed to GPT Image 2):
```json
{
"newspaper_name":"TGO和朋友们的AGI",
"headline":"模型能力落地成流程:工具、工程与安全并进",
"hero_image":
{
"concept":
"server rack shaking hands with printing press"
},
"columns":[
{...},
{...},
{...}
],
"quotes":[
{...}
]
}
```
This creates a complete Agentic Media workflow: WeChat Group → Editorial Agent → Layout Agent → GPT Image 2 → Daily Front Page.
---
## Legacy Workflow (Single Layer)
### Step 1: Identify Group Chatroom ID
```sql
-- Find group by name pattern
SELECT username, nickname FROM rcontact
WHERE username LIKE '%chatroom%'
AND (nickname LIKE '%KEYWORD%' OR conRemark LIKE '%KEYWORD%')
```
### Step 2: Query Today's Messages
```sql
-- Get messages from today (timestamp in milliseconds)
SELECT msgId, type, isSend, talker, content, createTime
FROM message
WHERE talker = 'CHATROOM_ID@chatroom'
AND createTime > TODAY_TIMESTAMP_MS
ORDER BY createTime DESC
```
Calculate today's timestamp:
```python
from datetime import datetime, timezone, timedelta
beijing = timezone(timedelta(hours=8))
today_start = int(datetime.now(beijing).replace(hour=0, minute=0, second=0, microsecond=0).timestamp() * 1000)
```
### Step 3: Extract Public Account Articles
For each message with `type = 49`:
- Extract `
` from XML content
- Extract `` from XML content
- Decode HTML entities: ` ` → space, `&` → `&`
### Step 4: Extract Video Channel Content
For messages with `type = 754974769` (video channel) or `type = 973078577` (live stream):
- Extract `finderFeed.objectId` or `finderLive.finderLiveID`
- These are encrypted IDs only readable by WeChat client
### Step 5: Crawl Article Content
```bash
curl -s -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "URL" | python3 -c "
import sys, re
html = sys.stdin.read()
# Extract content from js_content
content_match = re.search(r'id=\"js_content\"[^>]*>(.*?)', html, re.DOTALL)
if content_match:
content = content_match.group(1)
text = re.sub(r'<[^>]+>', '', content)
text = re.sub(r'\s+', ' ', text).strip()
print(text)
"
```
### Step 6: Generate Complete Report (CRITICAL - User Requirement)
**User explicitly corrected**: Previous reports were losing information by not extracting complete article details. The report MUST include:
1. **Every article's full title** - not truncated
2. **Every article's summary** - 1-2 sentence description of what the article is about
3. **Article source** - which public account or author shared it
4. **Key information/tags** - main topics covered
5. **Chat discussion summaries** - topic + participants + key viewpoints
**Report-first Workflow** (用户明确要求):
```
Raw Messages → Extract Articles → Extract Discussions → [Kimi Analysis] → Generate Complete Report → Generate Infographic
```
**NEVER** generate infographic directly from raw messages. ALWAYS generate complete Markdown report first, then use report as input to infographic generation.
**Automation Script**: `scripts/wechat_digest_generator.py` handles the full pipeline:
```bash
python3 scripts/wechat_digest_generator.py \
--group "8-TG0和朋友们的AGI" \
--output /sdcard/WeChatDigest/ \
--use-kimi # Enable Kimi for deep analysis
```
**What the script does**:
1. Queries WeChat database for today's messages
2. Extracts public account articles (title, description, URL, source) from type 49 messages
3. Extracts text discussions from type 1 messages
4. Groups messages into discussion topics
5. **Optional**: Uses Kimi 2.6 to analyze and summarize discussions
6. Generates complete Markdown report with all required fields
7. Calls infographic generator to create visual report
**Kimi Integration for Deep Analysis** (optional but recommended):
```python
from kimi_client import search, simple_chat
# Analyze discussion topics
discussion_text = "\n".join([f"{m['sender']}: {m['content']}" for m in messages])
analysis = simple_chat(f"""
Analyze these WeChat group discussions and summarize:
1. Top 3 hot topics (20 chars each)
2. Key viewpoints for each topic
3. Technology trends (5 points)
4. What deserves attention
Discussions:
{discussion_text}
""", timeout=90)
```
**Report Structure Template**:
```markdown
# {GROUP_NAME} 日报 — {DATE}
## 📰 头条热点
[Today's biggest topic with 1-sentence summary]
## 📑 精选文章 ({N}篇)
### 1. {FULL_ARTICLE_TITLE}
**来源**: {SOURCE_NAME}
**摘要**: {1-2 sentence summary of what the article covers}
**链接**: {URL}
**关键信息**: {comma-separated keywords}
### 2. {NEXT_ARTICLE}...
## 💬 群聊讨论精选
### 话题1: {TOPIC_NAME}
**参与者**: {MEMBER_NAMES}
**核心观点**:
- {Viewpoint 1}
- {Viewpoint 2}
## 📊 数据统计
| 指标 | 数值 |
|------|------|
| 公众号文章 | {N}篇 |
| 讨论话题 | {N}个 |
| 活跃成员 | {N}位 |
| 信息来源 | {GROUP_NAME} |
## 🔍 技术趋势总结
1. {Trend 1}
2. {Trend 2}
```
**Critical Requirements** (from user correction):
- "把每一篇文章的标题和每一篇文章的概要全部都读出来" — MUST extract complete titles and summaries
- "把每一个人的这个聊天记录也要理解总结出来" — MUST summarize chat discussions with topics and viewpoints
- "把这个文档扔给信息图的skill,让文档去基于这个文档去生成一个更好的信息图" — Report is input to infographic generation
- Do NOT generate infographic directly from raw messages; always generate complete report first
### Step 7: Generate Infographic Image (Newspaper Style - DEFAULT)
**CRITICAL USER PREFERENCE**: User explicitly rejected purple tech-style infographics. "紫色这种科技风不太好看,做成报纸的那种,黄色的那种配图的那种效果". ALWAYS use newspaper style unless user explicitly requests otherwise.
**Default Style**: 复古报纸风格 (Vintage Newspaper Style)
- 米黄色/牛皮纸背景 (#f5f0e1 或 #e8dcc8)
- 黑色粗体标题 (Serif 字体,类似 Old English)
- 双栏/三栏排版
- 装饰性边框和分隔线
- 日期和版次信息
- 无照片,纯文字和装饰元素
**Anti-pattern**: Do NOT generate purple/blue gradient tech-style infographics unless user explicitly asks for that style.
**Implementation Options**:
### Option A: Gemini Image Generation (Recommended)
**Prompt for image generation** (GPT Image 2, ¥0.14/张):
```
A professional vintage newspaper infographic poster for a WeChat group daily digest.
Title 'AI AGI 日报' in large bold Chinese serif font at top center.
Beige newsprint background (#f5f0e1).
Multiple content blocks with different theme colors (blue for AI Agent, purple for LLM, green for hardware, orange for industry news, red for open source, gray for discussions).
Each block has bold Chinese headlines, one-sentence summaries, and source attributions.
Statistics dashboard with icons and numbers.
Decorative Victorian borders and divider lines.
Highly organized grid layout, information-dense, crisp text rendering, 4k resolution.
```
**Note**: GPT Image 2 uses `/v1/images/generations` endpoint. See `image-generation` skill for details.
**Chinese language requirement**: All text in the infographic must be Chinese. Title uses "AI AGI 日报" not "AI AGI DAILY". Section names use Chinese (今日文章, 群聊讨论, etc.).
```
**关键要求** (用户强制要求):
- 提示词必须用**纯中文**
- 要求"所有文字必须是中文"
- 标题用中文"AI AGI 日报"而不是"AI AGI DAILY"
- 栏目名称用中文"今日文章"、"群聊讨论"
- 日期格式用中文"2026年6月23日"
- 页脚用中文"由AI智能体生成"
- **避免任何英文单词**,除非技术名词(如Agent-Reach、CLAUDE.md等专有名词保留英文)
- **用户明确纠正**: "不要用英文" — 信息图必须全中文
### Option B: Python Pillow (Offline) — RECOMMENDED for Daily Digest
Use `references/newspaper_infographic_v3.py` for offline generation. This is the **preferred method** for WeChat daily digest because it produces consistent, controllable output without API costs.
**For complete reports with full article details**, use `references/newspaper_infographic_v4.py` which supports:
- Complete article cards with title + summary + source + keywords
- Discussion topic cards with participants + viewpoints
- Higher information density from complete reports
**Features** (v3/v4 - 卡片式布局 + 分板块 + 描述 + 配图):
- **Header**: 报纸名称 "AI AGI 日报" + 群名 + 日期 + 版次
- **Stats Panel**: 4个统计卡片(文章数、板块数、讨论数、成员数)
- **Card Layout**: 每个板块独立卡片,圆角边框,左侧色条
- **Categories**: 按行业分板块(AI Agent🤖、大模型🧠、AI硬件🔧、行业动态📊、开源项目📦、群聊讨论💬)
- **Each Article**: 标题 + 简短描述(50-80字)
- **Icons**: 每个板块配 Emoji 图标 + 圆形彩色背景
- **Footer**: "由 AI 智能体生成" + 时间戳 + 数据来源
- **Decorations**: 顶部/底部金色装饰条,板块计数标签
**报告模板要求** (Markdown 格式 - MUST include complete details):
```markdown
### AI Agent 与开发工具
- **Agent-Reach**: AI Agent 互联网读取能力开源工具,支持自动化信息获取
**来源**: ThinkInAI社区
**摘要**: 支持多平台信息抓取,开源社区活跃,解决Agent信息获取瓶颈
**关键信息**: 开源项目、信息抓取、Agent工具
- **Project-LLM-Wiki**: 解决 Agent 反复读代码问题,节省15% token消耗
**来源**: 陶艺夫
**摘要**: 通过缓存机制优化代码读取流程,提升开发效率
**关键信息**: 代码缓存、token优化、开发效率
### 大模型与视频生成
- **Seedance 2.5**: 国产视频模型突破天花板,支持多模态生成
**来源**: 火山引擎
**摘要**: 字节跳动发布,支持4K视频生成,效果媲美Sora
**关键信息**: 视频生成、4K、字节跳动、多模态
```
**关键要求** (用户明确结构要求):
- 必须按板块分类(### 标题)
- 每条新闻必须有标题和描述
- **必须包含来源信息** — 哪个公众号/作者
- **必须包含摘要** — 1-2句话描述文章内容
- **必须包含关键词** — 方便分类和检索
- 群聊讨论单独一个板块,包含话题+参与者+观点
- **用户纠正**: "信息图首先得有一个标题对吧?然后比如说哪个群的哪天的日报。第二你要分这个板块对吧?分行业哪些行业有哪些新闻。第三,每个新闻下面都有一个简单的内容的描述啊,对吧?第四呢,你还应该配一些图对吧" — 必须包含:标题(群名+日期)、分板块、内容描述、配图
- **用户纠正**: "把每一篇文章的标题和每一篇文章的概要全部都读出来" — 必须完整提取每篇文章的标题和摘要,不能丢失信息
- **用户纠正**: "把每一个人的这个聊天记录也要理解总结出来" — 必须总结聊天记录,提取话题和观点
- **用户反馈 v1/v2**: "太素了,不好看,配图太少" — v3/v4 增加了卡片式布局、彩色板块、Emoji图标、统计面板
- **Output**: 800px wide PNG, saved to configurable path
**生成命令** (v4 for complete reports, v5 for Kimi-designed layout):
```bash
# v4: Complete report with full article details
python3 ~/.hermes/skills/wechat-group-digest/references/newspaper_infographic_v4.py \
--report /sdcard/WeChatDigest/report_YYYYMMDD_full.md \
--output /sdcard/WeChatDigest/infographic_YYYYMMDD_v4.png \
--group "8-TG0和朋友们的AGI"
# v5: Kimi-designed professional layout with enhanced visual hierarchy
python3 ~/.hermes/skills/wechat-group-digest/references/newspaper_infographic_v5.py \
--report /sdcard/WeChatDigest/report_YYYYMMDD_full.md \
--output /sdcard/WeChatDigest/infographic_YYYYMMDD_v5.png \
--group "8-TG0和朋友们的AGI"
```
**自动化脚本** (完整流程):
```bash
# 一键生成完整日报(提取文章+分析讨论+生成报告+生成信息图)
python3 ~/.hermes/skills/wechat-group-digest/scripts/wechat_digest_generator.py \
--group "8-TG0和朋友们的AGI" \
--output /sdcard/WeChatDigest/ \
--use-kimi # 启用 Kimi 深度分析
```
**What the script does**:
1. Queries WeChat database for today's messages
2. Extracts public account articles (title, description, URL, source) from type 49 messages
3. Extracts text discussions from type 1 messages
4. Groups messages into discussion topics
5. **Optional**: Uses Kimi 2.6 to analyze and summarize discussions
6. Generates complete Markdown report with all required fields
7. Calls infographic generator to create visual report
**Kimi Integration for Deep Analysis** (optional but recommended):
```python
from kimi_client import search, simple_chat
# Analyze discussion topics
discussion_text = "\n".join([f"{m['sender']}: {m['content']}" for m in messages])
analysis = simple_chat(f"""
Analyze these WeChat group discussions and summarize:
1. Top 3 hot topics (20 chars each)
2. Key viewpoints for each topic
3. Technology trends (5 points)
4. What deserves attention
Discussions:
{discussion_text}
""", timeout=90)
```
## Step 8: Send to Group (Verified Method 2026-06-23)
### Text Summary
- Use `mcp_android_phone_send_wechat_message` to send the text summary
- Keep text under 2000 characters to avoid WeChat truncation
### Image Sending (Fully Verified)
**Method**: System Share (ACTION_SEND) — 已完整验证,端到端可用
**Complete Verified Flow**:
```bash
# Step 1: Trigger system share Intent
am start -a android.intent.action.SEND -t image/png \
--eu android.intent.extra.STREAM file:///sdcard/path/to/infographic.png
```
**Step 2: Wait for "选择聊天" contact picker (MvvmContactListUI)**
- Wait 3 seconds after intent
**Step 3: Find contact via OCR**
```python
# Method A: Direct OCR (contact in recent list)
ocr_find_text(text="火星人")
# Returns: {"center": {"x": 145, "y": 923}} ← varies, do NOT hardcode
# Tap the found position
```
**Step 4: Contact selection fallback (if not in recent list)**
```python
# Tap search box (fixed position)
tap(238, 407)
# Type pinyin (Chinese input often fails)
input_text("huoxingren")
# Wait 2 seconds for pinyin candidates
# Select correct candidate (e.g., "3火星人")
# Tap contact in filtered results
```
**Step 5: Tap send button**
```python
# Fixed coordinate (1344x2992 screen, no keyboard)
tap(899, 2627)
```
**Step 6: Verify**
```python
# Wait 3 seconds
# Screenshot + OCR should show:
# - Chat title: "火星人"
# - Image marker: "To:火星人" or image content
```
**Critical Coordinates** (1344×2992, no keyboard):
| Element | Coordinate | Note |
|---------|-----------|------|
| Search box | (238, 407) | Fixed, always at top |
| Send button | (899, 2627) | Fixed, bottom-right |
| Cancel button | (440, 2627) | Fixed, bottom-left |
| "发送给:" label | (166, 1723) | Just a label, NOT clickable |
**Pitfalls**:
- Contact position varies by recent chat history — ALWAYS use OCR, never hardcode contact positions
- Keyboard state shifts button Y coordinates — if keyboard visible, press back first
- Pinyin search is reliable fallback when Chinese input fails (verified: input_text("huoxingren") works)
- "发送给:" is a label, NOT the send button — the real send button is at (899, 2627)
- **Screen state check**: Device may be in Dozing state (screen off). ALWAYS check `get_lock_status()` before screenshots. If `screen_on: false`, wake device first with tap(500, 500) or swipe before attempting to send images
**Verification Checklist**:
- [ ] Intent triggered successfully
- [ ] "选择聊天" UI appeared
- [ ] Contact found (via OCR or pinyin search)
- [ ] Contact tapped
- [ ] Send button visible at (899, 2627)
- [ ] Send button tapped
- [ ] Chat UI shows image sent
## File Locations
- **v3 Infographic Generator**: `references/newspaper_infographic_v3.py` - Card layout + colored categories + emoji icons
- **v4 Infographic Generator**: `references/newspaper_infographic_v4.py` - Complete article details (title + summary + source + keywords)
- **v5 Infographic Generator**: `references/newspaper_infographic_v5.py` - Kimi-designed professional layout with enhanced visual hierarchy
- **Automation Script**: `scripts/wechat_digest_generator.py` - Full pipeline: extract articles → analyze discussions → generate report → generate infographic
- **Agentic Media Pipeline**: `scripts/agentic_media_pipeline.py` - 4-Agent Pipeline (News Collector → News Editor → Layout Planner → GPT Image 2)
- **Pipeline Notes**: `references/agentic-media-pipeline-notes.md` - Known issues, workarounds, and manual execution steps for the 4-Agent pipeline
- **GPT Image 2 API**: `references/gpt-image-2-api-format.md` - GPT Image 2 API endpoint (`/v1/images/generations`), request/response format, differences from Gemini API
- **Feishu CLI Setup**: `references/feishu-lark-cli-android-setup.md` - Feishu/Lark CLI installation on Android/Termux with DNS workaround for OAuth failures
- **Pipeline Architecture**: `references/two-layer-pipeline-architecture.md` - Two-Layer Prompt Pipeline design (News Collector → News Editor → Layout Planner → GPT Image 2) with user-specified style composition
## Pitfalls
1. **WeChat article anti-scraping**: Must use browser User-Agent, may still 403
2. **Video channel content**: Cannot be read via URL, only WeChat client can decode Finder IDs
3. **Images in articles**: Only get placeholder URLs, not actual image content
4. **Time zone**: WeChat timestamps are in milliseconds since epoch, convert to Beijing time (UTC+8)
5. **Group name mismatch**: User may refer to group by partial name, always query `rcontact` for exact match
6. **Image sending limitation**: WeChat has no API for programmatic image sending. `mcp_android_phone_send_wechat_message` only handles text. See `references/image_sending_limitations.md` for workarounds.
7. **Pillow font loading**: Termux may not have CJK fonts. Script falls back to default font if NotoSansCJK not found.
8. **Infographic style evolution**: User rejected v1 (too plain, too few visuals) and v2 (still too simple). v3 with card layout + colored categories + emoji icons + stats panel is the baseline. v4 adds complete article details (title + summary + source + keywords) and discussion topics with participants + viewpoints. Always use v4 (`newspaper_infographic_v4.py`) for daily digest when complete report is available.
9. **Complete information extraction**: User explicitly corrected: "你首先得把那个每一篇文章的标题和每一篇文章的概要全部都读出来" — MUST extract complete article titles and summaries from WeChat messages. Do NOT truncate or omit articles. Each article MUST have: title, source, summary, keywords.
10. **Chat discussion summarization**: User explicitly corrected: "把每一个人的这个聊天记录也要理解总结出来" — MUST summarize chat discussions into topics with participants and key viewpoints. Do NOT just list raw messages.
11. **Report-first workflow**: User explicitly corrected: "把这个文档扔给信息图的skill,让文档去基于这个文档去生成一个更好的信息图" — ALWAYS generate complete Markdown report first, then use report as input to infographic generation. Do NOT generate infographic directly from raw WeChat messages.
12. **Chinese-only requirement**: User explicitly corrected: "不要用英文" — all infographic text must be Chinese. Title must be "AI AGI 日报" not "AI AGI DAILY". Section names must be Chinese (e.g., "今日文章" not "Today's Articles").
11. **Agentic Media Pipeline sqlite3 issue**: The `scripts/agentic_media_pipeline.py` script uses `subprocess.run(['sqlite3', ...])` which fails on Termux (sqlite3 binary not available). Use manual execution steps documented in `references/agentic-media-pipeline-notes.md` instead.
12. **Content-only rule for image generation**: User explicitly corrected that generated images must ONLY contain actual content from the source data. Do NOT add fictional sections like "1880" dates, "International News", "Editorial", "Advertisement", "Testimony", "Market Briefing", or any section not present in the actual WeChat messages. The prompt must include CRITICAL RULES section that explicitly prohibits fictional content. See `references/agentic-media-pipeline-notes.md` for the corrected prompt template.
11. **Screen wake-up before sending**: Device may be in Dozing state (screen off) when attempting to send images. ALWAYS check `get_lock_status()` before screenshots. If `screen_on: false`, wake device first with `tap(500, 500)` or swipe, then wait 2-3 seconds for UI to settle before proceeding with image sending flow. See `screen-wake` skill for full wake-up sequence.
## Verification
After running, verify:
- [ ] Group name matches user's request
- [ ] Message count seems reasonable for the time period
- [ ] Article URLs are accessible (not 403)
- [ ] Summaries capture the core message, not just surface details