News Aggregator Skill
Fetch real-time hot news from multiple sources.
Tools
fetch_news.py
Usage:
CODEBLOCK0 bash
Global Scan (Option 12) - Broad Fetch Strategy
NOTE: This strategy is specifically for the "Global Scan" scenario where we want to catch all trends.
CODEBLOCK1
Single Source & Combinations (Smart Keyword Expansion)
CRITICAL: You MUST automatically expand the user's simple keywords to cover the entire domain field.
- * User: "AI" -> Agent uses: INLINECODE0
- User: "Android" -> Agent uses: INLINECODE1
- User: "Finance" -> Agent uses: INLINECODE2
CODEBLOCK2
Specific Keyword Search
Only use
--keyword for very specific, unique terms (e.g., "DeepSeek", "OpenAI").
CODEBLOCK3
Arguments:
- -
--source: One of hackernews, weibo, github, 36kr, producthunt, v2ex, tencent, wallstreetcn, all. - INLINECODE14 : Max items per source (default 10).
- INLINECODE15 : Comma-separated filters (e.g. "AI,GPT").
- INLINECODE16 : [NEW] Enable deep fetching. Downloads and extracts the main text content of the articles.
Output:
JSON array. If --deep is used, items will contain a content field associated with the article text.
Interactive Menu
When the user says "news-aggregator-skill 如意如意" (or similar "menu/help" triggers):
- 1. READ the content of
templates.md in the skill directory. - DISPLAY the list of available commands to the user exactly as they appear in the file.
- GUIDE the user to select a number or copy the command to execute.
Smart Time Filtering & Reporting (CRITICAL)
If the user requests a specific time window (e.g., "past X hours") and the results are sparse (< 5 items):
- 1. Prioritize User Window: First, list all items that strictly fall within the user's requested time (Time < X).
- Smart Fill: If the list is short, you MUST include high-value/high-heat items from a wider range (e.g. past 24h) to ensure the report provides at least 5 meaningful insights.
- Annotation: Clearly mark these older items (e.g., "⚠️ 18h ago", "🔥 24h Hot") so the user knows they are supplementary.
- High Value: Always prioritize "SOTA", "Major Release", or "High Heat" items even if they slightly exceed the time window.
- GitHub Trending Exception: For purely list-based sources like GitHub Trending, strictly return the valid items from the fetched list (e.g. Top 10). List ALL fetched items. Do NOT perform "Smart Fill".
*
Deep Analysis (Required): For EACH item, you
MUST leverage your AI capabilities to analyze:
*
Core Value (核心价值): What specific problem does it solve? Why is it trending?
*
Inspiration (启发思考): What technical or product insights can be drawn?
*
Scenarios (场景标签): 3-5 keywords (e.g.
#RAG #LocalFirst #Rust).
6. Response Guidelines (CRITICAL)
Format & Style:
- - Language: Simplified Chinese (简体中文).
- Style: Magazine/Newsletter style (e.g., "The Economist" or "Morning Brew" vibe). Professional, concise, yet engaging.
- Structure:
-
Global Headlines: Top 3-5 most critical stories across all domains.
-
Tech & AI: Specific section for AI, LLM, and Tech items.
-
Finance / Social: Other strong categories if relevant.
-
Title:
MUST be a Markdown Link to the original URL.
- ✅ Correct:
### 1. [OpenAI Releases GPT-5](https://...)
- ❌ Incorrect:
### 1. OpenAI Releases GPT-5
-
Metadata Line: Must include Source,
Time/Date, and Heat/Score.
-
1-Liner Summary: A punchy, "so what?" summary.
-
Deep Interpretation (Bulleted): 2-3 bullet points explaining
why this matters, technical details, or context. (Required for "Deep Scan").
Output Artifact:
- - Always save the full report to
reports/ directory with a timestamped filename (e.g., reports/hn_news_YYYYMMDD_HHMM.md). - Present the full report content to the user in the chat.
新闻聚合技能
从多个来源获取实时热门新闻。
工具
fetch_news.py
使用方法:
bash
单一来源(限制10条)
bash
全局扫描(选项12)- 广泛抓取策略
注意:此策略专门用于全局扫描场景,旨在捕捉所有趋势。
bash
1. 广泛抓取(大规模池用于语义过滤)
python3 scripts/fetch_news.py --source all --limit 15 --deep
2. 语义过滤:
代理手动从广泛列表(约120项)中筛选用户关注的主题。
单一来源及组合(智能关键词扩展)
关键:你必须自动将用户的简单关键词扩展至覆盖整个领域范围。
- * 用户:AI -> 代理使用:--keyword AI,LLM,GPT,Claude,Generative,Machine Learning,RAG,Agent
- 用户:Android -> 代理使用:--keyword Android,Kotlin,Google,Mobile,App
- 用户:金融 -> 代理使用:--keyword Finance,Stock,Market,Economy,Crypto,Gold
bash
示例:用户要求来自HN的AI新闻(注意扩展后的关键词)
python3 scripts/fetch_news.py --source hackernews --limit 20 --keyword AI,LLM,GPT,DeepSeek,Agent --deep
特定关键词搜索
仅对非常具体、独特的术语使用 --keyword(例如DeepSeek、OpenAI)。
bash
python3 scripts/fetch_news.py --source all --limit 10 --keyword DeepSeek --deep
参数:
- - --source:可选值包括 hackernews、weibo、github、36kr、producthunt、v2ex、tencent、wallstreetcn、all。
- --limit:每个来源的最大条目数(默认10)。
- --keyword:逗号分隔的过滤器(例如AI,GPT)。
- --deep:[新增] 启用深度抓取。下载并提取文章的主要文本内容。
输出:
JSON数组。如果使用了 --deep,条目将包含与文章文本关联的 content 字段。
交互式菜单
当用户说 news-aggregator-skill 如意如意(或类似的菜单/帮助触发词)时:
- 1. 读取技能目录中 templates.md 的内容。
- 显示文件中出现的可用命令列表给用户。
- 引导用户选择一个数字或复制命令来执行。
智能时间过滤与报告(关键)
如果用户请求特定的时间窗口(例如过去X小时)且结果稀疏(< 5条):
- 1. 优先用户窗口:首先,列出所有严格在用户请求时间内的条目(时间 < X)。
- 智能填充:如果列表较短,你必须从更广的范围(例如过去24小时)中包含高价值/高热度的条目,以确保报告至少提供5个有意义的洞察。
- 标注:清晰标记这些较旧的条目(例如⚠️ 18小时前、🔥 24小时热点),以便用户知道它们是补充内容。
- 高价值:始终优先考虑SOTA、重大发布或高热度条目,即使它们略微超出时间窗口。
- GitHub趋势例外:对于像 GitHub趋势 这样纯粹基于列表的来源,严格返回抓取列表中的有效条目(例如前10名)。列出所有抓取的条目。不要执行智能填充。
*
深度分析(必需):对于每个条目,你
必须利用你的AI能力进行分析:
*
核心价值:它解决了什么具体问题?为什么它成为趋势?
*
启发思考:可以得出哪些技术或产品洞察?
*
场景标签:3-5个关键词(例如 #RAG #LocalFirst #Rust)。
6. 回复指南(关键)
格式与风格:
- - 语言:简体中文。
- 风格:杂志/通讯风格(例如经济学人或晨报氛围)。专业、简洁且引人入胜。
- 结构:
-
全球头条:跨领域最重要的3-5条新闻。
-
科技与AI:专门针对AI、LLM和科技条目的部分。
-
金融/社会:其他相关强类别。
-
标题:
必须是一个指向原始URL的Markdown链接。
- ✅ 正确:### 1.
OpenAI发布GPT-5
- ❌ 错误:### 1. OpenAI发布GPT-5
-
元数据行:必须包含来源、
时间/日期和热度/评分。
-
一句话摘要:一个有力的、那又怎样?的总结。
-
深度解读(要点式):2-3个要点,解释
为什么这很重要、技术细节或背景信息。(深度扫描必需)。
输出产物:
- - 始终将完整报告保存到 reports/ 目录,文件名包含时间戳(例如 reports/hnnewsYYYYMMDD_HHMM.md)。
- 在聊天中向用户呈现完整的报告内容。