{"skill":{"slug":"github-assistant-skill","displayName":"GitHub-Assistant-Skill","summary":"GitHub Trending查看、项目搜索、Star/Fork/Watch操作、Issues管理、Pull Request操作、代码内容获取、评论管理等完整助手。当用户需要查看GitHub Trending排行榜、搜索GitHub项目、对仓库进行操作、管理Issues/PR、获取代码内容时使用此技能。","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":87,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1775464788955,"updatedAt":1777527229491},"latestVersion":{"version":"1.0.0","createdAt":1775464788955,"changelog":"An all-in-one GitHub assistant supporting Trending, repo search, Star/Fork/Watch, Issues/PR, code access, branch, Releases and Actions. Uses REST API + Playwright dual mode, covering official API and web-only features (Insights, Traffic, Security). Ideal for browsing trending projects, searching repos and managing code collaboration.\n\nGitHub 操作全能助手技能，支持 Trending 查看、仓库搜索、Star/Fork/Watch 操作、Issues/PR 管理、代码内容获取、分支管理、Releases、Actions 操作等。通过 REST API + Playwright 浏览器双模式，覆盖 GitHub 官方 API 及网页操作专属功能（Insights、Traffic、Security 等）。适用于查看热门项目、搜索仓库、管理代码协作。\n\n\n\nV1.0:\n\n#  GitHub Assistant Skill\n\n**[中文](#中文文档) | [English](#english-documentation)**\n\n---\n\n<a id=\"中文文档\"></a>\n\n## 中文文档\n\n> 一个为 AI Agent（Claude Code / OpenClaw / AstrBot 等）设计的全能 GitHub 助手技能包。\n> 支持 Trending 查看、项目搜索、Star/Fork/Watch 操作、Issues/PR 管理、代码内容获取等完整功能。\n> **默认输出语言：中文**\n\n\nGitHub 操作全能助手技能，支持 Trending 查看、仓库搜索、Star/Fork/Watch 操作、Issues/PR 管理、代码内容获取、分支管理、Releases、Actions 操作等。通过 REST API + Playwright 浏览器双模式，覆盖 GitHub 官方 API 及网页操作专属功能（Insights、Traffic、Security 等）。适用于查看热门项目、搜索仓库、管理代码协作。\n\n### ✨ 功能特性\n\n- 🔥 **GitHub Trending** — 查看每日/每周/每月热门项目，支持按语言筛选\n- 🔍 **项目搜索** — 支持搜索仓库、用户、查看项目详情\n- ⭐ **仓库操作** — Star / Unstar / Fork / Watch / Unwatch / 创建仓库 / 列出 Forks & Stargazers\n- 🐛 **Issues 管理** — 创建、列出、关闭、重新打开、评论、标签管理、锁定\n- 🔀 **Pull Requests** — 创建、列出、关闭、合并、审查、评论、请求审查者\n- 📄 **代码内容** — 获取文件、目录、README、创建/更新文件\n- 🌿 **分支管理** — 列出、创建、删除分支\n- 🚀 **Releases 管理** — 列出、创建、更新、删除 Release\n- ⚡ **Actions 操作** — 列出工作流、触发/取消/重新运行工作流\n- 👤 **用户操作** — 获取用户信息、列出仓库、关注/取消关注\n- 🔔 **通知管理** — 列出通知、标记已读\n- 🏢 **组织操作** — 列出组织、获取组织信息、列出成员\n- 💬 **评论管理** — Issue/PR 评论\n- 🌐 **浏览器自动化** — 支持 API 不支持的操作（贡献图、Insights、流量统计、网络图、Blame 等）\n- 🔐 **双模式登录** — 浏览器手动登录 + Token 自动登录\n- 🤖 **双引擎** — GitHub REST API + Playwright 浏览器自动化\n- 📊 **完整数据** — Trending 信息包含仓库名、描述、语言、Star、Fork、贡献者、期间新增Star\n\n### 📦 快速安装\n\n**1. 安装依赖**\n\n```bash\ncd github-assistant/scripts\npip install -r requirements.txt\n```\n\n**2. 安装浏览器引擎（可选，浏览器模式需要）**\n\n> ⚠️ **重要提示**：AI Agent/服务器环境请优先查看 **方案3-Docker** 或 **方案4-API模式**\n\n#### 安装优先级说明\n\n| 优先级 | 方案 | 适用场景 | 说明 |\n|--------|------|----------|------|\n| 1 | pip 安装 | **中国大陆用户推荐** | 使用 PyPI 镜像安装 Playwright 包，不受网络限制 |\n| 2 | 官方 CDN + 代理 | 网络正常/有代理环境 | 从 cdn.playwright.dev 下载浏览器二进制 |\n| 3 | 国内镜像源 | CDN 无法访问时 | 自动切换到淘宝/清华镜像 |\n| 4 | Docker | AI Agent/服务器 | 预装浏览器，无需下载 |\n| 5 | 纯 API 模式 | 无需 Trending 功能 | 跳过浏览器安装 |\n\n#### 方式A — 智能安装脚本（推荐）\n\n使用智能安装脚本，自动使用 PyPI 镜像安装 Playwright，然后下载浏览器：\n\n**Mac/Linux:**\n```bash\ncd github-assistant/scripts\npython3 install_browser.py\n```\n\n**Windows:**\n```powershell\ncd github-assistant\\scripts\npython install_browser.py\n```\n\n**脚本功能：**\n- ✅ **首选 pip 安装 Playwright 包**（使用阿里云 PyPI 镜像，中国大陆可正常访问）\n- ✅ 自动检测系统代理设置\n- ✅ 自动检测 DNS 解析状态\n- ✅ 自动检测前10秒下载进度\n- ✅ 下载停滞时自动切换国内镜像源\n- ✅ 自动处理镜像版本兼容性\n- ✅ 自动验证浏览器安装状态\n\n**命令行参数：**\n```bash\n# 检查 DNS 解析状态\npython3 install_browser.py --check-dns\n\n# 直接使用指定镜像源\npython3 install_browser.py --mirror 1    # 淘宝镜像\npython3 install_browser.py --mirror 2    # 清华镜像\n\n# 跳过官方源，直接使用镜像\npython3 install_browser.py --skip-official\n```\n\n#### 方式B — 手动安装\n\n**Mac/Linux:**\n```bash\npython3 -m playwright install chromium\n```\n\n**Windows:**\n```powershell\n# 使用PowerShell\npython -m playwright install chromium\n\n# 或使用cmd\npython.exe -m playwright install chromium\n```\n\n> 💡 **中国用户提示**：如果下载缓慢或失败，请使用下方的 **方式C：国内镜像源**。\n\n> 🔄 **代理自动检测**：安装脚本会自动检测并使用系统代理设置（`HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY`）。\n\n#### 方式C — 备用安装方案（默认方式下载失败时使用）\n\n**方案0：使用系统代理（自动检测）**\n\n安装脚本会自动检测以下环境变量中的代理设置：\n\n| 环境变量 | 说明 |\n|---------|------|\n| `HTTPS_PROXY` / `https_proxy` | HTTPS 代理 |\n| `HTTP_PROXY` / `http_proxy` | HTTP 代理 |\n| `ALL_PROXY` / `all_proxy` | 通用代理 |\n| `NO_PROXY` / `no_proxy` | 不走代理的地址 |\n\n**设置代理示例：**\n\n```bash\n# Mac/Linux (临时)\nexport HTTPS_PROXY=\"http://127.0.0.1:7890\"\nexport HTTP_PROXY=\"http://127.0.0.1:7890\"\n\n# 然后运行安装脚本\npython3 install_browser.py\n\n# 或直接一行\nHTTPS_PROXY=\"http://127.0.0.1:7890\" python3 install_browser.py\n```\n\n```powershell\n# Windows PowerShell (临时)\n$env:HTTPS_PROXY = \"http://127.0.0.1:7890\"\n$env:HTTP_PROXY = \"http://127.0.0.1:7890\"\npython install_browser.py\n```\n\n**方案1：DNS 解析失败解决方案**\n\n如果遇到 `cdn.playwright.dev` DNS 解析失败，可尝试以下解决方案：\n\n**方案1.1：更换 DNS 服务器（推荐）**\n\n| DNS 服务器 | IP 地址 | 说明 |\n|------------|---------|------|\n| Google DNS | 8.8.8.8, 8.8.4.4 | 全球通用 |\n| Cloudflare | 1.1.1.1, 1.0.0.1 | 速度快 |\n| 阿里 DNS | 223.5.5.5, 223.6.6.6 | 国内推荐 |\n| 腾讯 DNS | 119.29.29.29 | 国内推荐 |\n\n**方案1.2：添加 hosts 映射**\n\n**Mac/Linux:**\n```bash\n# 查询 IP（使用备用 DNS）\nnslookup cdn.playwright.dev 8.8.8.8\n\n# 添加到 hosts 文件（需要管理员权限）\necho \"13.107.253.39 cdn.playwright.dev\" | sudo tee -a /etc/hosts\n```\n\n**Windows (PowerShell 管理员):**\n```powershell\n# 添加到 hosts 文件\nAdd-Content -Path \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\" -Value \"13.107.253.39 cdn.playwright.dev\"\n```\n\n**方案1.3：使用代理**\n```bash\n# 设置代理环境变量\nexport HTTPS_PROXY=\"http://your-proxy:port\"\nexport HTTP_PROXY=\"http://your-proxy:port\"\n\n# 然后执行安装\npython3 -m playwright install chromium\n```\n\n**方案2：使用国内镜像源（⭐推荐中国用户）**\n\n> ⚠️ **注意**：镜像源版本可能滞后于官方版本。如果镜像源没有所需版本，请使用 Docker 方案或代理。\n\nPlaywright 支持通过环境变量 `PLAYWRIGHT_DOWNLOAD_HOST` 设置浏览器下载镜像源。\n\n**Mac/Linux (bash/zsh):**\n```bash\n# 使用淘宝镜像（推荐）\nPLAYWRIGHT_DOWNLOAD_HOST=https://registry.npmmirror.com/-/binary/playwright python3 -m playwright install chromium\n\n# 或使用清华大学镜像\nPLAYWRIGHT_DOWNLOAD_HOST=https://mirrors.tuna.tsinghua.edu.cn/playwright python3 -m playwright install chromium\n```\n\n**Mac/Linux (永久设置):**\n```bash\n# 添加到 ~/.bashrc 或 ~/.zshrc\nexport PLAYWRIGHT_DOWNLOAD_HOST=https://registry.npmmirror.com/-/binary/playwright\n\n# 然后执行\npython3 -m playwright install chromium\n```\n\n**Windows (PowerShell):**\n```powershell\n# 使用淘宝镜像\n$env:PLAYWRIGHT_DOWNLOAD_HOST=\"https://registry.npmmirror.com/-/binary/playwright\"\npython -m playwright install chromium\n\n# 或使用清华大学镜像\n$env:PLAYWRIGHT_DOWNLOAD_HOST=\"https://mirrors.tuna.tsinghua.edu.cn/playwright\"\npython -m playwright install chromium\n```\n\n**Windows (CMD):**\n```cmd\nset PLAYWRIGHT_DOWNLOAD_HOST=https://registry.npmmirror.com/-/binary/playwright\npython -m playwright install chromium\n```\n\n**Windows (永久设置):**\n```powershell\n# 以管理员身份运行 PowerShell，设置系统环境变量\n[Environment]::SetEnvironmentVariable(\"PLAYWRIGHT_DOWNLOAD_HOST\", \"https://registry.npmmirror.com/-/binary/playwright\", \"User\")\n\n# 重新打开终端后执行\npython -m playwright install chromium\n```\n\n**常用镜像源列表：**\n\n| 镜像源 | 地址 | 说明 |\n|--------|------|------|\n| npmmirror（淘宝） | `https://registry.npmmirror.com/-/binary/playwright` | 推荐，同步及时 |\n| 清华大学 | `https://mirrors.tuna.tsinghua.edu.cn/playwright` | 教育网速度优秀 |\n\n**镜像版本滞后解决方案：**\n\n> ⚠️ 镜像源可能没有最新版本的浏览器。例如：Playwright 1.58.0 需要 chromium v1208，但镜像可能只有 v1200。\n\n**方案2.1：智能安装脚本自动降级（推荐）**\n\n智能安装脚本会自动检测镜像版本并降级 Playwright 到兼容版本：\n\n```bash\n# 脚本会自动：\n# 1. 检测镜像源可用的 chromium 版本\n# 2. 查找兼容的 Playwright 版本\n# 3. 自动降级安装兼容版本\npython3 install_browser.py --mirror 1\n```\n\n**方案2.2：手动降级 Playwright 版本**\n\n如果镜像安装失败，可以手动降级 Playwright：\n\n```bash\n# 查看当前 Playwright 版本\npython3 -m playwright --version\n\n# 安装与镜像兼容的 Playwright 版本\npip install playwright==1.57.1\n\n# 然后使用镜像安装浏览器\nPLAYWRIGHT_DOWNLOAD_HOST=https://registry.npmmirror.com/-/binary/playwright python3 -m playwright install chromium\n```\n\n**Playwright 与 Chromium 版本对照表：**\n\n| Playwright 版本 | Chromium 构建 | 说明 |\n|----------------|--------------|------|\n| 1.58.0 | v1208 | 最新版 |\n| 1.57.1 | v1200 | 镜像常用 |\n| 1.57.0 | v1199 | |\n| 1.56.0 | v1194 | |\n| 1.55.0 | v1181 | |\n| 1.54.0 | v1179 | |\n| 1.53.0 | v1169 | |\n\n**方案3：使用Docker（⭐推荐AI Agent/服务器环境）**\n\nAI Agent通常运行在headless/无图形界面环境，Docker是最佳方案：\n\n**Mac/Linux:**\n```bash\ndocker run -it --rm \\\n  --ipc=host \\\n  -v \"$(pwd):/workspace\" \\\n  -w /workspace \\\n  mcr.microsoft.com/playwright/python:v1.40.0-jammy \\\n  bash -c \"pip install -r scripts/requirements.txt && python3 scripts/github_trending.py daily\"\n```\n\n**Windows (PowerShell):**\n```powershell\ndocker run -it --rm `\n  --ipc=host `\n  -v \"${PWD}:/workspace\" `\n  -w /workspace `\n  mcr.microsoft.com/playwright/python:v1.40.0-jammy `\n  bash -c \"pip install -r scripts/requirements.txt && python3 scripts/github_trending.py daily\"\n```\n\n**Windows (CMD):**\n```cmd\ndocker run -it --rm --ipc=host -v \"%CD%:/workspace\" -w /workspace mcr.microsoft.com/playwright/python:v1.40.0-jammy bash -c \"pip install -r scripts/requirements.txt && python3 scripts/github_trending.py daily\"\n```\n\n**Docker方案优势：**\n- ✅ 预装Chromium浏览器，无需下载等待\n- ✅ 自动headless模式，完美适配Agent环境\n- ✅ 环境隔离，避免依赖冲突\n- ✅ 跨平台一致（Mac/Linux/Windows/服务器）\n\n**方案4：跳过浏览器安装（纯API模式）**\n\n如果仅需基础功能，可跳过浏览器安装：\n\n| 功能 | 是否需要浏览器 | 说明 |\n|------|--------------|------|\n| 🔥 Trending | ✅ 需要 | GitHub无官方Trending API，必须浏览器抓取 |\n| 🔍 搜索 | ❌ 不需要 | 使用GitHub Search API |\n| ⭐ Star/Fork | ❌ 不需要 | 使用GitHub REST API |\n| 🐛 Issues/PR | ❌ 不需要 | 使用GitHub REST API |\n| 📄 代码内容 | ❌ 不需要 | 使用GitHub REST API |\n\n**纯API模式使用方法：**\n```bash\n# 仅需安装Python依赖，无需浏览器\npip install -r requirements.txt\n\n# 使用API功能（搜索、Star、Issues等）\npython3 scripts/github_search.py repos \"machine learning\"\npython3 scripts/github_operations.py star owner/repo\n```\n\n**3. 登录 GitHub（二选一）**\n\n#### 方式A — 浏览器手动登录（推荐新手）\n\n```bash\npython3 scripts/github_login.py browser\n```\n\n弹出浏览器窗口，手动输入 GitHub 账号密码完成登录。\n\n#### 方式B — Token 登录（支持全部操作）\n\n支持两种 Token 类型：**Fine-grained PAT**（推荐）或 **Classic PAT**\n\n---\n\n**选项 1：Fine-grained Personal Access Token（推荐）**\n\n更安全的权限控制，可为每个仓库单独配置权限。\n\n1. **打开设置页面**\n   - 访问 https://github.com/settings/tokens?type=beta\n   - 或 GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens\n\n2. **生成新 Token**\n   - 点击 \"Generate new token\"\n   - 输入 Token 名称（如：GitHub-Assistant-Skill）\n   - 设置过期时间（建议 90 天或更长）\n\n3. **配置权限（重要！）**\n\n   **Repository permissions（仓库权限）- 全部设置为 Read and Write：**\n   \n   | 权限 | 用途 |\n   |------|------|\n   | **Actions** | 读取工作流运行状态 |\n   | **Administration** | 读取仓库管理信息 |\n   | **Checks** | 读取检查运行状态 |\n   | **Commit statuses** | 读取提交状态 |\n   | **Contents** | 读取/创建/更新/删除文件 |\n   | **Dependabot alerts** | 读取安全警报 |\n   | **Deployments** | 读取部署信息 |\n   | **Discussions** | 读取/创建讨论 |\n   | **Environments** | 读取环境信息 |\n   | **Issues** | 读取/创建/更新/关闭 Issues |\n   | **Metadata** | 读取基础仓库信息（必需）|\n   | **Packages** | 读取包信息 |\n   | **Pages** | 读取 GitHub Pages 信息 |\n   | **Pull requests** | 读取/合并/审查 PR |\n   | **Repository security advisories** | 读取安全公告 |\n   | **Secret scanning alerts** | 读取密钥扫描警报 |\n   | **Workflows** | 读取工作流 |\n\n4. **选择仓库访问范围**\n   - **All repositories** - 访问所有仓库（推荐）\n   - **Only select repositories** - 仅访问指定仓库\n\n5. **生成并保存 Token**\n   - 点击 \"Generate token\"\n   - **⚠️ 立即复制 Token**（页面关闭后无法再次查看）\n   - 运行 `python3 github_login.py token <TOKEN>`\n   - 验证成功后 Token 会被安全存储到本地\n\n---\n\n**选项 2：Classic Personal Access Token**\n\n传统的 Token 类型，使用 scopes 权限模型。\n\n1. **打开设置页面**\n   - 访问 https://github.com/settings/tokens\n   - 或 GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)\n\n2. **生成新 Token**\n   - 点击 \"Generate new token (classic)\"\n   - 输入 Token 名称（如：GitHub-Assistant-Skill）\n   - 设置过期时间（建议 90 天或更长）\n\n3. **选择 Scopes（权限范围）**\n\n   **必需 Scopes：**\n   \n   | Scope | 用途 |\n   |-------|------|\n   | `repo` | 完全控制私有仓库（包含所有仓库操作）|\n   | `public_repo` | 访问公共仓库 |\n   \n   **推荐 Scopes（根据需要使用）：**\n   \n   | Scope | 用途 |\n   |-------|------|\n   | `workflow` | 更新 GitHub Actions 工作流文件 |\n   | `read:org` | 读取组织成员信息 |\n   | `read:user` | 读取用户资料信息 |\n   | `read:discussion` | 读取团队讨论 |\n\n4. **生成并保存 Token**\n   - 点击 \"Generate token\"\n   - **⚠️ 立即复制 Token**（页面关闭后无法再次查看）\n   - 运行 `python3 github_login.py token <TOKEN>`\n   - 验证成功后 Token 会被安全存储到本地\n\n---\n\n**Token 类型对比：**\n\n| 特性 | Fine-grained PAT | Classic PAT |\n|------|-----------------|-------------|\n| 权限粒度 | 按仓库、按权限细粒度控制 | 全局 scopes |\n| 安全性 | 更高，可限制访问范围 | 较低，全局权限 |\n| 组织仓库 | 需要组织管理员批准 | 直接可用 |\n| 推荐度 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |\n| 适用场景 | 生产环境、团队协作 | 个人使用、快速测试 |\n\n**4. 验证登录**\n\n```bash\npython3 github_login.py check\n```\n\n### 🚀 使用示例\n\n#### 查看 GitHub Trending\n\n每条 Trending 项目包含完整 7 项信息：仓库名、链接、描述、语言、Star/Fork 数、贡献者、期间新增Star。\n\n> 💡 **自动加载所有项目**：脚本会自动滚动页面，获取 **当日/当周/当月的所有 Trending 项目**（不仅仅是首页显示的），直到没有新项目加载为止。\n\n```bash\npython3 scripts/github_trending.py daily \"\" browser       # 今日所有Trending项目（全语言）\npython3 scripts/github_trending.py weekly python browser   # 本周Python所有Trending项目\npython3 scripts/github_trending.py monthly \"\" browser      # 本月所有Trending项目（全语言）\n```\n\n**输出示例：**\n\n```\n🔥 GitHub 今日 Trending (2026-04-02)\n\n📊 今日热榜概览\n• 总上榜仓库数：8个\n• 最大热点：anthropics/claude-code 正式发布，单日 +8,764 ⭐ 爆棚！\n• AI 编程 Agent 双雄：Claude Code + OpenAI Codex 同日霸榜\n• 热门语言：Python 领跑（5/8），Shell/Rust/JavaScript 跟进\n• 数据来源：GitHub Trending 页面（browser 模式）\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n🏆 Trending 仓库详解\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n1. anthropics/claude-code ⭐ 105,566\n⭐ Stars: 105,566 | 🍴 Forks: 16,781 | 💻 语言: Shell | 📅 今日上榜\n🔗 GitHub - anthropics/claude-code: Claude Code is an agentic coding tool that lives in your terminal\n📝 项目简介：\n一款运行在终端中的智能编程工具，能理解你的代码库，通过自然语言命令帮你更快写代码——执行常规任务、解释复杂代码、处理 Git 工作流。\n🔍 深度解读：\n• 项目定位：Anthropic 官方推出的 AI 编程 Agent 终端工具，Claude Code 正式开源仓库\n• 核心功能：终端内 AI 编程助手，代码理解、自动修改、Git 操作全自然语言驱动\n• 为何火爆：Claude Code 此前为闭源工具，社区高度关注。今日 +8,764 星标创近期绝对记录，表明开发者对官方开源的热情极高\n• 适用场景：所有日常编程开发工作，尤其是需要频繁操作 Git 和代码审查的场景\n• 推荐指数：⭐⭐⭐⭐⭐（今日无可争议的第一名）\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n2. openai/codex ⭐ 72,448\n⭐ Stars: 72,448 | 🍴 Forks: 10,140 | 💻 语言: Rust | 📅 今日上榜\n🔗 GitHub - openai/codex: Lightweight coding agent that runs in your terminal\n📝 项目简介：\n一款运行在终端中的轻量级编程 Agent。\n🔍 深度解读：\n• 项目定位：OpenAI 官方的终端编程 Agent，Claude Code 的直接竞争对手\n• 核心功能：用 Rust 编写的高性能终端 AI 助手，聚焦轻量和速度\n• 为何火爆：与 Claude Code 同日上榜，AI 编程 Agent 赛道竞争白热化的标志\n• 适用场景：偏好 OpenAI 生态、追求极致性能的终端编程开发者\n• 推荐指数：⭐⭐⭐⭐⭐\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n3. microsoft/VibeVoice ⭐ 34,994\n⭐ Stars: 34,994 | 🍴 Forks: 3,977 | 💻 语言: Python | 📅 今日上榜\n🔗 GitHub - microsoft/VibeVoice: Open-Source Frontier Voice AI\n📝 项目简介：\n微软开源的前沿语音 AI 项目。\n🔍 深度解读：\n• 项目定位：微软出品的开源语音 AI 框架，持续霸榜多日\n• 核心功能：前沿语音合成、语音识别能力，面向研究者和开发者\n• 为何火爆：微软品牌背书 + 语音 AI 赛道持续升温，连续多日上榜说明热度不减\n• 适用场景：语音助手开发、语音 AI 研究、多模态应用\n• 推荐指数：⭐⭐⭐⭐\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n💡 今日洞察\n🎯 核心主题：AI 编程 Agent 正式进入「双雄时代」\n今日 Trending 最大看点是 anthropics/claude-code 和 openai/codex 首次同日上榜：\n• Anthropic Claude Code 今日 +8,764 ⭐，创近期单日最高纪录，官方开源引爆社区\n• OpenAI Codex 以 +1,416 ⭐ 紧随其后，Rust 实现主打轻量高性能\n• 两家 AI 巨头在同一赛道正面交锋，标志着 AI 编程工具从萌芽期进入全面竞争阶段\n\n📈 三大趋势信号：\n1️⃣ AI 编程工具全面开源化：Claude Code 官方仓库今日上榜，加上此前社区的逆向工程和 Python 重写版本，整个生态正在从闭源走向开放\n2️⃣ AI 基础模型领域扩展加速：google-research/timesfm 将基础模型从 NLP/CV 扩展到时间序列，预示更多垂直领域基础模型将涌现\n3️⃣ 语音 AI 持续火热：microsoft/VibeVoice 连续多日上榜，语音作为 AI 交互的重要入口正在被各大厂商押注\n\n🔧 实用推荐：\n• 如果你在用 Claude Code → claude-howto 配套教程值得收藏\n• 如果你在做时间序列 → google-research/timesfm 是官方优选\n• 如果你在做 OCR → zai-org/GLM-OCR 新晋选手值得关注\n\n📡 数据来源：GitHub Trending (browser) | \n```\n\n#### 搜索项目\n\n```bash\npython3 scripts/github_search.py repos \"LLM agent\"          # 搜索仓库\npython3 scripts/github_search.py repos \"stars:>10000 language:python\"\npython3 scripts/github_search.py info facebook react        # 仓库详情\npython3 scripts/github_search.py users \"torvalds\"           # 搜索用户\n```\n\n#### 用户操作\n\n```bash\npython3 scripts/github_operations.py user                    # 当前登录用户信息\npython3 scripts/github_operations.py user torvalds           # 指定用户信息\npython3 scripts/github_operations.py my-repos                # 当前用户的仓库\npython3 scripts/github_operations.py user-repos torvalds     # 指定用户的仓库\npython3 scripts/github_operations.py followers               # 当前用户粉丝\npython3 scripts/github_operations.py following               # 当前用户关注的人\npython3 scripts/github_operations.py follow username         # 关注用户\npython3 scripts/github_operations.py unfollow username       # 取消关注\n```\n\n#### 仓库操作\n\n```bash\npython3 scripts/github_operations.py star microsoft/vscode   # Star\npython3 scripts/github_operations.py unstar owner/repo       # 取消 Star\npython3 scripts/github_operations.py fork owner/repo         # Fork\npython3 scripts/github_operations.py watch owner/repo        # Watch\npython3 scripts/github_operations.py unwatch owner/repo      # 取消 Watch\npython3 scripts/github_operations.py info owner/repo         # 仓库信息\npython3 scripts/github_operations.py starred                 # 列出已 Star 仓库\npython3 scripts/github_operations.py create-repo my-repo \"描述\"  # 创建新仓库\npython3 scripts/github_operations.py forks owner/repo        # 列出 Forks\npython3 scripts/github_operations.py stargazers owner/repo   # 列出 Stargazers\n```\n\n#### Issues 管理\n\n```bash\npython3 scripts/github_operations.py issues microsoft/vscode open      # 列出 Issues\npython3 scripts/github_operations.py issue microsoft/vscode 1234       # 获取指定 Issue\npython3 scripts/github_operations.py create-issue owner/repo \"Bug标题\" \"描述\"  # 创建\npython3 scripts/github_operations.py close-issue owner/repo 1234       # 关闭\npython3 scripts/github_operations.py reopen-issue owner/repo 1234      # 重新打开\npython3 scripts/github_operations.py labels owner/repo 1234            # 列出 Issue 标签\npython3 scripts/github_operations.py add-labels owner/repo 1234 bug enhancement  # 添加标签\npython3 scripts/github_operations.py lock-issue owner/repo 1234 \"reason\"  # 锁定 Issue\npython3 scripts/github_operations.py unlock-issue owner/repo 1234      # 解锁 Issue\n```\n\n#### Pull Requests 操作\n\n```bash\npython3 scripts/github_operations.py prs microsoft/vscode open         # 列出 PRs\npython3 scripts/github_operations.py pr microsoft/vscode 1234          # 获取指定 PR\npython3 scripts/github_operations.py create-pr owner/repo \"PR标题\" feature-branch main  # 创建 PR\npython3 scripts/github_operations.py close-pr owner/repo 1234          # 关闭 PR\npython3 scripts/github_operations.py reopen-pr owner/repo 1234         # 重新打开 PR\npython3 scripts/github_operations.py merge-pr owner/repo 1234 \"标题\"   # 合并 PR\npython3 scripts/github_operations.py approve-pr owner/repo 1234 \"LGTM\" # 批准 PR\npython3 scripts/github_operations.py pr-files owner/repo 1234          # PR 修改的文件\npython3 scripts/github_operations.py pr-commits owner/repo 1234        # PR 的提交\npython3 scripts/github_operations.py pr-reviews owner/repo 1234        # PR 审查记录\n```\n\n#### 分支管理\n\n```bash\npython3 scripts/github_operations.py branches owner/repo               # 列出分支\npython3 scripts/github_operations.py branch owner/repo main            # 获取分支信息\npython3 scripts/github_operations.py create-branch owner/repo new-branch main  # 创建分支\n```\n\n#### Releases 管理\n\n```bash\npython3 scripts/github_operations.py releases owner/repo               # 列出 Releases\npython3 scripts/github_operations.py release owner/repo 123456         # 获取指定 Release\npython3 scripts/github_operations.py create-release owner/repo v1.0.0 \"Release名称\" \"描述\"  # 创建 Release\n```\n\n#### Actions 操作\n\n```bash\npython3 scripts/github_operations.py workflows owner/repo              # 列出工作流运行\npython3 scripts/github_operations.py workflow owner/repo workflow.yml  # 获取指定工作流\npython3 scripts/github_operations.py trigger-workflow owner/repo workflow.yml main  # 触发工作流\n```\n\n#### 代码内容获取\n\n```bash\npython3 scripts/github_operations.py file owner/repo path/to/file.py   # 获取文件\npython3 scripts/github_operations.py readme owner/repo                 # 获取 README\npython3 scripts/github_operations.py ls owner/repo src                 # 列出目录\npython3 scripts/github_operations.py create-file owner/repo \"test.py\" \"提交信息\" \"内容\"  # 创建文件\n```\n\n#### 评论操作\n\n```bash\npython3 scripts/github_operations.py comments owner/repo 1234          # 列出评论\npython3 scripts/github_operations.py comment owner/repo 1234 \"评论内容\" # 创建评论\n```\n\n#### 通知操作\n\n```bash\npython3 scripts/github_operations.py notifications          # 列出未读通知\npython3 scripts/github_operations.py notifications --all    # 列出所有通知\npython3 scripts/github_operations.py repo-notifications owner/repo  # 仓库通知\npython3 scripts/github_operations.py mark-read thread_id    # 标记已读\n```\n\n#### 组织操作\n\n```bash\npython3 scripts/github_operations.py orgs                   # 列出当前用户的组织\npython3 scripts/github_operations.py org org_name           # 获取组织信息\npython3 scripts/github_operations.py org-repos org_name     # 列出组织仓库\npython3 scripts/github_operations.py org-members org_name   # 列出组织成员\n```\n\n#### 其他操作\n\n```bash\npython3 scripts/github_operations.py commits owner/repo                # 提交历史\npython3 scripts/github_operations.py check                             # 登录状态\npython3 scripts/github_operations.py rate-limit                        # API 限流\n```\n\n#### 浏览器自动化操作（API 不支持的功能）\n\n> ⚠️ 这些功能 GitHub REST API 不支持，需要通过浏览器自动化实现\n> 浏览器操作过程可见，操作结束后浏览器保持打开，用户可继续手动操作\n\n**用户相关（API 不支持）：**\n\n```bash\npython3 scripts/github_browser_ops.py contributions torvalds    # 查看贡献图\npython3 scripts/github_browser_ops.py activity torvalds         # 查看活动时间线\npython3 scripts/github_browser_ops.py stars torvalds            # 查看 Star 列表页面\npython3 scripts/github_browser_ops.py followers torvalds        # 查看粉丝列表页面\npython3 scripts/github_browser_ops.py sponsors torvalds         # 查看赞助页面\n```\n\n**仓库 Insights（需要 push 权限）：**\n\n```bash\npython3 scripts/github_browser_ops.py insights owner/repo       # Pulse 概览\npython3 scripts/github_browser_ops.py traffic owner/repo        # 流量统计\npython3 scripts/github_browser_ops.py network owner/repo        # Fork 网络图\npython3 scripts/github_browser_ops.py dependents owner/repo     # 依赖者列表\n```\n\n**代码相关：**\n\n```bash\npython3 scripts/github_browser_ops.py blame owner/repo path/file.py    # Git Blame\npython3 scripts/github_browser_ops.py history owner/repo path/file.py  # 文件提交历史\npython3 scripts/github_browser_ops.py compare owner/repo main dev      # 分支比较\npython3 scripts/github_browser_ops.py codesearch owner/repo \"keyword\"  # 仓库内代码搜索\n```\n\n**设置页面：**\n\n```bash\npython3 scripts/github_browser_ops.py settings                  # 用户设置\npython3 scripts/github_browser_ops.py settings owner/repo       # 仓库设置\n```\n\n**导航：**\n\n```bash\npython3 scripts/github_browser_ops.py notifications             # 通知页面\npython3 scripts/github_browser_ops.py explore                   # Explore 页面\npython3 scripts/github_browser_ops.py marketplace               # Marketplace\npython3 scripts/github_browser_ops.py search \"query\"            # GitHub 搜索\npython3 scripts/github_browser_ops.py goto \"https://...\"        # 导航到指定 URL\n```\n\n**浏览器控制：**\n\n```bash\npython3 scripts/github_browser_ops.py close                     # 关闭浏览器\n```\n\n### 🤖 Agent 指令示例\n\n| 用户指令 | Agent 执行 |\n|---------|-----------|\n| \"看看今天GitHub有什么热门项目\" | 今日 Trending（完整7项信息） |\n| \"本周 Python 最火的项目\" | `weekly python browser` |\n| \"本月 GitHub 排行榜\" | `monthly \"\" browser` |\n| \"帮我搜一下 OCR 相关的项目\" | 搜索仓库 |\n| \"帮我 Star microsoft/vscode\" | Star 操作 |\n| \"Fork 一下 facebook/react\" | Fork 操作 |\n| \"查看这个项目的 Issues\" | 列出 Issues |\n| \"合并 PR #123\" | 合并 Pull Request |\n| \"获取 README 内容\" | 获取代码文件 |\n| \"GitHub 登录\" | 启动浏览器登录 |\n| \"查看 GitHub 登录状态\" | 登录状态检查 |\n\n### 权限速查表\n\n| 操作 | 所需权限 | 权限级别 |\n|------|---------|---------|\n| Trending 查看 | 无需登录 | - |\n| 项目搜索 | 无需登录 | - |\n| Star/Unstar | 无需权限 / Token | - |\n| Fork | 无需权限 / Token | - |\n| Watch/Unwatch | Token | Metadata (Read) |\n| 查看仓库信息 | Token | Metadata (Read) |\n| **列出 Issues** | Token | Issues (Read) |\n| **创建/关闭 Issue** | Token | Issues (Write) |\n| **列出 PRs** | Token | Pull requests (Read) |\n| **合并 PR** | Token | Pull requests (Write) |\n| **获取文件内容** | Token | Contents (Read) |\n| **创建/更新文件** | Token | Contents (Write) |\n| **查看 Actions** | Token | Actions (Read) |\n\n---\n\n---\n\n<a id=\"english-documentation\"></a>\n\n## English Documentation\n\n> A comprehensive GitHub assistant skill pack designed for AI Agents (Claude Code / OpenClaw / AstrBot etc.).\n> Supports Trending browsing, project search, Star/Fork/Watch operations, Issues/PR management, code content access, and more.\n> **Default output language: Chinese** (unless user specifies otherwise)\n\n\nAn all-in-one GitHub assistant skill supporting Trending browsing, repository search, Star/Fork/Watch operations, Issues/PR management, code content access, branch management, Releases, Actions operations, and more. Through REST API + Playwright browser dual mode, it covers GitHub official API and web-exclusive features (Insights, Traffic, Security, etc.). Suitable for viewing trending projects, searching repositories, and managing code collaboration.\n\n### ✨ Features\n\n- 🔥 **GitHub Trending** — View daily/weekly/monthly trending repos, filter by language\n- 🔍 **Project Search** — Search repositories, users, view repo details\n- ⭐ **Repo Operations** — Star / Unstar / Fork / Watch / Unwatch / Create Repo / List Forks & Stargazers\n- 🐛 **Issues Management** — Create, list, close, reopen, comment, labels, lock\n- 🔀 **Pull Requests** — Create, list, close, merge, review, comment, request reviewers\n- 📄 **Code Content** — Get files, directories, README, create/update files\n- 🌿 **Branch Management** — List, create, delete branches\n- 🚀 **Releases Management** — List, create, update, delete releases\n- ⚡ **Actions Operations** — List workflows, trigger/cancel/rerun workflows\n- 👤 **User Operations** — Get user info, list repos, follow/unfollow\n- 🔔 **Notifications** — List notifications, mark as read\n- 🏢 **Organization Operations** — List orgs, get org info, list members\n- 💬 **Comments** — Issue/PR comments\n- 🌐 **Browser Automation** — Support API-unsupported operations (contributions, insights, traffic, network graph, blame, etc.)\n- 🔐 **Dual Login** — Interactive browser login + Token login\n- 🤖 **Dual Engine** — GitHub REST API + Playwright browser automation\n- 📊 **Full Data** — Trending info includes repo name, description, language, stars, forks, contributors, period star growth\n\n### 📦 Quick Start\n\n**1. Install Dependencies**\n\n```bash\ncd github-assistant/scripts\npip install -r requirements.txt\n```\n\n**2. Install Browser Engine (optional, for browser mode)**\n\n```bash\nplaywright install chromium\n```\n\n**3. Login to GitHub (choose one)**\n\n#### Option A — Interactive Browser Login (recommended for beginners)\n\n```bash\npython3 scripts/github_login.py browser\n```\n\nA browser window opens. Manually enter your GitHub credentials.\n\n#### Option B — Token Login (supports all operations)\n\nSupports two token types: **Fine-grained PAT** (recommended) or **Classic PAT**\n\n---\n\n**Option 1: Fine-grained Personal Access Token (Recommended)**\n\nMore secure permission control with per-repository configuration.\n\n1. **Open Settings**\n   - Visit https://github.com/settings/tokens?type=beta\n   - Or GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens\n\n2. **Generate New Token**\n   - Click \"Generate new token\"\n   - Enter token name (e.g., GitHub-Assistant-Skill)\n   - Set expiration (recommend 90 days or longer)\n\n3. **Configure Permissions (Important!)**\n\n   **Repository permissions — Set to Read and Write:**\n   \n   | Permission | Purpose |\n   |------------|---------|\n   | **Actions** | Read workflow runs |\n   | **Administration** | Read repository management info |\n   | **Checks** | Read check runs |\n   | **Commit statuses** | Read commit statuses |\n   | **Contents** | Read/create/update/delete files |\n   | **Dependabot alerts** | Read security alerts |\n   | **Deployments** | Read deployment info |\n   | **Discussions** | Read/create discussions |\n   | **Environments** | Read environment info |\n   | **Issues** | Read/create/update/close Issues |\n   | **Metadata** | Read basic repository info (required) |\n   | **Packages** | Read package info |\n   | **Pages** | Read GitHub Pages info |\n   | **Pull requests** | Read/merge/review PRs |\n   | **Repository security advisories** | Read security advisories |\n   | **Secret scanning alerts** | Read secret scanning alerts |\n   | **Workflows** | Read workflows |\n\n4. **Select Repository Access**\n   - **All repositories** - Access all repositories (recommended)\n   - **Only select repositories** - Access specific repositories only\n\n5. **Generate and Save Token**\n   - Click \"Generate token\"\n   - **⚠️ Copy token immediately** (cannot be viewed again after closing)\n   - Run `python3 github_login.py token <TOKEN>`\n   - Token will be securely stored locally after verification\n\n---\n\n**Option 2: Classic Personal Access Token**\n\nTraditional token type using scopes permission model.\n\n1. **Open Settings**\n   - Visit https://github.com/settings/tokens\n   - Or GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)\n\n2. **Generate New Token**\n   - Click \"Generate new token (classic)\"\n   - Enter token name (e.g., GitHub-Assistant-Skill)\n   - Set expiration (recommend 90 days or longer)\n\n3. **Select Scopes**\n\n   **Required Scopes:**\n   \n   | Scope | Purpose |\n   |-------|---------|\n   | `repo` | Full control of private repositories |\n   | `public_repo` | Access public repositories |\n   \n   **Recommended Scopes:**\n   \n   | Scope | Purpose |\n   |-------|---------|\n   | `workflow` | Update GitHub Actions workflow files |\n   | `read:org` | Read organization membership |\n   | `read:user` | Read user profile data |\n   | `read:discussion` | Read team discussions |\n\n4. **Generate and Save Token**\n   - Click \"Generate token\"\n   - **⚠️ Copy token immediately** (cannot be viewed again after closing)\n   - Run `python3 github_login.py token <TOKEN>`\n   - Token will be securely stored locally after verification\n\n---\n\n**Token Type Comparison:**\n\n| Feature | Fine-grained PAT | Classic PAT |\n|---------|-----------------|-------------|\n| Permission granularity | Per-repository, per-permission | Global scopes |\n| Security | Higher, limited access scope | Lower, global permissions |\n| Organization repos | Requires org admin approval | Directly available |\n| Recommendation | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |\n| Use case | Production, team collaboration | Personal use, quick testing |\n\n**4. Verify Login**\n\n```bash\npython3 github_login.py check\n```\n\n### 🚀 Usage Examples\n\n#### View GitHub Trending\n\nEach trending item includes all 7 fields: repo name, link, description, language, stars, forks, contributors, period star growth.\n\n> 💡 **Auto-load all projects**: The script automatically scrolls the page to fetch **ALL daily/weekly/monthly Trending projects** (not just the first page), loading until no new projects are found.\n\n```bash\npython3 scripts/github_trending.py daily \"\" browser       # All today's Trending (all languages)\npython3 scripts/github_trending.py weekly python browser   # All this week's Python Trending\npython3 scripts/github_trending.py monthly \"\" browser      # All this month's Trending (all languages)\n```\n\n**Output Format Requirements (⚠️ MUST follow strictly):**\n\n> 🔴 **IMPORTANT**: All Trending output **MUST strictly follow the format template below**. Do not create other formats.\n>\n> **Default Behavior**: When outputting Trending projects, the Agent **MUST strictly follow the \"Standard Output Template\" format below**, including:\n> - Title format with date\n> - Overview statistics structure\n> - Detailed repo analysis format (with deep insights)\n> - Today's insights section\n>\n> **Unless the user explicitly provides additional format requirements or special instructions**, you must NOT:\n> - Omit any section\n> - Change the output format\n> - Use Markdown tables (forbidden in IM chat platforms)\n> - Simplify or merge content\n\n**Output Example:**\n\n```\n🔥 GitHub 今日 Trending (2026-04-02)\n\n📊 今日热榜概览\n• 总上榜仓库数：8个\n• 最大热点：anthropics/claude-code 正式发布，单日 +8,764 ⭐ 爆棚！\n• AI 编程 Agent 双雄：Claude Code + OpenAI Codex 同日霸榜\n• 热门语言：Python 领跑（5/8），Shell/Rust/JavaScript 跟进\n• 数据来源：GitHub Trending 页面（browser 模式）\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n🏆 Trending 仓库详解\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n1. anthropics/claude-code ⭐ 105,566\n⭐ Stars: 105,566 | 🍴 Forks: 16,781 | 💻 语言: Shell | 📅 今日上榜\n🔗 项目链接: https://github.com/anthropics/claude-code\n📝 项目简介：\n一款运行在终端中的智能编程工具，能理解你的代码库，通过自然语言命令帮你更快写代码——执行常规任务、解释复杂代码、处理 Git 工作流。\n🔍 深度解读：\n• 项目定位：Anthropic 官方推出的 AI 编程 Agent 终端工具，Claude Code 正式开源仓库\n• 核心功能：终端内 AI 编程助手，代码理解、自动修改、Git 操作全自然语言驱动\n• 为何火爆：Claude Code 此前为闭源工具，社区高度关注。今日 +8,764 星标创近期绝对记录，表明开发者对官方开源的热情极高\n• 适用场景：所有日常编程开发工作，尤其是需要频繁操作 Git 和代码审查的场景\n• 推荐指数：⭐⭐⭐⭐⭐（今日无可争议的第一名）\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n2. openai/codex ⭐ 72,448\n⭐ Stars: 72,448 | 🍴 Forks: 10,140 | 💻 语言: Rust | 📅 今日上榜\n🔗 项目链接: https://github.com/openai/codex\n📝 项目简介：\n一款运行在终端中的轻量级编程 Agent。\n🔍 深度解读：\n• 项目定位：OpenAI 官方的终端编程 Agent，Claude Code 的直接竞争对手\n• 核心功能：用 Rust 编写的高性能终端 AI 助手，聚焦轻量和速度\n• 为何火爆：与 Claude Code 同日上榜，AI 编程 Agent 赛道竞争白热化的标志\n• 适用场景：偏好 OpenAI 生态、追求极致性能的终端编程开发者\n• 推荐指数：⭐⭐⭐⭐⭐\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n3. microsoft/VibeVoice ⭐ 34,994\n⭐ Stars: 34,994 | 🍴 Forks: 3,977 | 💻 语言: Python | 📅 今日上榜\n🔗 项目链接: https://github.com/microsoft/VibeVoice\n📝 项目简介：\n微软开源的前沿语音 AI 项目。\n🔍 深度解读：\n• 项目定位：微软出品的开源语音 AI 框架，持续霸榜多日\n• 核心功能：前沿语音合成、语音识别能力，面向研究者和开发者\n• 为何火爆：微软品牌背书 + 语音 AI 赛道持续升温，连续多日上榜说明热度不减\n• 适用场景：语音助手开发、语音 AI 研究、多模态应用\n• 推荐指数：⭐⭐⭐⭐\n\n━━━━━━━━━━━━━━━━━━━━━━━━━\n💡 今日洞察\n🎯 核心主题：AI 编程 Agent 正式进入「双雄时代」\n今日 Trending 最大看点是 anthropics/claude-code 和 openai/codex 首次同日上榜：\n• Anthropic Claude Code 今日 +8,764 ⭐，创近期单日最高纪录，官方开源引爆社区\n• OpenAI Codex 以 +1,416 ⭐ 紧随其后，Rust 实现主打轻量高性能\n• 两家 AI 巨头在同一赛道正面交锋，标志着 AI 编程工具从萌芽期进入全面竞争阶段\n\n📈 三大趋势信号：\n1️⃣ AI 编程工具全面开源化：Claude Code 官方仓库今日上榜，加上此前社区的逆向工程和 Python 重写版本，整个生态正在从闭源走向开放\n2️⃣ AI 基础模型领域扩展加速：google-research/timesfm 将基础模型从 NLP/CV 扩展到时间序列，预示更多垂直领域基础模型将涌现\n3️⃣ 语音 AI 持续火热：microsoft/VibeVoice 连续多日上榜，语音作为 AI 交互的重要入口正在被各大厂商押注\n\n🔧 实用推荐：\n• 如果你在用 Claude Code → claude-howto 配套教程值得收藏\n• 如果你在做时间序列 → google-research/timesfm 是官方优选\n• 如果你在做 OCR → zai-org/GLM-OCR 新晋选手值得关注\n\n📡 数据来源：GitHub Trending (browser) | 下次推送：2026-04-03 22:00 CST\n```\n\n#### Search Projects\n\n```bash\npython3 scripts/github_search.py repos \"LLM agent\"          # Search repos\npython3 scripts/github_search.py repos \"stars:>10000 language:python\"\npython3 scripts/github_search.py info facebook react        # Repo details\npython3 scripts/github_search.py users \"torvalds\"           # Search users\n```\n\n#### Repo Operations\n\n```bash\npython3 scripts/github_operations.py star microsoft/vscode   # Star\npython3 scripts/github_operations.py unstar owner/repo       # Unstar\npython3 scripts/github_operations.py fork owner/repo         # Fork\npython3 scripts/github_operations.py watch owner/repo        # Watch\npython3 scripts/github_operations.py unwatch owner/repo      # Unwatch\npython3 scripts/github_operations.py info owner/repo         # Repo info\npython3 scripts/github_operations.py starred                 # List starred repos\n```\n\n#### Issues Management\n\n```bash\npython3 scripts/github_operations.py issues microsoft/vscode open      # List issues\npython3 scripts/github_operations.py issue microsoft/vscode 1234       # Get issue\npython3 scripts/github_operations.py create-issue owner/repo \"Bug title\" \"Description\"\npython3 scripts/github_operations.py close-issue owner/repo 1234       # Close\npython3 scripts/github_operations.py reopen-issue owner/repo 1234      # Reopen\n```\n\n#### Pull Requests\n\n```bash\npython3 scripts/github_operations.py prs microsoft/vscode open         # List PRs\npython3 scripts/github_operations.py pr microsoft/vscode 1234          # Get PR\npython3 scripts/github_operations.py merge-pr owner/repo 1234 \"Title\"  # Merge PR\npython3 scripts/github_operations.py approve-pr owner/repo 1234 \"LGTM\" # Approve PR\n```\n\n#### Code Content\n\n```bash\npython3 scripts/github_operations.py file owner/repo path/to/file.py   # Get file\npython3 scripts/github_operations.py readme owner/repo                 # Get README\npython3 scripts/github_operations.py ls owner/repo src                 # List directory\npython3 scripts/github_operations.py create-file owner/repo \"test.py\" \"Commit msg\" \"Content\"\n```\n\n#### Comments\n\n```bash\npython3 scripts/github_operations.py comments owner/repo 1234          # List comments\npython3 scripts/github_operations.py comment owner/repo 1234 \"Comment text\"\n```\n\n#### Other Operations\n\n```bash\npython3 scripts/github_operations.py commits owner/repo                # Commit history\npython3 scripts/github_operations.py branches owner/repo               # List branches\npython3 scripts/github_operations.py releases owner/repo               # Releases\npython3 scripts/github_operations.py workflows owner/repo              # Actions workflows\npython3 scripts/github_operations.py check                             # Auth status\npython3 scripts/github_operations.py rate-limit                        # API rate limit\n```\n\n### 🤖 Agent Command Examples\n\n| User Command | Agent Action |\n|---------|-----------|\n| \"看看今天GitHub有什么热门项目\" | Today's Trending (full 7 fields) |\n| \"本周 Python 最火的项目\" | `weekly python browser` |\n| \"本月 GitHub 排行榜\" | `monthly \"\" browser` |\n| \"帮我搜一下 OCR 相关的项目\" | Search repos |\n| \"帮我 Star microsoft/vscode\" | Star operation |\n| \"Fork 一下 facebook/react\" | Fork operation |\n| \"查看这个项目的 Issues\" | List Issues |\n| \"合并 PR #123\" | Merge Pull Request |\n| \"获取 README 内容\" | Get code file |\n| \"GitHub 登录\" | Launch browser login |\n| \"查看 GitHub 登录状态\" | Check login status |\n\n### Permission Quick Reference\n\n| Operation | Required Permission | Level |\n|-----------|---------------------|-------|\n| Trending view | No login required | - |\n| Project search | No login required | - |\n| Star/Unstar | No permission / Token | - |\n| Fork | No permission / Token | - |\n| Watch/Unwatch | Token | Metadata (Read) |\n| View repo info | Token | Metadata (Read) |\n| **List Issues** | Token | Issues (Read) |\n| **Create/Close Issue** | Token | Issues (Write) |\n| **List PRs** | Token | Pull requests (Read) |\n| **Merge PR** | Token | Pull requests (Write) |\n| **Get file content** | Token | Contents (Read) |\n| **Create/Update file** | Token | Contents (Write) |\n| **View Actions** | Token | Actions (Read) |\n\n---\n\n### 📁 Project Structure\n\n```\ngithub-assistant/\n├── SKILL.md                          # Skill definition (Agent reads this)\n├── README.md                         # Documentation (Chinese + English)\n├── scripts/\n│   ├── github_trending.py            # Trending fetcher (browser only)\n│   ├── github_search.py              # Search tool\n│   ├── github_operations.py          # Full operations (Star/Fork/Issues/PR/Code/Comments)\n│   ├── github_login.py               # Login manager\n│   └── requirements.txt              # Python dependencies\n├── references/\n│   └── github_api_endpoints.md       # GitHub API endpoint reference\n├── assets/                           # Static resources\n├── github_token.txt                  # Token storage (auto-generated, gitignored)\n└── github_auth.json                  # Browser session (auto-generated, gitignored)\n```\n\n### ⚙️ Architecture\n\n```\n┌─────────────┐     ┌──────────────────┐     ┌──────────────┐\n│  User Input  │────▶│  Agent (Claude)   │────▶│   Scripts    │\n│ (Natural Lang)│    │ Intent + Route    │     │  (Python)    │\n└─────────────┘     └──────────────────┘     └──────┬───────┘\n                                                     │\n                                            ┌────────┴────────┐\n                                            ▼                 ▼\n                                    ┌──────────────┐  ┌──────────────┐\n                                    │  GitHub API  │  │  Playwright  │\n                                    │  (REST)      │  │  (Browser)   │\n                                    └──────────────┘  └──────────────┘\n```\n\n### 🔒 Security\n\n- Token is stored locally in `~/.github-assistant/github_token.txt`\n- Browser session stored in `~/.github-assistant/github_auth.json`\n- **No sensitive data is stored in this skill folder** — safe to upload to public repos\n- Fine-grained PAT allows precise permission control\n- Clear error messages on token verification failures\n\n### 📋 Dependencies\n\n- Python 3.8+\n- requests>=2.28.0\n- playwright>=1.40.0 (optional, for browser mode / Trending)\n\n> Note: `beautifulsoup4`, `lxml`, `pyyaml` have been removed. Trending scraping now uses Playwright browser mode only.\n\n### 📄 License\n\nMIT License","license":"MIT-0"},"metadata":null,"owner":{"handle":"leonforcode","userId":"s17ajeg3xt3h4r7vw4ccbfbvt984aev7","displayName":"leonforcode","image":"https://avatars.githubusercontent.com/u/248583476?v=4"},"moderation":{"isSuspicious":true,"isMalwareBlocked":false,"verdict":"suspicious","reasonCodes":["suspicious.llm_suspicious"],"summary":"Detected: suspicious.llm_suspicious","engineVersion":"v2.4.5","updatedAt":1777527229491}}