liawzishen/claude-code-mods/tree/main/git-diff-timeline
關於這個 mod
一個把 Git Diff 時間線放在提示列上方的 Claude Code mod:它以卡片呈現分支的提交(使用 first parent,所以合併的 pull request 算作一次提交);點選提交會顯示其變更,再點選第二個提交即可比較兩者,正在比較的提交訊息會顯示在時間線下方;Branches 分頁會用 pull request 的方式(base...compare)比較兩個分支,顯示領先與落後的提交,以及兩者分叉的位置;另有 GitHub 風格的檔案檢視,側邊面板列出正在比較的提交,以及每個變更檔案的 diff。它只讀取本機 git,因此適用於 GitHub、GitLab 或任何其他遠端服務。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add liawzishen/claude-code-mods 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 .
其他同名作品
- git-diff-timelineliawzishen · ★ 0
