ccdwyer/transit-map

一个 Claude Code 插件,以 Vignelli 风格的地铁图绘制 git 历史:分支是彩色线路,提交是车站,工作树是列车;通过插件市场安装。
ccdwyer/transit-map

Transit Map 会在 Claude Code 中把你的仓库 git 历史绘制成 Vignelli 风格的地铁图。分支变成醒目的纯色线路(主干 main/master 始终为红色),提交显示为 ○ 车站,合并显示为 ◎ 换乘站,标签显示为 ▣ 终点站并标在上方。只有远端存在的分支以虚线绘制;工作树是一列位于 HEAD 稍后位置的列车,每个未提交文件对应一节车厢(最多 60 节),Claude 编辑文件时车厢会亮黄。地图是实时的:Claude 提交时新车站会出现,切换分支时列车会滑到另一条线路。/metro 会在面板中打开地图,提供平移、逐站浏览、滚动线路、提交详情和跟随列车控制,也有悬停提示。首次打开后,提示框上方会出现一行条带,显示当前线路、列车以及 ahead/behind 数量;/metro strip off 可将其隐藏。它会显示所有分支中最新的 120 个提交,把重叠的尖端折叠为车站旁标签,将超过 10 条的线路归入灰色的 +N more lines 车道,每回合刷新(包括子代理提交),并在移动端等不可交互界面上退回为纯文字时刻表。使用 /plugin marketplace add ccdwyer/claude-mods、/plugin install transit-map@ccdwyer-mods,然后执行 /reload-plugins 安装。它挂接 session.start、command.run{command=metro}、tool.call、turn.complete、ui.message、用于 Pane 和 AbovePrompt 的 ui.render,并调用引擎函数完成命令注册、git 进程执行、工作阶段 cwd、状态读写以及 UI 开启/解析。tool.call hook 只观察结果,以便在 git 命令和编辑后重绘。它完全在本地使用 git 运行,不会通过网络发送任何内容(见 PRIVACY.md)。采用 MIT 授权。
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add ccdwyer/transit-map claude plugin install transit-map

/metro draws the repo as a subway map with tags and four lines; after Claude commits, a new station appears and the train runs empty. Watch the MP4
A Claude Code mod that draws your git history as a Vignelli-style subway map.
main, master) is always red.○ stations, merges are ◎ interchanges, and tags are ▣ termini with their name above.╍.▶▶▶ past HEAD on your current line, with one car ▮ per uncommitted file (up to 60). Cars light up yellow when Claude edits that file./metro opens the map in a pane:
| Key | Action |
|---|---|
| ← →, or drag | pan |
| ↑ ↓ | walk the stations |
| PgUp PgDn | scroll lines into view |
| click or Enter | show a commit's hash, author, subject and files |
| f | follow the train |
Hover over a station to see its subject.
After you open the map once, a one-row strip above the prompt shows the line you're on, your train and ahead/behind counts. /metro strip off hides it.
The map shows the newest 120 commits across all branches, plus HEAD's own history if you've checked out something older. A branch that shares another's tip (one you just created, or a merged remote) has no line of its own; its name rides beside the station. Past 10 lines, the rest share a grey +N more lines lane. The map refreshes after each turn, so commits a subagent made appear too. Surfaces without interactive regions, such as mobile, get a plain timetable instead.
/plugin marketplace add ccdwyer/claude-mods
/plugin install transit-map@ccdwyer-mods
/reload-plugins
Events this mod hooks, as claude plugin validate reads the module:
session.startcommand.run{command=metro}tool.callturn.completeui.messageui.render{component=Pane, requestId=transit-map}ui.render{component=AbovePrompt}Engine calls it makes: $.command.register, $.process.run (via git), $.session.cwd (via repoRoot), $.state.get, $.state.set, $.ui.open, $.ui.resolve.
A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod only observes the result, to redraw the map after git commands and edits.
It runs entirely on your machine, using local git only. It sends nothing over the network. Full policy: PRIVACY.md.
MIT