home / skills / openclaw / skills / diff-summarizer
This skill generates clear, human-friendly summaries of git diffs to explain changes and improve PR descriptions and release notes.
npx playbooks add skill openclaw/skills --skill diff-summarizerReview the files below or copy the command above to add this skill to your agents.
---
name: diff-summarizer
description: Generate human-readable summaries of git diffs. Use when you need to explain what changed.
---
# Diff Summarizer
Git diffs are great for seeing exactly what changed, but terrible for understanding why. Scrolling through hundreds of lines of red and green to figure out what a set of changes actually means is nobody's idea of fun. This tool takes a git diff and turns it into a plain English summary. Perfect for changelogs, PR descriptions, or just figuring out what happened in the last few commits.
**One command. Zero config. Just works.**
## Quick Start
```bash
npx ai-diff-summary
```
## What It Does
- Reads git diffs and generates clear, human-readable summaries
- Works with any git ref: HEAD~3, branch names, commit hashes
- Summarizes changes by file and by overall impact
- Defaults to uncommitted changes when no ref is provided
- Outputs a clean summary you can paste into PR descriptions
## Usage Examples
```bash
# Summarize uncommitted changes
npx ai-diff-summary
# Summarize last 3 commits
npx ai-diff-summary HEAD~3
# Compare against main branch
npx ai-diff-summary main
# Summarize a specific commit
npx ai-diff-summary abc123
```
## Best Practices
- **Use it for PR descriptions** - Run it against main before opening a PR. Copy the summary right into the description. Your reviewers will thank you.
- **Generate changelogs** - Run it against your last release tag to generate a human-readable changelog for your users.
- **Keep diffs small** - Like code review, smaller diffs produce better summaries. If you're summarizing 500 files, the output won't be as useful.
- **Combine with commit messages** - The summary adds context that commit messages often miss. Use both together for complete documentation.
## When to Use This
- Writing PR descriptions and you don't want to list every change manually
- Generating release notes from a range of commits
- Understanding what changed in someone else's branch before reviewing
- Catching up on changes after being away from a project
## How It Works
The tool runs git diff with the ref you provide (or defaults to uncommitted changes). It sends the diff output to an AI model that parses the changes and produces a structured, plain English summary organized by impact and file.
## Requirements
No install needed. Just run with npx. Node.js 18+ recommended. Must be inside a git repository.
```bash
npx ai-diff-summary --help
```
## Part of the LXGIC Dev Toolkit
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgic.dev
## License
MIT. Free forever. Use it however you want.This skill generates clear, human-readable summaries of git diffs so you can quickly understand what changed and why. It converts raw git diff output into concise summaries organized by file and overall impact. Use it for PR descriptions, changelogs, or rapid onboarding to recent work.
The tool runs git diff for the ref you provide (or defaults to uncommitted changes) and collects the diff output. It then sends that diff to an AI parser which extracts high-level intent, highlights added/removed files, and organizes changes by impact and file. The result is a plain-English summary ready to paste into PR descriptions or release notes.
Do I need to install anything?
No install is required; run it with npx. Node.js 18+ is recommended.
What does it summarize by default if I provide no ref?
It defaults to uncommitted changes in the working tree when no ref is provided.