GitHub Topics Trending
Fetch GitHub topic trending repositories and README summaries.
Quick Start
CODEBLOCK0
Query Types
| Type | Examples | Description |
|---|
| Rankings | INLINECODE0 INLINECODE1 | Current rankings by stars |
| Detail |
xxx/xxx 介绍 | Repository README summary |
| Topic |
python 话题排行榜 | Custom topic search |
Workflow
CODEBLOCK1
Step 1: Parse Query Type
| User Input | Query Type | Action |
|---|
| INLINECODE4 | rankings | Show top N repos |
| INLINECODE5 |
rankings | Show top N repos |
|
xxx/xxx 介绍 | detail | Get README summary |
|
python 话题 | rankings | Search python topic |
Step 2: Fetch Data
Fetch Rankings
CODEBLOCK2
Requirements:
CODEBLOCK3
Fetch README (Optional)
CODEBLOCK4
Step 3: Format Results
Rankings Output
CODEBLOCK5
Detail Output
CODEBLOCK6
Configuration
| Variable | Description | Default |
|---|
| INLINECODE8 | GitHub Personal Access Token (optional, for higher rate limits) | - |
| INLINECODE9 |
GitHub topic to track |
claude-code |
Note: GH_TOKEN is optional but recommended:
- - With token: 5,000 requests/hour
- Without token: 60 requests/hour
Create token at: https://github.com/settings/tokens
GitHub API Notes
| Limit Type | Rate |
|---|
| Authenticated | 5,000 requests/hour |
| Unauthenticated |
60 requests/hour |
Recommendation: Use GH_TOKEN for higher rate limits.
Troubleshooting
| Issue | Solution |
|---|
| Rate limit | Set GH_TOKEN env var |
| Network timeout |
Check internet connection |
| Empty results | Check topic name exists |
CLI Reference
CODEBLOCK7
GitHub 话题趋势
获取 GitHub 话题趋势仓库和 README 摘要。
快速开始
查看排行榜
今天 claude-code 话题排行榜
Top 10 GitHub 项目
热门仓库
查看仓库详情
anthropics/claude-code 介绍
这个仓库是做什么的
查询类型
| 类型 | 示例 | 描述 |
|---|
| 排行榜 | 热门仓库 Top 10 | 按星标数当前排名 |
| 详情 |
xxx/xxx 介绍 | 仓库 README 摘要 |
| 话题 | python 话题排行榜 | 自定义话题搜索 |
工作流程
- - [ ] 步骤 1:解析查询类型
- [ ] 步骤 2:从 GitHub 获取数据
- [ ] 步骤 3:格式化并显示结果
步骤 1:解析查询类型
| 用户输入 | 查询类型 | 操作 |
|---|
| 热门仓库 | 排行榜 | 显示前 N 个仓库 |
| Top 10 项目 |
排行榜 | 显示前 N 个仓库 |
| xxx/xxx 介绍 | 详情 | 获取 README 摘要 |
| python 话题 | 排行榜 | 搜索 python 话题 |
步骤 2:获取数据
获取排行榜
bash
cd skills/github-topics
python src/github_fetcher.py
依赖要求:
bash
pip install requests
获取 README(可选)
bash
python src/readme_fetcher.py
步骤 3:格式化结果
排行榜输出
markdown
GitHub 趋势 - python
| # | 仓库 | 星标数 | 语言 |
|---|
| 1 | donnemartin/system-design-primer | 334K | Python |
| 2 |
vinta/awesome-python | 281K | Python |
| 3 | project-based-learning | 257K | - |
详情输出
markdown
anthropics/claude-code
星标数:15.2K
语言:TypeScript
URL:https://github.com/anthropics/claude-code
README 摘要
官方 Claude Code CLI,用于 AI 驱动的软件开发。Claude Code 是 Anthropic 的官方 CLI 工具...
配置
| 变量 | 描述 | 默认值 |
|---|
| GH_TOKEN | GitHub 个人访问令牌(可选,用于更高速率限制) | - |
| TOPIC |
要跟踪的 GitHub 话题 | claude-code |
注意:GH_TOKEN 是可选的,但建议使用:
- - 有令牌:5,000 次请求/小时
- 无令牌:60 次请求/小时
在以下位置创建令牌:https://github.com/settings/tokens
GitHub API 说明
60 次请求/小时 |
建议:使用 GH_TOKEN 以获得更高速率限制。
故障排除
| 问题 | 解决方案 |
|---|
| 速率限制 | 设置 GH_TOKEN 环境变量 |
| 网络超时 |
检查网络连接 |
| 结果为空 | 检查话题名称是否存在 |
CLI 参考
bash
获取排行榜(默认话题:claude-code)
python skills/github-topics/src/github_fetcher.py
获取 README
python skills/github-topics/src/readme_fetcher.py