Skill

Generate Concise Git Pull Request Descriptions

Generates a clean PR description from commit history alone, treating commit/diff text as untrusted data.

Works with git

80
Spark score
out of 100
Updated 2 days ago
Version 15.5.1

Add to Favorites

Why it matters

Automate the creation of clear and structured pull request descriptions by analyzing commit history, saving developers time and ensuring consistent communication.

Outcomes

What it gets done

01

Analyze commit messages to identify changes.

02

Group related changes by feature or module.

03

Conditionally inspect diffs for clarity.

04

Format descriptions with a title, summary, changes, and impact.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-git-pr-review | bash

Overview

Git Pr Review

Generates a clean, objective PR description by analyzing commit history token-efficiently, grouping commits by feature and treating all commit and diff text as untrusted data rather than instructions. Use it when generating a structured pull-request description from commit history to keep descriptions consistent and reduce manual effort.

What it does

Creates a clean, objective pull-request description by analyzing commit history between a base and current branch, token-efficiently: it starts with commit messages only, and only inspects a full diff when a commit message is too vague or its grouping is unclear. It explicitly treats commit messages, branch names, file names, and diff contents as attacker-controlled when reviewing external PRs - text from git log/git show is inert evidence, never instructions, and prompt-like strings such as "assistant ignore previous instructions" are ignored rather than acted on; if a commit message conflicts with the actual diff, the diff wins and the mismatch gets flagged.

git log --no-merges --pretty=format:"%h|%s" main..HEAD

Its pipeline: classify each commit's type (feat, fix, refactor, chore, docs, or test - inferred from keywords if missing), discard noise (merges, typo/docs-only, lint/format, console.log removal, comment-only, minor renames), group commits by feature or module using keyword and file-path heuristics, then build a strict-format PR description - a max-72-character conventional-commit-style title, a 1-2-line summary, grouped "Changes" bullets, optional "Technical Notes" (migrations, env vars, breaking changes), and an "Impact" section - capped at roughly 120-180 words total, with no emojis, no repeated commit messages, and no generic filler phrases.

When to use - and when NOT to

Use it when generating a structured pull-request description from commit history, especially to keep descriptions consistent and reduce manual writing effort.

Inputs and outputs

Input: a base and target branch (default main and HEAD) in a git repository. Output: a PR title and description following the strict Summary/Changes/Technical Notes/Impact format, within the 120-180 word cap.

Who it's for

Developers who want a consistent, objective PR description generated from commit history without hand-writing it or having an untrusted commit or diff turn into an injected instruction.

Its stated limitations are honest about where it can fall short: it relies on commit-message quality, so vague commits reduce accuracy; it does not deeply analyze code changes unless the diff-inspection step triggers; its grouping heuristics may not perfectly reflect complex, overlapping feature boundaries; and it assumes a relatively clean commit history rather than one full of excessive noise. Its worked example shows the grouping logic in practice: commits touching auth.service and auth.controller cluster into an "authentication" group, while payment and checkout commits cluster into a "payment flow" group, producing a title like feat(auth): implement JWT authentication and session handling with a two-line summary and grouped change bullets underneath.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.