git_diff

Generate unified Git diffs for commits, unstaged changes, or specific paths.

8|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/OpenAuthority/clawthority --skill git-diff-openauthority
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git_diff
Source: https://github.com/OpenAuthority/clawthority/tree/main/examples/skills/git_diff
Command: npx skills add https://github.com/OpenAuthority/clawthority --skill git-diff-openauthority

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compute unified diffs for a Git repository to quickly see changes between states.

Core Features & Use Cases

  • Generate unified diffs for unstaged changes, commits, or specific paths.
  • Support optional ref and path filters to focus on relevant changes.
  • Provide a deterministic, textual diff suitable for review or tooling.

Quick Start

Run the tool with optional ref and path parameters to obtain a diff for the target state.

Frequently Asked Questions about git_diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I view unstaged changes in a Git repository as a unified diff?

You can view unstaged changes in a Git repository by computing a unified diff between your working tree and the current commit. This returns a textual diff string for code review.

Can I compare a working tree against a specific commit using a Git diff?

Yes, you can compare a working tree against a specific commit by passing an optional ref parameter to the Git diff tool. This returns a textual diff string showing changes between the target commit and your current files.

How do I get a unified diff for a specific file or path in version control?

To get a unified diff for a specific file or path, you apply optional path filters when computing the Git diff. This focuses the returned textual diff string strictly on changes within the targeted directory or file.

What is the best way to generate a deterministic textual diff for code review?

The best way to generate a deterministic textual diff for code review is by computing a unified diff from your Git repository. This provides a stable, tool-friendly output string visualizing changes between states.

Does a Git diff tool surface repository errors during code comparison?

Yes, computing a Git diff surfaces repository errors during code comparison via defined error codes. This ensures that issues encountered while visualizing changes between states are explicitly returned to the caller.