retrieve-diff-from-commit

Retrieve unified diffs and commit metadata from local Git repositories.

8|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/xinbenlv/codereview-skills --skill retrieve-diff-from-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: retrieve-diff-from-commit
Source: https://github.com/xinbenlv/codereview-skills/tree/main/skills/retrieve-diff-from-commit
Command: npx skills add https://github.com/xinbenlv/codereview-skills --skill retrieve-diff-from-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill retrieves code diffs from local git commits to streamline the code review process by providing immediate, contextual diff data.

Core Features & Use Cases

  • Diff Extraction: Retrieve unified diffs for a single commit, a commit range, or a branch against a base.
  • Metadata Gathering: Collect commit metadata such as author, date, and message for traceability.
  • Structured Output: Produce a machine-friendly output including diff content, file changes, and summary stats to feed review pipelines.

Quick Start

Retrieve diffs from a local commit or range to feed your review workflow.

Frequently Asked Questions about retrieve-diff-from-commit

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

FAQPage Schema
How do I get a git diff from a specific local commit for code review?

To get a git diff from a local commit for code review, you can retrieve unified diffs for a single commit, a commit range, or a branch against a base. The tool extracts the diff content along with metadata like author, date, and message for traceability.

Can I extract diffs from a commit range or branch against a base?

Yes, you can extract diffs from a commit range or a branch against a base. This functionality accommodates both staged and unstaged scenarios, producing a machine-friendly output including file changes and summary stats.

Does this tool gather commit metadata like author and date for traceability?

Yes, the tool gathers commit metadata such as author, date, and message for traceability. This metadata is collected alongside the diff content to provide context during the code review process.

What is the best way to format code diffs for downstream review pipelines?

The best way to format code diffs for downstream review pipelines is to produce a structured, machine-friendly output. This output includes the diff content, file changes, and summary stats, enabling efficient automated triage.

Can I retrieve unstaged changes using this diff extraction method?

Yes, you can retrieve unstaged changes using this diff extraction method. The tool is designed to accommodate both staged and unstaged scenarios when pulling diffs from local Git commits.