关于 github-topics
github-topics 用于获取 GitHub 仓库排名和 README 摘要,适合追踪热门项目或查询仓库信息,并可按话题筛选排名。
主要功能
- 01按星标查看仓库排名
- 02按话题查询热门仓库
- 03获取仓库 README 摘要
- 04可选配置 GH_TOKEN
适用场景
- 01查看指定话题的热门项目
- 02快速了解某个仓库的用途
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ geekjourneyx/ mind-skills --skill github-topics安装后在 Claude Code 中输入/github-topics确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
src/__init__.pyconfig.pygithub_fetcher.pyreadme_fetcher.py详细介绍
GitHub Topics Trending
获取 GitHub 话题热门仓库和 README 摘要。
快速开始
# View rankings
今天 claude-code 话题排行榜
Top 10 GitHub 项目
热门仓库
# View repository details
anthropics/claude-code 介绍
这个仓库是做什么的
查询类型
| 类型 | 示例 | 说明 |
|---|---|---|
| 排行榜 | 热门仓库 Top 10 | 按 star 数排列的当前排行榜 |
| 详情 | xxx/xxx 介绍 | 仓库 README 摘要 |
| 话题 | python 话题排行榜 | 自定义话题搜索 |
工作流
- [ ] Step 1: Parse query type
- [ ] Step 2: Fetch data from GitHub
- [ ] Step 3: Format and display results
步骤 1:解析查询类型
| 用户输入 | 查询类型 | 操作 |
|---|---|---|
热门仓库 | rankings | 显示前 N 个仓库 |
Top 10 项目 | rankings | 显示前 N 个仓库 |
xxx/xxx 介绍 | detail | 获取 README 摘要 |
python 话题 | rankings | 搜索 python 话题 |
步骤 2:获取数据
获取排行榜
cd skills/github-topics
python src/github_fetcher.py
要求:
pip install requests
获取 README(可选)
python src/readme_fetcher.py
步骤 3:格式化结果
排行榜输出
# GitHub Trending - python
| # | Repository | Stars | Language |
|---|------------|-------|----------|
| 1 | donnemartin/system-design-primer | 334K | Python |
| 2 | vinta/awesome-python | 281K | Python |
| 3 | project-based-learning | 257K | - |
详情输出
# anthropics/claude-code
**Stars**: 15.2K
**Language**: TypeScript
**URL**: https://github.com/anthropics/claude-code
## README Summary
Official Claude Code CLI for AI-powered software development. Claude Code is Anthropic's official CLI tool...
配置
| 变量 | 说明 | 默认值 |
|---|---|---|
GH_TOKEN | GitHub 个人访问令牌(可选,用于提高速率限制) | - |
TOPIC | 要跟踪的 GitHub 话题 | claude-code |
注意:GH_TOKEN 为可选,但推荐设置:
- 有令牌:每小时 5,000 次请求
- 无令牌:每小时 60 次请求
在以下地址创建令牌:https://github.com/settings/tokens
GitHub API 说明
| 限制类型 | 速率 |
|---|---|
| 已认证 | 每小时 5,000 次请求 |
| 未认证 | 每小时 60 次请求 |
建议:使用 GH_TOKEN 以获得更高的速率限制。
故障排查
| 问题 | 解决方案 |
|---|---|
| 速率限制 | 设置 GH_TOKEN 环境变量 |
| 网络超时 | 检查网络连接 |
| 结果为空 | 检查话题名称是否存在 |
命令行参考
# Fetch rankings (default topic: claude-code)
python skills/github-topics/src/github_fetcher.py
# Fetch README
python skills/github-topics/src/readme_fetcher.py
评论
支持 Markdown