通过网页抓取获取 GitHub 按日/周/月增长的热门仓库。当用户询问 GitHub 趋势、热门项目、本周热点或「什么在 GitHub 上 trending」时使用。可输出列表或 JSON,无需 API Key。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install github-trending-stable或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install github-trending-stable⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/github-trending-stable/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: github-trending-stable description: "通过网页抓取获取 GitHub 按日/周/月增长的热门仓库。当用户询问 GitHub 趋势、热门项目、本周热点或「什么在 GitHub 上 trending」时使用。可输出列表或 JSON,无需 API Key。" ---
抓取 GitHub 按日/周/月增长的热门仓库,仅使用 Python 标准库,无需安装第三方包。
在技能目录下执行(如 github-trending-stable/):
# 本周趋势(默认),15 条
python scripts/github_trending.py weekly
# 今日趋势,10 条
python scripts/github_trending.py daily --limit 10
# 本周 Python 趋势
python scripts/github_trending.py weekly --language python
# 输出 JSON(便于管道或工具调用)
python scripts/github_trending.py weekly --json
| 参数 | 取值 | 默认 | 说明 | |------|------|------|------| | period | daily, weekly, monthly | weekly | 统计「新增 star」的时间范围 | | --limit | 整数 | 15 | 返回仓库数量上限 | | --language | 字符串 | 全部 | 按语言筛选(见下方) | | --json | 开关 | — | 输出 JSON 而非可读文本 |
语言:可用全称或别名。脚本支持别名:py→python、ts→typescript、js→javascript、cpp/c++→c++、c#/csharp→c#、rs→rust、rb→ruby、go→go。其他按原样传入(如 --language "c")。
full_name、描述(最多 90 字)- 🔧 编程语言 - ⭐ 总 Star 数 - 📈 本周期新增 Star 数
--json){
"period": "weekly",
"updated_at": "2026-03-13T21:00:00+08:00",
"data": [
{
"rank": 1,
"full_name": "owner/repo",
"url": "https://github.com/owner/repo",
"description": "...",
"language": "Python",
"stars_total": "12345",
"stars_gained": 1234
}
]
}
https://github.com/trending(及 .../trending/<语言>?since=<周期>)html.parser.HTMLParser(无需浏览器、无需登录)仅使用 Python 标准库:urllib.request、html.parser、json、argparse、datetime。无需 pip 安装。
| 现象 | 处理建议 | |------|----------| | 返回空列表 / 无仓库 | 可能是网络提前断开(IncompleteRead)。重试;若脚本支持,可改用分块读取。 | | 解析报错 / 结构不对 | GitHub 可能改版了页面结构,需更新脚本选择器或解析逻辑。 | | 超时 | 检查网络;默认超时 15 秒。 | | Windows 控制台 emoji 乱码/报错 | 设置 PYTHONIOENCODING=utf-8 或使用 --json 在别处解析。 |
安装 Github Trending 后,可以对 AI 说这些话来触发它
Help me get started with Github Trending
Explains what Github Trending does, walks through the setup, and runs a quick demo based on your current project
Use Github Trending to get GitHub's top repositories growing by day/week/month via web scr...
Invokes Github Trending with the right parameters and returns the result directly in the conversation
What can I do with Github Trending in my developer & devops workflow?
Lists the top use cases for Github Trending, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/github-trending-stable/ 目录(个人级,所有项目可用),或 .claude/skills/github-trending-stable/(项目级)。重启 AI 客户端后,用 /github-trending-stable 主动调用,或让 AI 根据上下文自动发现并使用。
Github Trending 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Github Trending 可免费安装使用。请查阅仓库了解许可证信息。
通过网页抓取获取 GitHub 按日/周/月增长的热门仓库。当用户询问 GitHub 趋势、热门项目、本周热点或「什么在 GitHub 上 trending」时使用。可输出列表或 JSON,无需 API Key。
Github Trending 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Github Trending
Identifies repetitive steps in your workflow and sets up Github Trending to handle them automatically