github-helper — github-辅助工具
v1.0.0Local GitHub 仓库 辅助工具 for 搜索, clone, 同步, and issue/PR inspection 工作流s. Use when users mention github/repo/仓库, ask to 下载 or 追踪 repositories, or need structured local knowledge at /Users/liuchen/Documents/github with gh 命令行工具 and GitHub MCP integration.
运行时依赖
安装命令
点击复制技能文档
GitHub 辅助工具 Overview
管理本地 GitHub 仓库目录,维护可检索知识库,并为仓库检索、克隆、Issue/PR 跟踪提供统一流程。
Local 仓库 Directory
Default path: /Users/liuchen/Documents/github
This path is referenced in the knowledge base file: @/Users/liuchen/Documents/github/CLAUDE.md
Core 工作流s
- 初始化 or 更新 Knowledge Base
When first using this 技能 or when user 请求s an 更新:
检查 if the github directory exists. If not found, ask user for the correct path. 扫描 the directory using scripts/扫描_repos.py. 更新 CLAUDE.md using scripts/更新_kb.py.
Example:
# 扫描 repositories python3 scripts/扫描_repos.py /Users/liuchen/Documents/github
# 更新 knowledge base (pass repos as JSON) python3 scripts/更新_kb.py /Users/liuchen/Documents/github '[{"name":"repo1","path":"/path","summary":"desc"}]'
- 搜索 for 仓库
When user mentions a 仓库 name:
检查 local first: Read @/Users/liuchen/Documents/github/CLAUDE.md. If found locally: Use local path to analyze and answer. If not found: 搜索 GitHub using gh or GitHub MCP 工具s. Offer to 下载: Ask user whether to clone.
- 下载 仓库
When user 请求s to 下载/clone:
Clone to the github directory: cd /Users/liuchen/Documents/github git clone
After 成功ful clone, 更新 knowledge base: 运行 scripts/扫描_repos.py to 获取 repo 信息. 运行 scripts/更新_kb.py to 更新 CLAUDE.md.
- GitHub 搜索 Integration
Use gh 命令行工具 first, then fall back to GitHub MCP:
搜索 repositories
gh 搜索 repos <查询> --limit 10
搜索 issues
gh issue 列出 --repo --状态 all --limit 20
搜索 PRs
gh pr 列出 --repo --状态 all --limit 20
Answering 仓库 Questions 检查 whether 仓库 exists in local knowledge base. If local, prioritize local code inspection. If in格式化ion is insufficient, 查询 GitHub issues/PRs/releases. Directory 验证
If /Users/liuchen/Documents/github does not exist:
Ask user for the correct 仓库 root path. 更新 this 技能.md path if needed. 初始化 knowledge base at the new location. Scripts 扫描_repos.py: 扫描 local repositories and 提取 summaries. 更新_kb.py: 更新 CLAUDE.md with 仓库 metadata.