Claude-skill-registry git-diff
Display git changes in GitHub-style unified diff format with colored terminal output. Shows both staged (--cached) and unstaged changes with two-column line numbers, red/green highlighting, and chunk markers. Use when reviewing code changes, preparing commits, or comparing file modifications. Triggers on "git diff", "show changes", "what changed", or "review diff".
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/git-diff" ~/.claude/skills/majiayu000-claude-skill-registry-git-diff && rm -rf "$T"
manifest:
skills/data/git-diff/SKILL.mdsource content
git-diff
Display git changes in GitHub-style unified diff format.
Execution
Run the Python script to display formatted diff:
python3 scripts/github_diff.py [optional-path]
Output Format
- File headers: Dark background with filepath
- Line numbers: Two columns (old | new)
- Deletions: Red background with
marker- - Additions: Green background with
marker+ - Context: Neutral with both line numbers
- Chunk markers: Cyan
headers@@ -n,m +n,m @@
Sections
- Staged Changes (
) - shown first if presentgit diff --cached - Unstaged Changes (
) - working directory modificationsgit diff
Examples
# Show all changes python3 scripts/github_diff.py # Filter by path python3 scripts/github_diff.py src/components/
Requirements
- Python 3.6+
- Git installed and in PATH
- Terminal with ANSI color support