Skip to content
Back to skills

Git Diff

ASecurity

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".

  • 666 stars
  • 0 votes
  • 1 copy
  • 15 views
  • Added February 8, 2026
developmentpythonbashgit

Works with

  • terminal

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill git-diff --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Diff?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Diff
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-git-diff/badge)](https://www.skillsdirectory.com/skills/majiayu000-git-diff)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-diff
description: 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".
allowed-tools: Bash, Read
---

# git-diff

Display git changes in GitHub-style unified diff format.

## Execution

Run the Python script to display formatted diff:

```bash
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 `@@ -n,m +n,m @@` headers

## Sections

1. **Staged Changes** (`git diff --cached`) - shown first if present
2. **Unstaged Changes** (`git diff`) - working directory modifications

## Examples

```bash
# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.