pr-summarizer
PR Summarizer generates a structured pull request description from a branch diff by analyzing commits, file changes, and test coverage. Use it immediately before opening a PR or after force-pushing substantial updates to refresh the description, but avoid it for drafts still under iteration or diffs exceeding 1000 lines.
git clone --depth 1 https://github.com/oxbshw/LLM-Agents-Ecosystem-Handbook /tmp/pr-summarizer && cp -r /tmp/pr-summarizer/skills/catalog/pr-summarizer ~/.claude/skills/pr-summarizerSKILL.md
# PR Summarizer
## When to use
- Just before opening a PR
- After force-pushing a substantive update to an existing PR (refresh description)
## When NOT to use
- Drafts the user is still iterating on (the summary will go stale immediately)
- Massive diffs (> 1000 lines) — ask the user to scope first
## Inputs
| Name | Type | Required | Notes |
|---|---|---|---|
| `base` | string | no | default `origin/main` |
| `branch` | string | no | default current `HEAD` |
## Outputs
A markdown PR body with sections: **Summary**, **Why**, **How tested**, **Risks**, **Linked**.
## Workflow
1. `git diff <base>...HEAD --stat` and `git log <base>..HEAD --oneline` to see scope
2. `git diff <base>...HEAD` for content
3. Group changes by area (one bullet per logical concern, not per file)
4. Pull "why" from commit messages + linked tickets if mentioned
5. Identify test artifacts touched; surface as **How tested** (or flag if none)
6. Risks: any High-risk paths touched? auth, billing, migrations? mention.
7. Linked: parse `Fixes #` / `Refs #` from commits
## References
- [`references/pr-template.md`](references/pr-template.md)
## Success criteria
- Description ≤ 25 lines
- Every "why" claim is supported by a commit message or visible in the diff
- Risks section honest about unknowns ("untested in production data shape")
## Failure modes
- No commit messages worth quoting → "Why" sourced from diff only; flag this
- Diff touches secrets / `.env*` → STOP and surface; PR shouldn't include themUse when capturing an architecture decision so it survives turnover — produces an ADR-NNNN.md from context, options considered, and the chosen path.
Use when reviewing a proposed REST or GraphQL API change before merge — checks contract clarity, backwards compatibility, errors, pagination, auth, and naming.
Use when first encountering a new dataset — produces a structured profile (schema, missingness, distributions, outliers, gotchas) before any analysis.
Use after an incident is resolved — drafts a blameless postmortem from timeline notes, alerts, and chat threads.
Use when planning the next sprint — turns ticket intake + team capacity into a planned sprint with explicit non-goals.
Use after a session to promote useful episodic notes from logs/episodic/ into distilled, dated entries in MEMORY.md and memory/semantic/.
Use before connecting a new MCP server to your agent — produces a structured security review covering source, permissions, tools, network, and approvals.