From github-kb
GitHub 本地知識庫管理員與查詢助手。 當使用者提到 github、repo、repository、倉庫、下載 repo、clone、複製倉庫、PR、issue、pull request, 或任何與 GitHub 專案相關的內容時,必須觸發此技能。 此技能知道本地 repo 的位置,可以 clone 新的 repo,並使用 gh CLI 搜尋 issue、PR 與 repository 來回答問題。 主動使用——即使使用者只是詢問「我有哪些 repo」或隨口提到某個 GitHub 帳號或專案名稱。
How this skill is triggered — by the user, by Claude, or both
Slash command
/github-kb:github-kbThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
所有本地 clone 都存放於:`~/workspaces/github/`
所有本地 clone 都存放於:~/workspaces/github/
知識庫索引維護於:
@~/workspaces/github/AGENTS.md
每次觸發時先讀取此檔案,確認哪些 repo 已在本地。若檔案不存在或目錄不存在,請參閱下方「目錄不存在」段落。
在連線 GitHub 之前,先確認使用者提到的 repo 是否已 clone 在本地:
ls ~/workspaces/github/
若本地已有,優先直接讀取檔案——速度更快、可離線使用、不消耗 API 配額。
# 搜尋 repository
gh search repos <關鍵字> --limit 10
# 查看 repo 詳情
gh repo view <owner>/<repo>
# 列出 issues
gh issue list --repo <owner>/<repo> --state open --limit 20
# 搜尋 issues
gh search issues <關鍵字> --repo <owner>/<repo>
# 列出 PRs
gh pr list --repo <owner>/<repo> --state open --limit 20
# 查看特定 PR
gh pr view <編號> --repo <owner>/<repo>
# 搜尋程式碼
gh search code <關鍵字> --repo <owner>/<repo>
優先使用 gh 而非直接呼叫 curl——gh 會自動處理身份驗證。
當使用者說要下載或 clone 某個 repo:
git clone https://github.com/<owner>/<repo>.git ~/workspaces/github/<repo>
~/workspaces/github/AGENTS.md:
- **<repo>** (`<owner>/<repo>`): <一句話摘要>
條目依字母順序排列。~/workspaces/github/AGENTS.md 使用以下結構:
# GitHub 本地知識庫
此目錄存放本地 clone 的 GitHub repositories。
## Repositories
- **repo-name** (`owner/repo-name`): 這個 repo 的一句話說明。
- **another-repo** (`owner/another-repo`): 另一個 repo 的一句話說明。
更新索引時:
## Repositories 下- **<名稱>** (\/<名稱>`): <摘要>`若執行時 ~/workspaces/github/ 不存在:
~/workspaces/github。」mkdir -p ~/workspaces/githubAGENTS.md 索引。AGENTS.md 的記錄,再詢問確認。ricky1698。gh auth status 失敗,提醒使用者執行 gh auth login。npx claudepluginhub rdcrystallab/agentic-plugins --plugin github-kbLocates dwmkerr's personal and McKinsey GitHub repositories locally or clones via git/gh CLI. Preserves git state for inspection, searching, and branch viewing.
Executes GitHub operations via the gh CLI for inspecting repos, files, issues, PRs, releases, Actions, and cloning for deep analysis. Activates on github.com URLs or repo paths.