ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 neonelemental

fleet

两个 Claude Code 插件(fleet 和 board)在对话旁添加面板,由 GitHub Projects (v2) 看板驱动:fleet 按 epic 和 ticket 分组显示会话代理,并将子代理折叠在负责人下;board 按 Status 列列出一个或多个看板的卡片。

neonelemental@neonelemental

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

已翻译

关于这个 mod

fleet 和 board 是由 GitHub Projects (v2) 看板驱动的 Claude Code 面板插件,通过已登录的 gh CLI(read:project 权限)经 REST 读取数据。fleet 会按看板上的 epic 和 ticket 分组显示本次会话的代理:epic 是带子 issue 的 issue,会显示完成度、已有代理的 ticket,以及尚未处理的开放 ticket;ticket 会显示所在看板列和代理,负责人排在最前,子代理折叠在其下;已完成的 ticket 默认折叠,并显示代理数量。代理会根据描述中的标题 ID(ABC-12)或 issue 编号(#12)匹配 ticket;如果找不到,就使用提示前 400 个字符中的第一个标题 ID,或沿用父代理的 ticket;手写标签文件(.claude/fleet-tags.json)会覆盖所有这些规则。board 按 Status 列显示一个或多个看板的卡片 ID、标题、epic 子 issue 数量,以及卡片在 In progress 和 In review 列中停留的时间;多个看板同时存在时,可用按钮和 1..9 快捷键(另有 a 表示 All)选择显示内容,选择会在会话之间保留。通过 --plugin-dir 或 CLAUDE_CODE_PLUGIN_DIRS 环境设置安装;通过 /config 或 pluginConfigs 配置 owner、boards、statusField、ticketPattern、leadPattern、tagsFile、folded 和 doneColumn。需要启用 function hooks 的 Claude Code(在 2.1.286 上测试)以及 gh auth refresh -s read:project;不会向项目写入任何内容。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add neonelemental/claude-code-board-mods
claude plugin install fleet
原文 / 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.

更多类似作品