manuacl/claude-mods/tree/main/plugins/gh-hud
gh-hud
Claude Code 的 GitHub HUD:會話儲存庫的拉取要求在窗格中,帶有 GitHub-style 標籤、搜尋、過濾器、合併框和 /gh-hud 指令,可透過 gh CLI 讀取。
關於這個 mod
GH HUD
會話的 GitHub 儲存庫位於窗格中:GitHub 的選項卡(問題、拉取要求、操作),首先是拉取要求頁面;其他的都一來了。
- 窗格按照 GitHub 的方式列出拉取請求:打開和關閉及其計數(已關閉的合併計數)、打開、草稿、合併或關閉圖標、粗體標題、其顏色為圓形藥丸的標籤,然後是
#3 opened 2 days ago by author,以及是否是草稿、已批准或正在等待審核。 - 選項卡下的搜尋採用GitHub自己的語法(
author:、label:、review:required…);輸入搜尋內容,空白欄位會再次列出所有搜尋內容。 - 過濾器透過按鈕在抽屜中開啟:作者、標籤、評論、受讓人和排序,如 GitHub 的選單;該按鈕對這些進行計數。
- 密度開關將每個拉取請求放在一行上,其圖示、標題、編號和作者,或放在兩行上,並帶有標籤、年齡和評論。
- 按一下標題會在窗格中開啟拉取要求,而不是在瀏覽器中:它的狀態、誰合併什麼、在哪裡、描述、評論和更改的檔案;返回清單。
- 開放拉取請求底部的合併框遵循存儲庫的規則:為什麼它還不能合併(阻止、衝突、過時、草稿),或者 GitHub 的按鈕,先擠壓,其 ▾ 列出存儲庫允許的其他方法,用 GitHub 的話(沒有 ▾ 當允許時確認),在第二次按下時確認。僅合併顯示上的提交(
gh pr merge --match-head-commit):中間的推送會導致失敗。 - 它會在 GitHub 儲存庫中的會話開始時自行開啟,並開啟拉取請求;
/gh-hud隨時開啟。 - 保持新鮮 在會話開始時,每分鐘一次(在 GitHub 上進行審查或合併),在每個回合結束時(Claude 可能已推送或打開一個),當您按下 Pull 時請求選項卡和
/gh-hud。沒有模型調用,所以沒有權杖:每分鐘一個gh請求,遠低於 GitHub 的 5000 每小時。 - 語言:英語或法語,
/config。auto遵循 Claude Code 的language設定,然後是LC_ALL、LC_MESSAGES、LANG。
需要 gh CLI,登入 (gh auth login):mod 執行 gh pr list、gh pr view、gh repo view,並且在您確認後,在會話資料夾中執行 gh pr merge,並且永遠不會看到權杖。在 GitHub 儲存庫之外,該窗格顯示 gh 自己的錯誤。沒有文件,沒有其他指令。
拉取請求圖示為 Octicons(GitHub、MIT)。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add manuacl/claude-mods claude plugin install gh-hud
原文 / README
GH HUD
The session's GitHub repository in a pane: GitHub's tabs (Issues, Pull requests, Actions), the pull requests' page first; the others come one by one.
- The pane lists the pull requests the way GitHub does: Open and Closed with their counts (merged ones among the closed), the open, draft, merged or closed icon, the bold title, its labels as rounded pills in their colors, then
#3 opened 2 days ago by author, and whether it is a draft, approved or awaiting review. - The search under the tabs takes GitHub's own syntax (
author:,label:,review:required…); Enter searches, an empty field lists them all again. - The filters open in a drawer from their button: Author, Label, Reviews, Assignee and Sort, as GitHub's menus; the button counts those on.
- The density switch puts each pull request on one line, its icon, title, number and author, or back on two with labels, age and review.
- A click on a title opens the pull request in the pane, not in the browser: its state, who merges what where, the description, the comments and the files changed; Back returns to the list.
- The merge box at the bottom of an open pull request follows the repository's rules: why it cannot be merged yet (blocked, conflicts, out of date, draft), or GitHub's button, squash first, its ▾ listing the other methods the repository allows with GitHub's words (no ▾ when it allows one), confirmed in a second press. Only the commit on show is merged (
gh pr merge --match-head-commit): a push in between makes it fail. - It opens by itself at the start of a session in a GitHub repository with open pull requests;
/gh-hudopens it anytime. - Kept fresh at the start of the session, once a minute (a review or a merge on GitHub), at the end of every turn (Claude may have pushed or opened one), when you press the Pull requests tab and on
/gh-hud. No model call, so no token: oneghrequest a minute, far under GitHub's 5000 an hour. - Language: English or French, in
/config.autofollows Claude Code'slanguagesetting, thenLC_ALL,LC_MESSAGES,LANG.
Needs the gh CLI, signed in (gh auth login): the mod runs gh pr list, gh pr view, gh repo view and, on your confirmation, gh pr merge in the session's folder and never sees a token. Outside a GitHub repository the pane shows gh's own error. No files, no other commands.
The pull request icons are Octicons (GitHub, MIT).
