ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 cjmellor

git-diff

커밋하지 않은 git 변경 사항을 프롬프트 위에 표시하고 변경 파일과 추가/삭제 줄 수를 보여 주며, 변경 파일을 평면 목록 또는 폴더 트리로 나열하는 전환 가능한 창을 제공하는 Claude Code mod입니다.

cjmellor@cjmellor

cjmellor/mella-marketplace/tree/main/plugins/git-diff

번역 완료

이 mod 소개

프롬프트 위에 커밋하지 않은 git 변경 사항을 표시합니다. 변경 파일, 추가된 줄(녹색)과 삭제된 줄(빨간색)을 GitHub 스타일 막대와 함께 보여 줍니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add cjmellor/mella-marketplace
claude plugin install git-diff
원문 / README

git-diff

A Claude Code mod that keeps your uncommitted git changes in view.

A band above the prompt shows how much has changed, and a pane lists every changed file, as a flat list or a folder tree.

Mods run code inside Claude Code on your machine. Read the source before you install one — this one is a single file, hooks/register.tsx, and only runs git commands in your project.

The band

Shown above the prompt whenever the working tree has changes:

± 3 files  +120 −45  ◼◼◼◼◼  +
  • Files changed, lines added (green) and removed (red).
  • Five squares split by the share of added lines, like GitHub's diff stat.
  • The current branch (a Nerd Font branch icon, U+E725, then the name, or the short hash on a detached HEAD) sits at the far right of the row.
  • The button after the squares shows + while the pane is closed and − while it is open. Press it to open or close the pane.

With no changes the band shows only the branch, at the right. It is hidden outside a git repository and while a survey is up.

The pane

Open it with the + button on the band or with /git-diff.

  • List — every changed file with its full path, biggest change first.
  • Tree — folders first, then files. Each folder shows its rolled-up totals, folders with a single child folder merge into one row (src/a/b/), and a dim │ guide marks each nesting level.
  • Each row has its own +N −N and five-square bar.

Press t to switch views (the button reads View: List (t) or View: Tree (t)). Esc hands the keyboard back and closes the pane. The pane opens sized to fit its content, up to 30 rows. Your choice of view is kept for the session.

t works while the pane holds the keyboard, which it does when you open it. If you have clicked away, click the pane or press ctrl+x then tab to give it back.

What counts as a change

git diff HEAD --numstat for tracked files, plus untracked files that are not gitignored, counted line by line without touching your index. Binary files are listed with +0 −0.

It refreshes at session start, after each Edit or Write, and at the end of every turn. Changes made some other way (your editor, a shell command) show up at the end of the next turn, or when you reopen the pane.

Install

/plugin marketplace add cjmellor/mella-marketplace
/plugin install git-diff@mella-marketplace
/reload-plugins

To try it from a checkout without installing:

claude --plugin-dir plugins/git-diff

Develop

claude plugin validate plugins/git-diff
claude plugin test plugins/git-diff

validate checks the manifest and the hooks module, but it does not check what the band draws: an invalid render tree is dropped by the engine and the band simply does not appear. If it goes missing after an edit, run Claude Code with --debug and look for a ui.render (AbovePrompt): a hook returned a tree that does not validate line.

Limits

  • Only one hook can draw the band. This mod asks the hooks beneath it for their tree and stacks its own row on top, so it sits alongside other band mods that do the same. A mod that draws without asking replaces it.
  • Only the first 100 untracked files are counted.
  • The pane is a snapshot taken when it opens; it does not update while open.
  • A hot reload of the mod closes an open pane.
  • The terminal draws a button under the pointer as an inverted block. That comes from the engine and cannot be styled.

비슷한 프로젝트