ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 liawzishen

git-diff-timeline

Git Diff のタイムラインをプロンプトの上に表示する Claude Code mod です。

liawzishen@liawzishen

liawzishen/claude-code-mods/tree/main/git-diff-timeline

翻訳済み

この mod について

Git Diff のタイムラインをプロンプトの上に表示する Claude Code mod です。ブランチのコミットをカードで表示します(first parent のため、マージされた pull request は 1 コミットとして扱います)。コミットをクリックすると変更が表示され、2 つ目のコミットをクリックすると 2 つを比較できます。比較中のコミットメッセージはタイムラインの下に表示されます。Branches タブでは pull request と同じ方法(base...compare)で 2 つのブランチを比較し、先行・遅延コミットと分岐位置を表示します。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 .

同名の他の作品

関連作品