GitHub Trending查看、项目搜索、Star/Fork/Watch操作、Issues管理、Pull Request操作、代码内容获取、评论管理等完整助手。当用户需要查看GitHub Trending排行榜、搜索GitHub项目、对仓库进行操作、管理Issues/PR、获取代码内容时使用此技能。
🌐 默认输出语言:中文 除非用户明确要求使用其他语言,所有回复、Trending 展示、搜索结果、操作反馈均使用中文。 项目描述、贡献者用户名、仓库名等原始英文内容保持不变。
通过 GitHub REST API + Playwright 浏览器双模式,提供 GitHub Trending、搜索、仓库操作、Issues/PR管理、代码内容获取等完整能力。
bash
cd <skill-dir>/scripts
pip install -r requirements.txt
安装浏览器引擎(仅浏览器模式需要)
bash
python3 install_browser.py
脚本功能:
bash
python3 -m playwright install chromium
Playwright 支持通过环境变量 PLAYWRIGHT_DOWNLOAD_HOST 设置浏览器下载镜像源。
Mac/Linux:
bash
# 使用淘宝镜像(推荐)
PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright python3 -m playwright install chromium
# 或使用清华大学镜像
PLAYWRIGHT_DOWNLOAD_HOST=https://mirrors.tuna.tsinghua.edu.cn/playwright python3 -m playwright install chromium
Windows (PowerShell):
powershell
$env:PLAYWRIGHT_DOWNLOAD_HOST="https://npmmirror.com/mirrors/playwright"
python -m playwright install chromium
Windows (CMD):
cmd
set PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright
python -m playwright install chromium
常用镜像源:
https://npmmirror.com/mirrors/playwrighthttps://mirrors.tuna.tsinghua.edu.cn/playwrighthttps://mirrors.huaweicloud.com/playwright告诉用户:"我来帮你打开浏览器登录 GitHub,请在弹出的窗口中手动输入账号密码完成登录。"
执行步骤:
python3 github_login.py browser注意:浏览器模式仅用于 Trending 页面抓取。API操作(Star/Fork/Watch)仍需 Token。
支持两种 Token 类型: Fine-grained PAT(推荐)或 Classic PAT
选项 1:Fine-grained Personal Access Token(推荐)
更安全的权限控制,可为每个仓库单独配置权限。
打开设置页面
生成新 Token
配置权限(重要!)
Repository permissions(仓库权限)- 全部设置为 Read and Write: 权限用途Actions读取工作流运行状态Administration读取仓库管理信息Checks读取检查运行状态Commit statuses读取提交状态Contents读取/创建/更新/删除文件Dependabot alerts读取安全警报Deployments读取部署信息Discussions读取/创建讨论(如需要)Environments读取环境信息Issues读取/创建/更新/关闭 IssuesMetadata读取基础仓库信息(必需)Packages读取包信息Pages读取 GitHub Pages 信息Pull requests读取/合并/审查 PRRepository security advisories读取安全公告Secret scanning alerts读取密钥扫描警报Workflows读取工作流 Account permissions(账户权限):
选择仓库访问范围
生成并保存 Token
python3 github_login.py token <TOKEN>选项 2:Classic Personal Access Token
传统的 Token 类型,使用 scopes 权限模型。
打开设置页面
生成新 Token
选择 Scopes(权限范围)
必需 Scopes:
Scope用途repo完全控制私有仓库(包含所有仓库操作)public_repo访问公共仓库
推荐 Scopes(根据需要使用):
Scope用途workflow更新 GitHub Actions 工作流文件read:org读取组织成员信息read:user读取用户资料信息read:discussion读取团队讨论
生成并保存 Token
python3 github_login.py token <TOKEN>Token 类型对比:
特性Fine-grained PATClassic PAT权限粒度按仓库、按权限细粒度控制全局 scopes安全性更高,可限制访问范围较低,全局权限组织仓库需要组织管理员批准直接可用推荐度⭐⭐⭐⭐⭐⭐⭐⭐适用场景生产环境、团队协作个人使用、快速测试
运行 python3 github_login.py check 查看当前登录状态。
触发词: trending、热门、排行榜、最火
参数值sincedaily(默认)/ weekly / monthlylanguagepython / javascript / go / rust 等(可选)
Agent 执行流程:
⚠️ 必须使用浏览器模式 以获取完整数据(含贡献者和期间Star数)。 API 模式仅作为 fallback,不包含
built_by和period_stars。
bash
# 浏览器模式(推荐,自动滚动获取所有项目)
python3 github_trending.py daily "" browser # 今日所有Trending项目
python3 github_trending.py weekly python browser # 本周Python所有Trending项目
python3 github_trending.py monthly "" browser # 本月所有Trending项目
💡 自动加载所有项目:脚本会自动滚动页面,加载 当日/当周/当月的所有 Trending 项目(不仅仅是首页显示的),直到没有新项目加载为止。
🔴 重要:所有 Trending 输出 必须严格遵循以下格式模板,不得自行创造其他格式。 这是本 Skill 的标准输出规范,确保一致性和可读性。
默认行为:Agent 在输出 Trending 项目时, 必须严格按照下方「标准输出模板」的格式输出,包括:
- 标题格式和日期
- 热榜概览结构
- 每个仓库的详解格式(含深度解读)
- 今日洞察部分
除非用户明确提出了额外的格式要求或特殊指令,否则必须完全按照模板输出,不得:
- 省略任何部分
- 更改输出格式
- 使用 Markdown 表格(IM 聊天平台禁止使用)
- 简化或合并内容
新模板结构:
标准输出模板(IM聊天平台,不使用Markdown表格):
text
🔥 GitHub 今日 Trending (2026-04-02)
📊 今日热榜概览
• 总上榜仓库数:8个
• 最大热点:anthropics/claude-code 正式发布,单日 +8,764 ⭐ 爆棚!
• AI 编程 Agent 双雄:Claude Code + OpenAI Codex 同日霸榜
• 热门语言:Python 领跑(5/8),Shell/Rust/JavaScript 跟进
• 数据来源:GitHub Trending 页面(browser 模式)
━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 Trending 仓库详解
━━━━━━━━━━━━━━━━━━━━━━━━━
1. anthropics/claude-code ⭐ 105,566
⭐ Stars: 105,566 | 🍴 Forks: 16,781 | 💻 语言: Shell | 📅 今日上榜
🔗 项目链接: https://github.com/anthropics/claude-code
📝 项目简介:
一款运行在终端中的智能编程工具,能理解你的代码库,通过自然语言命令帮你更快写代码——执行常规任务、解释复杂代码、处理 Git 工作流。
🔍 深度解读:
• 项目定位:Anthropic 官方推出的 AI 编程 Agent 终端工具,Claude Code 正式开源仓库
• 核心功能:终端内 AI 编程助手,代码理解、自动修改、Git 操作全自然语言驱动
• 为何火爆:Claude Code 此前为闭源工具,社区高度关注。今日 +8,764 星标创近期绝对记录,表明开发者对官方开源的热情极高
• 适用场景:所有日常编程开发工作,尤其是需要频繁操作 Git 和代码审查的场景
• 推荐指数:⭐⭐⭐⭐⭐(今日无可争议的第一名)
━━━━━━━━━━━━━━━━━━━━━━━━━
2. openai/codex ⭐ 72,448
⭐ Stars: 72,448 | 🍴 Forks: 10,140 | 💻 语言: Rust | 📅 今日上榜
🔗 项目链接: https://github.com/openai/codex
📝 项目简介:
一款运行在终端中的轻量级编程 Agent。
🔍 深度解读:
• 项目定位:OpenAI 官方的终端编程 Agent,Claude Code 的直接竞争对手
• 核心功能:用 Rust 编写的高性能终端 AI 助手,聚焦轻量和速度
• 为何火爆:与 Claude Code 同日上榜,AI 编程 Agent 赛道竞争白热化的标志
• 适用场景:偏好 OpenAI 生态、追求极致性能的终端编程开发者
• 推荐指数:⭐⭐⭐⭐⭐
━━━━━━━━━━━━━━━━━━━━━━━━━
3. microsoft/VibeVoice ⭐ 34,994
⭐ Stars: 34,994 | 🍴 Forks: 3,977 | 💻 语言: Python | 📅 今日上榜
🔗 项目链接: https://github.com/microsoft/VibeVoice
📝 项目简介:
微软开源的前沿语音 AI 项目。
🔍 深度解读:
• 项目定位:微软出品的开源语音 AI 框架,持续霸榜多日
• 核心功能:前沿语音合成、语音识别能力,面向研究者和开发者
• 为何火爆:微软品牌背书 + 语音 AI 赛道持续升温,连续多日上榜说明热度不减
• 适用场景:语音助手开发、语音 AI 研究、多模态应用
• 推荐指数:⭐⭐⭐⭐
━━━━━━━━━━━━━━━━━━━━━━━━━
💡 今日洞察
🎯 核心主题:AI 编程 Agent 正式进入「双雄时代」
今日 Trending 最大看点是 anthropics/claude-code 和 openai/codex 首次同日上榜:
• Anthropic Claude Code 今日 +8,764 ⭐,创近期单日最高纪录,官方开源引爆社区
• OpenAI Codex 以 +1,416 ⭐ 紧随其后,Rust 实现主打轻量高性能
• 两家 AI 巨头在同一赛道正面交锋,标志着 AI 编程工具从萌芽期进入全面竞争阶段
📈 三大趋势信号:
1️⃣ AI 编程工具全面开源化:Claude Code 官方仓库今日上榜,加上此前社区的逆向工程和 Python 重写版本,整个生态正在从闭源走向开放
2️⃣ AI 基础模型领域扩展加速:google-research/timesfm 将基础模型从 NLP/CV 扩展到时间序列,预示更多垂直领域基础模型将涌现
3️⃣ 语音 AI 持续火热:microsoft/VibeVoice 连续多日上榜,语音作为 AI 交互的重要入口正在被各大厂商押注
🔧 实用推荐:
• 如果你在用 Claude Code → claude-howto 配套教程值得收藏
• 如果你在做时间序列 → google-research/timesfm 是官方优选
• 如果你在做 OCR → zai-org/GLM-OCR 新晋选手值得关注
📡 数据来源:GitHub Trending (browser) | 下次推送:2026-04-03 22:00 CST
关键规则(⚠️ 必须严格遵守):
🔴 所有输出必须严格遵循上述模板格式,不得使用Markdown表格或其他格式。 这是本 Skill 的唯一标准输出规范。
每个项目之间用 ━━━━━━━━━━━━━━━━━━━━━━━━━ 分隔,提升可读性
仓库信息必须包含:名称、链接、描述、语言、Star/Fork、贡献者、新增 Star
每个仓库必须有 🔍 深度解读 部分,包含:
输出末尾必须有 💡 今日洞察 部分,包含:
所有标签使用中文
since 参数映射:每日→daily、每周→weekly、每月→monthly
输出标题使用中文并带日期
触发词: 搜索、查找、search
bash
python3 github_search.py repos "机器学习" 10 # 搜索仓库
python3 github_search.py repos "stars:>10000 language:python"
python3 github_search.py users "octocat" # 搜索用户
python3 github_search.py info microsoft vscode # 查看仓库详情
输出格式:
text
🔍 搜索结果:「关键词」(共 xxx 个)
1. owner/repo
🔗 https://github.com/owner/repo
📝 项目描述...
🔤 Python | ⭐ 12,345 | 🍴 1,234 | Updated: 2024-xx-xx
触发词: star、fork、watch、unwatch、取消关注
⚠️ 需要 Token 登录 或 浏览器模式登录
bash
python3 github_operations.py star microsoft/vscode
python3 github_operations.py unstar owner/repo
python3 github_operations.py fork owner/repo
python3 github_operations.py watch owner/repo
python3 github_operations.py unwatch owner/repo
python3 github_operations.py info owner/repo # 获取仓库信息
python3 github_operations.py starred # 列出已star的仓库
操作反馈:
text
⭐ 已收藏: microsoft/vscode
🍴 已克隆: owner/repo → your-username/repo
👁️ 已关注: owner/repo
触发词: issue、问题、缺陷、bug
⚠️ 需要 Token 登录,权限:Issues (Read and Write)
bash
# 列出 Issues
python3 github_operations.py issues microsoft/vscode open # open/closed/all
python3 github_operations.py issue microsoft/vscode 1234 # 获取指定 Issue
# 创建 Issue
python3 github_operations.py create-issue owner/repo "Bug标题" "详细描述"
# 关闭/重新打开 Issue
python3 github_operations.py close-issue owner/repo 1234
python3 github_operations.py reopen-issue owner/repo 1234
触发词: pr、pull request、合并请求
⚠️ 需要 Token 登录,权限:Pull requests (Read and Write)
bash
# 列出 PRs
python3 github_operations.py prs microsoft/vscode open # open/closed/all
python3 github_operations.py pr microsoft/vscode 1234 # 获取指定 PR
# 创建 PR
python3 github_operations.py create-pr owner/repo "PR标题" feature-branch main ["描述"]
# 关闭/重新打开 PR
python3 github_operations.py close-pr owner/repo 1234
python3 github_operations.py reopen-pr owner/repo 1234
# 合并 PR
python3 github_operations.py merge-pr owner/repo 1234 "合并标题"
# 审查 PR
python3 github_operations.py approve-pr owner/repo 1234 "LGTM!"
# PR 详情
python3 github_operations.py pr-files owner/repo 1234 # 列出修改的文件
python3 github_operations.py pr-commits owner/repo 1234 # 列出提交记录
python3 github_operations.py pr-reviews owner/repo 1234 # 列出审查记录
触发词: 代码、文件、内容、readme
⚠️ 需要 Token 登录,权限:Contents (Read)
bash
# 获取文件内容
python3 github_operations.py file owner/repo path/to/file.py [分支/标签]
# 获取 README
python3 github_operations.py readme owner/repo [分支/标签]
# 列出目录
python3 github_operations.py ls owner/repo [path] [分支/标签]
# 创建/更新文件(需要 Contents Write 权限)
python3 github_operations.py create-file owner/repo "path/file.py" "提交信息" "文件内容"
触发词: 评论、comment
⚠️ 需要 Token 登录,权限:Issues (Write) 或 Pull requests (Write)
bash
# Issue 评论
python3 github_operations.py comments owner/repo 1234 # 列出评论
python3 github_operations.py comment owner/repo 1234 "评论内容"
触发词: 用户、user、followers、关注
⚠️ 需要 Token 登录,部分操作需要 user 权限
bash
# 获取用户信息
python3 github_operations.py user # 当前登录用户
python3 github_operations.py user torvalds # 指定用户
# 列出用户的仓库
python3 github_operations.py my-repos owner # 当前用户的仓库
python3 github_operations.py user-repos torvalds # 指定用户的仓库
# 粉丝和关注
python3 github_operations.py followers # 当前用户的粉丝
python3 github_operations.py following # 当前用户关注的人
python3 github_operations.py follow username # 关注用户
python3 github_operations.py unfollow username # 取消关注
触发词: 创建仓库、create repo
⚠️ 需要 Token 登录,权限:Contents (Write)
bash
# 创建新仓库
python3 github_operations.py create-repo my-new-repo "仓库描述"
# 列出仓库的 Forks
python3 github_operations.py forks owner/repo
# 列出 Stargazers
python3 github_operations.py stargazers owner/repo
触发词: 分支、branch
⚠️ 需要 Token 登录,创建分支需要 Contents (Write)
bash
# 列出分支
python3 github_operations.py branches owner/repo
# 获取分支信息
python3 github_operations.py branch owner/repo main
# 创建分支
python3 github_operations.py create-branch owner/repo new-branch main
触发词: release、发布
⚠️ 需要 Token 登录,创建需要 Contents (Write)
bash
# 列出 Releases
python3 github_operations.py releases owner/repo
# 获取指定 Release
python3 github_operations.py release owner/repo <release_id>
# 创建 Release
python3 github_operations.py create-release owner/repo v1.0.0 "Release名称" "发布说明"
触发词: workflow、工作流、actions
⚠️ 需要 Token 登录,权限:Actions (Read)、Contents (Read/Write)
bash
# 列出工作流运行
python3 github_operations.py workflows owner/repo
# 获取指定工作流
python3 github_operations.py workflow owner/repo <workflow_id>
# 触发工作流
python3 github_operations.py trigger-workflow owner/repo ci.yml main
触发词: label、标签
⚠️ 需要 Token 登录,权限:Issues (Write)
bash
# 列出 Issue 标签
python3 github_operations.py labels owner/repo 1234
# 添加标签
python3 github_operations.py add-labels owner/repo 1234 bug priority
# 锁定/解锁 Issue
python3 github_operations.py lock-issue owner/repo 1234 "off-topic"
python3 github_operations.py unlock-issue owner/repo 1234
触发词: 通知、notification
⚠️ 需要 Token 登录,权限:Notifications
bash
# 列出通知
python3 github_operations.py notifications # 未读通知
python3 github_operations.py notifications --all # 所有通知
# 仓库通知
python3 github_operations.py repo-notifications owner/repo
# 标记已读
python3 github_operations.py mark-read <thread_id>
触发词: 组织、org
bash
# 列出当前用户的组织
python3 github_operations.py orgs
# 获取组织信息
python3 github_operations.py org github
# 列出组织仓库
python3 github_operations.py org-repos github
# 列出组织成员
python3 github_operations.py org-members github
bash
# 查看提交历史
python3 github_operations.py commits owner/repo [文件路径]
# 检查登录状态
python3 github_operations.py check
# 查看 API 限流
python3 github_operations.py rate-limit
触发词: 贡献图、insights、流量、网络图、blame、设置页面、探索、marketplace
⚠️ 这些功能 GitHub REST API 不支持,需要通过浏览器自动化实现 浏览器操作过程可见,操作结束后浏览器保持打开,用户可继续手动操作
bash
# 用户相关(API 不支持)
python3 github_browser_ops.py contributions torvalds # 查看贡献图
python3 github_browser_ops.py activity torvalds # 查看活动时间线
python3 github_browser_ops.py stars torvalds # 查看 Star 列表页面
python3 github_browser_ops.py followers torvalds # 查看粉丝列表页面
python3 github_browser_ops.py sponsors torvalds # 查看赞助页面
# 仓库 Insights(需要 push 权限)
python3 github_browser_ops.py insights owner/repo # Pulse 概览
python3 github_browser_ops.py traffic owner/repo # 流量统计
python3 github_browser_ops.py network owner/repo # Fork 网络图
python3 github_browser_ops.py dependents owner/repo # 依赖者列表
# 代码相关
python3 github_browser_ops.py blame owner/repo path/file.py # Git Blame
python3 github_browser_ops.py history owner/repo path/file.py # 文件提交历史
python3 github_browser_ops.py compare owner/repo main dev # 分支比较
python3 github_browser_ops.py codesearch owner/repo "keyword" # 仓库内代码搜索
# 设置页面
python3 github_browser_ops.py settings # 用户设置
python3 github_browser_ops.py settings owner/repo # 仓库设置
# 导航
python3 github_browser_ops.py notifications # 通知页面
python3 github_browser_ops.py explore # Explore 页面
python3 github_browser_ops.py marketplace # Marketplace
python3 github_browser_ops.py search "query" # GitHub 搜索
python3 github_browser_ops.py goto "https://..." # 导航到指定 URL
# 浏览器控制
python3 github_browser_ops.py close # 关闭浏览器
操作反馈:
text
🌐 正在导航到: https://github.com/torvalds
📋 查看用户 @torvalds 的个人资料
✅ 页面加载完成: https://github.com/torvalds
💡 浏览器保持打开,您可以继续手动操作。
浏览器将保持打开状态,您可以继续手动操作。
如需关闭浏览器,请运行: python3 github_browser_ops.py close
当需要使用 Playwright 浏览器(browser_* 工具)时,遵循以下流程:
URL 格式:
https://github.com/trending?since={daily|weekly|monthly}https://github.com/trending/{language}?since={daily|weekly|monthly}页面 CSS 选择器映射:
数据项选择器 / 提取方式仓库名article h2 a → href 去掉前导 /描述article p → innerText语言article [itemprop="programmingLanguage"] → innerText总Starsarticle a[href*="/stargazers"] → innerTextForksarticle a[href*="/forks"] → innerText贡献者article a 中 textContent 以 @ 开头的链接期间Stars正则匹配 innerText: (\d[\d,]*) stars (today|this week|this month)
text
1. 导航到 https://github.com/{owner}/{repo}
2. 找到 "Star" 按钮(已登录状态)
3. 点击 Star
4. 确认按钮变为 "Starred"
text
1. 导航到 https://github.com/{owner}/{repo}
2. 找到 "Watch" 下拉按钮
3. 选择 "Custom" → "Issues, Pull Requests" 等
4. 确认已变为 "Watching"
操作所需权限权限级别Trending 查看无需登录-项目搜索无需登录-Star/UnstarToken-ForkToken-Watch/UnwatchTokenMetadata (Read)查看仓库信息TokenMetadata (Read)创建仓库TokenContents (Write)列出 IssuesTokenIssues (Read)创建/关闭 IssueTokenIssues (Write)Issue LabelsTokenIssues (Write)锁定 IssueTokenIssues (Write)列出 PRsTokenPull requests (Read)创建/关闭 PRTokenPull requests (Write)合并 PRTokenPull requests (Write)PR 审查TokenPull requests (Write)获取文件内容TokenContents (Read)创建/更新文件TokenContents (Write)分支管理TokenContents (Write)Release 管理TokenContents (Write)查看 ActionsTokenActions (Read)触发工作流TokenContents (Write)用户信息Token-关注用户Tokenuser:follow通知TokenNotifications组织信息Tokenread:org
text
github-assistant/
├── SKILL.md ← 你正在读的文件
├── README.md ← GitHub项目介绍
├── LICENSE ← MIT 许可证
├── scripts/
│ ├── github_trending.py ← Trending抓取(浏览器模式)
│ ├── github_search.py ← 项目搜索
│ ├── github_operations.py ← 完整操作(Star/Fork/Issues/PR/代码/评论)
│ ├── github_browser_ops.py ← 浏览器自动化操作(API不支持的功能)
│ ├── github_login.py ← 登录管理
│ ├── install_browser.py ← 浏览器安装脚本
│ ├── config.py ← 集中配置管理
│ └── requirements.txt ← Python依赖
├── references/
│ └── github_api_endpoints.md ← API参考
└── assets/
~/.github-assistant/ ← 用户数据目录(不在skill文件夹内)
├── github_token.txt ← Token存储
├── github_auth.json ← 浏览器session
└── browser_data/ ← 浏览器持久化数据
⚠️ 安全说明:敏感数据(Token、浏览器会话)存储在用户目录
~/.github-assistant/,不会出现在 skill 文件夹中,可安全上传到公开仓库。
github_token.txt,请勿上传到公开仓库playwright install chromium