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

git-diff-timeline

將 Git Diff 時間線放在提示列上方的 Claude Code 外掛,包含 commit 歷史卡片、分支比較和 GitHub 風格的檔案變更檢視。只讀取本機 git,因此適用於任何 remote。

已翻譯

關於這個 mod

git-diff-timeline 是 Claude Code 外掛,會在提示列上方呈現 Git diff 時間線。History 分頁顯示分支的 commit 卡片(第一個 parent,因此合併的 PR 算作一個 commit);點選 commit 可查看其變更,也可以點選兩個 commit 進行比較,commit message 會顯示在時間線下方,合併則以 pull/merge request 標題命名。Branches 分頁會像 pull request 一樣比較兩個分支(base...compare):領先和落後的 commit、分岔位置,以及 compare 分支新增的內容。側邊面板會列出比較中的 commit,以及每個變更檔案和它的 diff。它只讀取本機 git,因此適用於 GitHub、GitLab 或任何其他 remote。透過 ~/.claude/settings.json 的 env block 載入資料夾作為外掛目錄(CLAUDE_CODE_PLUGIN_DIRS 和 CLAUDE_CODE_PLUGIN_DIR_WATCH),或用 claude --plugin-dir /path/to/git-diff-timeline 為單一工作階段載入。`/gitdiff 開啟檔案檢視,position 選項(band 或 pane)可在提示列上方的 strip 和側邊窗格之間選擇。

安裝

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

claude plugin marketplace add liawzishen/git-diff-timeline
claude plugin install git-diff-timeline
原文 / README

git-diff-timeline

A Claude Code mod that puts a Git Diff timeline above the prompt.

  • History: a card of the branch's commits (first parent, so a merged pull request is one commit). Click a commit to see its changes; click a second commit to compare the two. The commit messages being compared show under the timeline, with merges named by their pull or merge request title.
  • Branches: compare two branches the way a pull request would (base...compare): commits ahead and behind, where they split, and what the compare branch adds.
  • Files changed: a side panel listing the compared commits and each changed file, with its diff.

It reads local git only, so it works with GitHub, GitLab or any other remote.

Install

Load the folder as a plugin directory, for every session, through the env block of ~/.claude/settings.json:

{
  "env": {
    "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/git-diff-timeline",
    "CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"
  }
}

Or for one session: claude --plugin-dir /path/to/git-diff-timeline.

/gitdiff opens the files view. The position option (band or pane) chooses between the strip above the prompt and a side pane.

Test

claude plugin test .
claude plugin validate .

其他同名作品

更多類似作品