Overview
This skill is used to precisely search for news from a specified date across multiple AI news sources, using the Ralph Loop pattern for exhaustive iteration to ensure no blind spots are left.
Core Mechanism (Ralph Loop)
1. Task List (prd.json)
Records the source websites to be crawled and their status.
date: target date, format YYYY-MM-DDkeywords_ref: reference keyword library file path (such asreferences/keywords.md), during search load 10 major categories and 100+ tags for filteringsources: each source containsname,url,status(pending/done/failed),retry_count(max 3)
2. Exit Logic (Goal-Oriented)
- Successful exit: when all
sourcesstatuses aredone, output<promise>COMPLETE</promise>and immediately stop the loop. - Failure tolerance: when a single source fails to crawl, try at most 3 times. If all 3 attempts fail, mark the status as
failed, record the failure reason, and skip that source. - Efficient wrap-up: once all sources have been processed (status is
doneorfailed), immediately generate the final daily report and deliver it; do not force completion of the preset maximum rounds.
Must-Crawl Source List (Sorted by Priority)
| Priority | Source Name | URL | Description |
|---|---|---|---|
| High | AIBase Daily | https://news.aibase.com/zh/daily | Daily AI news summary, must-crawl! Concise content, comprehensive coverage |
| Medium | ITHome AI Channel | https://next.ithome.com/ | Domestic tech news, AI column |
| Medium | 36Kr AI Channel | https://36kr.com/information/AI/ | Venture capital perspective, AI industry reporting |
| Medium | Machine Heart | https://www.jiqizhixin.com/articles | Professional AI media, technical depth |
| Medium | QbitAI | https://www.qbitai.com | AI frontier, product reporting |
Note: AIBase Daily is usually published on the same day, and its content is the same day's news summary, making it the most efficient information source.
Workflow
⚠️ Iron rule: must be started using the Ralph script!
Manual random crawling is prohibited! Must strictly follow the process below:
# 第零步:启动 Ralph Loop(必须执行!)
bash .opencode/skills/searchnews/scripts/ralph/ralph.sh 2026-01-19
The script will automatically initialize prd.json, then the Agent processes them one by one according to the task list.
Step 1: Initialize the task list (completed by the script)
The script will generate the source website list in .opencode/skills/searchnews/scripts/ralph/prd.json , with all initial statuses as pending。AIBase Daily must be placed first and crawled with priority.
Step 2: Exhaustive Loop Search
- Read
prd.jsonsources inpendingstatus. - Each time a source is processed, the prd.json status must be updated(pending → done/failed)。
- Each iteration must write to progress.txt, recording progress and failure reasons.
- Strictly validate the date and keep only content from the target date.
- When crawling fails
retry_count + 1, retry at most 3 times.
Step 2.5: Deep Retrieval (Important!)
Do not only scrape list pages! For important news that has been filtered out, you must go deep into the detail page to scrape:
- Extract the news detail URL from the list page
- Visit each detail page one by one, to obtain the complete content
- Extract key information:
- Complete body text (not a summary)
- Technical details, data metrics
- Original source/paper link
- Highlights/key point summary
- The news quality of in-depth retrieval is far higher than copying and pasting from list pages
Example: The AIBase daily report list page only has titles and brief introductions, but the detail page has complete technical interpretations, data comparisons, highlights, and other in-depth content.
Step 3: Deduplication and aggregation
Merge the same news from different sources, keep the version with the richest details, and merge and label the sources.
Step 4: Output a structured document
Files are stored in dailynews/YYYY-MM-DD/YYYY-MM-DD.md(a separate folder for each day).
Output format template (must be strictly followed!)
---
date: YYYY-MM-DD
type: 新闻日报
tags: [AI新闻, 日报]
---
# AI新闻日报 - YYYY-MM-DD
> 日期校验: 已通过 | 仅包含YYYY-MM-DD发布的新闻 | 已去重
---
## 1. 新闻标题
**分类**: 分类标签 | **来源**: 来源网站 | **时间**: YYYY/M/D HH:MM
一句话摘要,概括新闻核心内容。
**详情**:
- 详情要点1(包含具体数据、指标)
- 详情要点2
- 详情要点3
- 详情要点4(可选)
- 详情要点5(可选)
---
## 2. 下一条新闻标题
...
*数据来源: 来源列表 | 整理时间: YYYY-MM-DD*
Format key points
- Each news item must include: numbered title, category | source | time, summary, detail key points (3-5 items)
- Detail key points must include specific data: amounts, percentages, time nodes, technical metrics, etc.
- Category label reference: AI infrastructure, AI products, investment and financing, robotics, commercialization, AI regulation, industry viewpoints, corporate strategy, AI capabilities, interesting news, etc.
- Time format: precise to the minute (e.g., 2026/1/19 15:28)
- News quantity requirement: organize at least 10-20 news items every day, do not be lazy and scrape only a few!
Step 5: Confirm completion
When all source statuses are done or failed , output:
<promise>COMPLETE</promise>
Quality requirements
- Must use script: you must first execute
ralph.shinitialization, do not scrape randomly by hand! - Status tracking: each time a source is processed, you must update
prd.jsonstatus. - Progress record: each iteration must be written to
progress.txt。 - Must scrape AIBase: The AIBase daily report is a required source, and you must visit it first every time you organize news.
- In-depth retrieval: Do not only scrape list pages! Important news must go deep into the detail page to obtain the complete content.
- Full coverage: You must try all source websites in the list.
- Date iron rule: It is strictly forbidden to mix in news from non-target dates.
- Label mapping: You must label accurately according to the 10 major categories.
- Complete details: include title, summary, 3-5 detail key points, traceability link, and precise time.
- Loop exit: only after all sources are done/failed, output
<promise>COMPLETE</promise>。
⛔ Output iron rule (violation means dismissal!)
News that has been removed is forbidden to be output!
- Only output news that matches the date: the final daily report may only contain news from the target date
- Do not mention removed items: News removed because it does not match the date,forbidden to output or mention anywhere
- Do not show the filtering process: Do not tell the user things like "I filtered out xx items" or "the following were filtered out" and other such nonsense
- Silent filtering: Date validation is internal logic; the user only needs to see the final result and does not need to know what you screened out
- Concise delivery: Output only a clean news list that matches the date, without any extra explanation
Incorrect example (forbidden!):
以下新闻因日期不符已剔除:
- xxx(1月18日)
- yyy(1月20日)
Correct approach: Silently skip news that does not match the date, output only the matching ones, and do not say a single extra word.
Resource references
- scripts/ralph/ralph.sh - Start the main loop.
- scripts/ralph/prd.json - Dynamic task list.
- scripts/ralph/progress.txt - Iteration progress and retry logs.
- references/keywords.md - Map of 10 major categories and 100+ tags.
- templates/ - Video style template library.
Step 6: Generate news video (optional)
After the news daily report is organized, an AI news video can be generated.
6.1 Interaction flow (must ask!)
After receiving the "generate news video" request,you must ask in sequence:
Question 1: Confirm the date
生成哪天的新闻视频?
- 今天 (YYYY-MM-DD)
- 昨天 (YYYY-MM-DD)
- 自定义日期
Question 2: Whether to use a style template
是否使用提示词库中的风格模板?
- 是,使用模板 (推荐) - 从21种预设风格中选择,风格统一
- 否,自由生成 - 不使用模板,AI自由发挥
If "use template" is selected, continue to Question 3; otherwise skip to Question 4
Question 3: Choose a visual style (21 types)
Style prompt library location:{prompts_dir}/图片生成风格/AI新闻早报风格/
选择配图风格:
【科技感】
- 默认风格-Dashboard (推荐) - 科技仪表盘,数据可视化
- 赛博未来风 - 霓虹赛博朋克
- 科技媒体封面风 - 新闻媒体封面感
- AI操作系统界面风 - JARVIS控制台风格
- 深色金融终端风 - Bloomberg终端感
- 全息投影风 - 全息科幻
- 量子科幻风 - 量子粒子效果
【简约风】
- 毛玻璃拟态风 - 苹果风毛玻璃
- 信息图表风 - 数据信息图
- 极简信息设计风 - 扁平极简
【特色风】
- 未来报纸头版 - 报纸版式
- 杂志封面风 - 杂志风格
- 漫画分镜风 - 漫画格子
- 太空宇宙风 - 星空宇宙
- 水墨国风 - 中国风水墨
- 复古像素风 - 8bit像素
- 霓虹波普风 - 波普艺术
- 工程蓝图风 - 技术蓝图
- 自然有机风 - 环保自然
- 未来实验室风 - 实验室科研
- 社交媒体爆款风 - 抖音小红书
Question 4: Generation mode
选择生成模式:
- 完整版(总览+详情)(推荐) - 1张总览图 + N张详情图
- 仅总览 - 只生成1张总览图
- 仅详情 - 只生成N张详情图
Question 5: Number of news items (if more than 10)
日报共有XX条新闻,如何处理?
- 全部生成
- 精选10条 - 自动挑选最重要的
- 精选5条 - 只做头条
6.2 Load and use style templates
Step 1: Read the template file
{prompts_dir}/图片生成风格/AI新闻早报风格/{风格名}.md
Step 2: Extract the "complete prompt template"
Each style file contains ## 完整提示词模板 section; extract the prompt from it.
Step 3: Replace variables
| Variable | Replacement content | Example |
|---|---|---|
{日期} |
Daily report date | January 23, 2026 |
{N} |
Number of news items | 25 |
{新闻列表} |
Numbered + title list | 1. ChatGPT Atlas update... |
Step 4: Generate the overview image
Use the replaced prompt to call image-service:
python .opencode/skills/image-service/scripts/text_to_image.py \
"{替换变量后的完整提示词}" -r 16:9 -o "assets/video/{日期}/00_overview.png"
Step 5: Generate detail images
Generate each news item separately; prompt structure:
AI新闻详情配图 - {风格名}
【新闻标题】{标题}
【新闻要点】
- {要点1}
- {要点2}
- {要点3}
【视觉要求】
- 沿用{风格名}的视觉风格
- 中心突出新闻主题的3D/扁平化插图
- 标题大字清晰,要点用图标化卡片展示
- 底部水印:{your_watermark}
输出尺寸:2560x1440 横版 16:9
6.3 Video generation flow
Directory structure
assets/video/{YYYY-MM-DD}/
├── 00_overview.png # 总览图
├── 01_xxx.png # 详情图1
├── 02_xxx.png # 详情图2
├── ...
├── audio/
│ ├── 00_overview.mp3 # 总览配音
│ ├── 01.mp3 # 详情配音1
│ └── ...
├── video.yaml # 合成配置
└── {日期}_ai_news.mp4 # 最终视频
Generation command
# 1. 创建目录
mkdir -p "assets/video/{日期}/audio"
# 2. 并发生成配图(使用 text_to_image)
python .opencode/skills/image-service/scripts/text_to_image.py \
"{风格提示词}" -r 16:9 -o "assets/video/{日期}/00_overview.png"
# 3. 并发生成配音
python .opencode/skills/video-creator/scripts/tts_generator.py \
--text "{配音文本}" \
--voice zh-CN-YunyangNeural \
--output "assets/video/{日期}/audio/XX.mp3"
# 4. 合成视频
python .opencode/skills/video-creator/scripts/video_maker.py \
assets/video/{日期}/video.yaml
6.4 Voiceover specifications
| Scenario | Text template |
|---|---|
| Overview | "AI morning report, {date}. Today there are {N} major AI industry news items, let's take a look together!" |
| Details | "Item X, {title}. {summary}" |
| Ending | Append "That's all for today's AI morning report, thanks for watching!" to the last item |
Voice selection:
zh-CN-YunyangNeural- Male voice, news broadcast (recommended)zh-CN-YunxiNeural- Male voice, sunny and livelyzh-CN-XiaoxiaoNeural- Female voice, warm and natural
6.5 Video configuration template (video.yaml)
output: {YYYY-MM-DD}_ai_news.mp4
scenes:
- image: 00_overview.png
audio: audio/00_overview.mp3
- image: 01_xxx.png
audio: audio/01.mp3
# ... 依次列出所有场景
6.6 Output after completion
✅ 视频生成完成!
📍 位置:assets/video/{日期}/{日期}_ai_news.mp4
⏱️ 时长:X分X秒
🎬 场景:X个(1总览 + X详情)
🎨 风格:{选择的风格}
是否打开预览?
6.7 Notes
- Concurrent generation: Both image matching and voiceover must be concurrent to improve efficiency
- Watermark: A watermark must be added to the bottom of all matched images
- End credits: Video auto-concatenation with generic ending
- BGM: Automatically add tech-style background music
- Aspect ratio: All images use 16:9 landscape