liawzishen/git-diff-timeline
git-diff-timeline
Git Diff のタイムラインをプロンプト上部に表示する Claude Code mod。commit 履歴カード、ブランチ比較、GitHub 風の変更ファイル表示を備え、ローカル git だけを読むため任意の remote で動作します。
この mod について
git-diff-timeline は、プロンプト上部に Git diff のタイムラインを描画する Claude Code プラグインです。History タブにはブランチの commit カードを表示します(first parent なので、マージされた PR は1つの commit として扱います)。commit をクリックして変更を確認したり、2つをクリックして比較したりできます。commit message はタイムラインの下に表示され、マージは pull/merge request のタイトルで示されます。Branches タブでは pull request のように2つのブランチ(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 で1セッションだけ読み込めます。`/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 .
同名の他の作品
- git-diff-timelineliawzishen · ★ 0
