前言¶
在 DSH / 智能體開發場景裏,讓智能體“搜索 GitHub”時,通常不只希望拿到一批倉庫名,而是希望結果經過過濾、去重、相關度排序,並且能輸出適合進入上下文窗口的摘要。
Fectivnfy112357/github-explore 是一個面向 AI coding agents 的 DSH 插件,定位是 Discovery + management wrappers around the gh CLI for AI coding agents。下面介紹它的功能、安裝方式和典型用法。
這是什麼¶
Fectivnfy112357/github-explore 由 Fectivnfy112357 維護,採用 MIT 許可。
它圍繞 gh CLI 提供 GitHub 發現與管理封裝,包裝 gh search 和 gh repo view,不新增新的 CLI 入口。使用它需要 gh CLI,並要求 Python 3.10+。
核心功能¶
下面列出已覈實的插件能力:
- Multi-axis exploration:支持 parallel axes、relevance scoring、canonical anchor recall、awesome-list signals。
- Smart defaults:默認過濾 forks 和 archived repos,執行最小 star 下限,按
fullName去重,並渲染 layered markdown summary。 - Layered output:summary 輸出到 stdout,full report 輸出到臨時文件。
--schema支持:適用於find_repos、explore、repo_summary;其他腳本鏡像gh search的 camelCase 字段。- 不新增 CLI surface:能力均圍繞
gh search和gh repo view封裝。
安裝與啓用¶
如果通過 DSH 插件方式安裝,使用倉庫 shorthand:
dsh plugin --profile web add Fectivnfy112357/github-explore
該插件會在運行時通過 ctx.skills 註冊 skill。
使用前,先確認 gh CLI 已認證:
gh auth status
如果後續不再使用,可以移除插件:
dsh plugin --profile web remove github-explore
典型用法¶
以下命令來自已覈實用法示例。執行前請確保當前工作目錄包含對應的 scripts/ 目錄,並且 gh 已完成認證。
基礎倉庫檢索¶
按語言和最低 star 下限檢索倉庫:
python scripts/find_repos.py "vector database" --language python --min-stars 500
多軸探索¶
爲同一主題定義多個檢索軸,再合併結果:
python scripts/explore.py "multi-agent" --axis "framework|multi-agent framework in:readme; collaborative agents in:readme" --axis "protocol|A2A agent protocol in:readme; agent-to-agent communication in:readme"
機器可讀輸出¶
需要機器可讀輸出時,顯式傳入 --format json;管道不會自動切換輸出格式。
查看輸出結構¶
--schema 支持以下腳本:
find_reposexplorerepo_summary
輸出位置¶
插件會把 summary 輸出到 stdout,並把 full report 自動寫入臨時文件:
%TEMP%/gh-explore-{topic}-{ts}.md
適用場景與注意¶
適合需要把 GitHub 項目發現、摘要、JSON 輸出納入 DSH 智能體工作流的場景。
使用前注意:
- 依賴
ghCLI,需要先完成認證。 - 需要 Python 3.10+。
- 插件以當前 DSH 進程權限運行,安裝前建議檢查源碼和許可證。
- 許可證爲 MIT。
- 輸出會分層:stdout 摘要和臨時文件完整報告。
鏈接¶
GitHub 倉庫:
https://github.com/Fectivnfy112357/github-explore