Agent skill
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 this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/git-diff
SKILL.md
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
@@ -n,m +n,m @@headers
Sections
- Staged Changes (
git diff --cached) - shown first if present - Unstaged Changes (
git diff) - working directory modifications
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?