ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 neonelemental

board

顯示 GitHub 專案看板(Projects v2)的面板,可依 Status 欄位顯示全部或指定看板,透過 gh 使用 REST 讀取

neonelemental@neonelemental

neonelemental/claude-code-board-mods/tree/main/board

已翻譯

關於這個 mod

Claude Code 的 fleet 與 board 面板

兩個 Claude Code 外掛,各自在對話旁顯示一個面板,由 GitHub Projects(v2)看板驅動。

fleet

本工作階段的代理程式,依照看板上的史詩任務和工單分組。

  • 史詩任務是有子工單的 issue。它會顯示完成狀態(所有子工單中已關閉的項目,排除未規劃和重複項目)、已有代理程式處理的工單,以及還沒有代理程式碰過的開放工單。
  • 工單會顯示看板欄位和代理程式:先列負責人,再把子代理程式摺疊在下方。完成的工單預設會摺疊,並顯示代理程式數量。
  • 直接點名史詩任務本身的代理程式會並列在史詩任務下,不會互相指定負責人。
  • 工作階段不再列出的代理程式會標記為 stopped。
  • 不屬於任何史詩任務的工單會列在「Not in an epic」下,沒有點名任何工單的代理程式會列在「on no ticket」下。

/fleet 開啟面板。

board

依 Status 欄位顯示一個或多個看板:每張卡片的 id 和標題,史詩任務優先;在 In progress 和 In review 欄位中,也會顯示卡片移入該欄的時間。看板達到兩個以上時,每個看板有一個按鈕(快速鍵 1..9),另有 All(快速鍵 a)選擇顯示內容;在 All 中,同一張卡片若出現在多個看板,只會繪製一次。選擇會在工作階段之間保留。

/board 開啟面板,/board <number> 在一個看板上開啟,/board all 在所有看板上開啟。

需求

  • 需要啟用函式勾點外掛的 Claude Code。這些外掛是以 2.1.286 建置和測試的。如果面板沒有顯示,請執行 claude --debug,它會說明哪個外掛沒有載入以及原因;函式勾點關閉時,在 Claude Code 的環境中設定 CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 即可開啟。
  • GitHub CLI gh,並已登入 read:project 權限範圍:gh auth refresh -s read:project。面板透過 gh 使用 REST 讀取 GitHub,從不使用 GraphQL。
  • GitHub Projects(v2)看板,可由一位使用者或組織擁有。對 fleet 來說,子工單會讓一個工單成為史詩任務。

安裝

git clone https://github.com/neonelemental/claude-code-board-mods.git
claude --plugin-dir /path/to/claude-code-board-mods/fleet --plugin-dir /path/to/claude-code-board-mods/board

桌面應用程式不接受旗標;請改在 ~/.claude/settings.json 的 env 區塊中填入資料夾,並以平台的路徑分隔符號分開(macOS 和 Linux 上是 :):

{
  "env": {
    "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/claude-code-board-mods/fleet:/path/to/claude-code-board-mods/board"
  }
}

設定

每個設定都是 /config 中的一列,或放在 ~/.claude/settings.json 的 pluginConfigs 下,以外掛名稱為鍵:

{
  "pluginConfigs": {
    "fleet": { "options": { "owner": "acme", "boards": "3,4", "leadPattern": "^run\\b" } },
    "board": { "options": { "owner": "acme", "boards": "3,4" } }
  }
}

兩個外掛都支援:

| 設定 | 預設值 | 說明 | | --- | --- | --- | | owner | none | 擁有看板的 GitHub 使用者或組織。在設定 owner 與 boards 前,面板會說明如何設定。 | | boards | none | 以逗號分隔的專案編號:3,4。編號就是看板 URL 中的編號。 | | statusField | Status | 單選欄位;選項就是依看板順序排列的欄位。 | | ticketPattern | [A-Z][A-Z0-9]*-\d+ | 用來比對 issue 標題開頭工單 id 的正規表示式:ABC-12 Fix login 會得到 ABC-12。沒有 id 的 issue 會命名為 #<number>。無法編譯的模式會退回預設值,面板會說明這一點。 |

僅限 fleet:

| 設定 | 預設值 | 說明 | | --- | --- | --- | | leadPattern | empty | 不分大小寫比對代理程式描述的正規表示式:代理程式處理的工單符合它時,該代理程式就是工單負責人。空白時,第一個點名工單的代理程式負責。 | | tagsFile | .claude/fleet-tags.json | 手動對應檔,相對於工作階段所在目錄。 |

僅限 board:

| 設定 | 預設值 | 說明 | | --- | --- | --- | | folded | Backlog,Done | 啟動時預設摺疊的欄位,以逗號分隔。 | | doneColumn | Done | 依最近關閉優先列出的欄位,顯示其中最新的 25 張卡片。 |

欄位名稱比對時會忽略大小寫和空格。In progress、In review、Ready、Todo、Backlog 和 Done 各自有專屬標記與色彩,其他欄位使用普通圓點。

代理程式如何加入工單

代理程式的描述點名某個工單時,就屬於該工單,可以使用標題 id(ABC-12)或 issue 編號(#12;該編號也能找到帶有標題 id 的 issue)。如果沒有,則取提示前 400 個字元中的第一個標題 id。由其他代理程式啟動的代理程式屬於父代理程式的工單。沒有出現在看板上的 id 會保留為自己的工單,標記為「Not on a board」。

標籤檔可以手動決定代理程式歸屬,而且優先於其他規則。它只讀取,不寫入:

{ "<agent id>": "ABC-12" }

fleet 會把看過的代理程式記在外掛自己的儲存中,每個工作階段目錄一筆記錄,因此史詩任務關閉前,代理程式會一直列在該史詩任務下。史詩任務之外的已完成工作會繼續列出 12 小時。它不會寫入你的專案。

測試

從複製下來的目錄執行:

claude plugin validate fleet
claude plugin validate board
claude plugin test fleet
claude plugin test board

測試會透過 gh 讓外掛對引擎執行,並由工作階段的代理程式憑記憶回答;測試不會連線網路。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add neonelemental/claude-code-board-mods
claude plugin install board
原文 / README

Fleet and board panes for Claude Code

Two Claude Code plugins, each a pane beside the conversation, driven by GitHub Projects (v2) boards.

fleet

This session's agents, grouped by the epics and tickets on your boards.

  • An epic is an issue with sub-issues. It shows its completion (closed sub-issues of all, not-planned and duplicates left out), its tickets that have agents, and its open tickets no agent has touched yet.
  • A ticket shows its board column and its agents: the lead, then its sub-agents folded under it. A finished ticket starts folded, with its agent count.
  • Agents that name the epic itself are listed under it side by side, none leading the others.
  • An agent the session no longer lists is marked stopped.
  • Tickets in no epic are listed under "Not in an epic", agents that name no ticket under "on no ticket".

/fleet opens the pane.

board

One or more boards, by Status column: each card's id and title, epics first with their sub-issue count, and in the In progress and In review columns how long ago the card moved. With two or more boards, a button per board (hotkeys 1..9) and All (hotkey a) pick what is shown; on All, a card on several boards is drawn once. The pick is kept between sessions.

/board opens the pane, /board <number> opens it on one board, /board all on every board.

Requirements

  • Claude Code with function-hook plugins. These were built and tested against 2.1.286. If a pane does not show, run claude --debug, which names a plugin that did not load and why; where function hooks are switched off, CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in Claude Code's environment turns them on.
  • The GitHub CLI, gh, signed in with the read:project scope: gh auth refresh -s read:project. The panes read GitHub over REST through gh and never use GraphQL.
  • GitHub Projects (v2) boards owned by one user or organization. For fleet, sub-issues make a ticket an epic.

Install

git clone https://github.com/neonelemental/claude-code-board-mods.git
claude --plugin-dir /path/to/claude-code-board-mods/fleet --plugin-dir /path/to/claude-code-board-mods/board

The desktop app takes no flags; name the folders in the env block of ~/.claude/settings.json instead, separated by the platform's path separator (: on macOS and Linux):

{
  "env": {
    "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/claude-code-board-mods/fleet:/path/to/claude-code-board-mods/board"
  }
}

Settings

Each setting is a row in /config, or goes under pluginConfigs in ~/.claude/settings.json, keyed by the plugin's name:

{
  "pluginConfigs": {
    "fleet": { "options": { "owner": "acme", "boards": "3,4", "leadPattern": "^run\\b" } },
    "board": { "options": { "owner": "acme", "boards": "3,4" } }
  }
}

Both plugins:

| Setting | Default | What it is | | --- | --- | --- | | owner | none | The GitHub user or organization that owns the boards. Until it and boards are set, the pane says how to set them. | | boards | none | Project numbers, comma-separated: 3,4. The number is the one in the board's URL. | | statusField | Status | The single-select field whose options are the columns, in the board's order. | | ticketPattern | [A-Z][A-Z0-9]*-\d+ | A regular expression for a ticket id at the start of an issue title: ABC-12 Fix login is ABC-12. An issue without one is named #<number>. A pattern that does not compile falls back to the default, and the pane says so. |

fleet only:

| Setting | Default | What it is | | --- | --- | --- | | leadPattern | empty | A regular expression matched against agent descriptions, ignoring case: an agent on a ticket that matches it leads the ticket. Empty: the first agent to name the ticket leads it. | | tagsFile | .claude/fleet-tags.json | The hand-mapping file, relative to the session's directory. |

board only:

| Setting | Default | What it is | | --- | --- | --- | | folded | Backlog,Done | Columns that start folded, comma-separated. | | doneColumn | Done | The column listed newest-closed first, its latest 25 cards. |

Column names are compared ignoring case and spaces. In progress, In review, Ready, Todo, Backlog and Done get their own marks and colours; any other column gets a plain dot.

How agents join tickets

An agent belongs to a ticket when its description names it, by title id (ABC-12) or issue number (#12; the number also finds an issue that has a title id). Failing that, the first title id in the first 400 characters of its prompt counts. An agent started by another agent belongs to its parent's ticket. An id on no board stays a ticket of its own, marked "Not on a board".

The tags file settles an agent by hand and wins over the rest. It is read, never written:

{ "<agent id>": "ABC-12" }

fleet remembers the agents it has seen in the plugin's own store, one record per session directory, so an agent stays under its epic until the epic is closed. Finished work outside an epic stays listed for 12 hours. Nothing is written into your project.

Tests

From the clone:

claude plugin validate fleet
claude plugin validate board
claude plugin test fleet
claude plugin test board

The tests run the plugins against the engine with gh and the session's agents answered from memory; they reach no network.

更多類似作品