The SKILL.md below is reproduced from
trae-community/trae-skills (commit
4549953) under the
MIT license. The text is unchanged; only the file header metadata is omitted, images are shown as links, and very long files are truncated. Copyright 2026 trae-community-org. License:
LICENSE. Only the instructions file is shown; see the original repository for any scripts.
今日新闻热榜聚合助手
Description
一键获取全网多平台今日热榜/热搜数据,以结构化、美观的格式呈现给用户,帮助快速掌握当日热点动态。
Instructions
步骤1:确认用户需求
- 解析用户输入,判断是否需要特定平台的热榜(如仅微博、仅知乎)还是全平台聚合
- 如果用户未指定平台,默认获取以下6个主流平台的热榜:
- 微博热搜
- 百度热搜
- 知乎热榜
- 头条热榜
- 哔哩哔哩热门
- 抖音热搜
- 如果用户指定了数量(如"给我看 Top 5"),按指定数量输出;否则默认每个平台展示 Top 10
步骤2:获取热榜数据
- 执行
resources/scripts/fetch_news.py 脚本获取实时热榜数据
- 入参:
--platforms(平台列表,逗号分隔)、--top(每个平台返回的条目数)
- 示例调用:
python3 resources/scripts/fetch_news.py --platforms weibo,baidu,zhihu,toutiao,bilibili,douyin --top 10
- 出参:JSON 格式的热榜数据
- 如果脚本执行失败或某个平台数据获取失败:
- 跳过失败的平台,继续获取其他平台数据
- 在输出中标注"[该平台数据暂时不可用]"
- 如果所有平台都失败,告知用户网络异常并建议稍后重试
步骤3:格式化输出
按以下模板输出结果:
# 🔥 今日全网热榜 | {当前日期} {当前时间}
---
## 📱 微博热搜
| 排名 | 热搜话题 | 热度 |
|------|---------|------|
| 🥇 | #话题名称# | 🔥 999万 |
| 🥈 | ... | ... |
| 🥉 | ... | ... |
---
## 🔍 百度热搜
| 排名 | 热搜词 | 热度指数 |
|------|--------|---------|
| 🥇 | 关键词 | 📈 999999 |
---
(其他平台同理)
---
> 📊 数据更新时间:{时间戳}
> 📡 数据来源:微博、百度、知乎、头条、B站、抖音
> ⚠️ 声明:热榜数据来自各平台公开接口,实时变化,仅供参考
View full license text (MIT)
MIT License
Copyright (c) 2026 trae-community-org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.