home / skills / openclaw / skills / ai-diff-summary
This skill summarizes git diffs into clear, human-friendly descriptions to accelerate code reviews and PR descriptions.
npx playbooks add skill openclaw/skills --skill ai-diff-summaryReview the files below or copy the command above to add this skill to your agents.
---
name: diff-summary
description: Summarize git diffs in plain English
---
# Diff Summary
Turn messy git diffs into human-readable summaries. Perfect for PR descriptions and code reviews.
## Quick Start
```bash
npx ai-diff-summary
```
## What It Does
- Summarizes staged changes
- Explains what code does, not just what changed
- Groups related changes
- Identifies breaking changes
## Usage Examples
```bash
# Summarize staged changes
npx ai-diff-summary
# Summarize specific commit
npx ai-diff-summary --commit abc123
# Compare branches
npx ai-diff-summary --from main --to feature/auth
# Output as PR description
npx ai-diff-summary --format pr
```
## Output Example
```markdown
## Summary
Added user authentication with JWT tokens
## Changes
- New login/logout endpoints in auth.ts
- JWT middleware for protected routes
- User model with password hashing
- Updated API docs
## Breaking Changes
- /api/users now requires authentication
```
## Requirements
Node.js 18+. OPENAI_API_KEY required. Must be in a git repo.
## License
MIT. Free forever.
---
**Built by LXGIC Studios**
- GitHub: [github.com/lxgicstudios/ai-diff-summary](https://github.com/lxgicstudios/ai-diff-summary)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)
This skill turns raw git diffs into concise, plain-English summaries suitable for PR descriptions and code review notes. It highlights what changed, groups related edits, and flags potential breaking changes so reviewers can quickly understand impact. Designed for use in local git repositories with Node.js and an OpenAI API key.
The tool reads staged changes, a specific commit, or a branch range and parses the diff into logical sections. It generates human-readable explanations of intent (what the code does) rather than only listing line-by-line edits, groups related changes together, and calls out breaking changes or API updates. Output formats include a short summary, detailed change list, and PR-ready markdown.
What inputs can it summarize?
It can summarize staged changes, a specific commit, or diffs between two branches or commits.
What output formats are available?
Outputs include a short summary, grouped change list, breaking changes section, and a PR-friendly markdown format.