Pull Request Enhancement
When to Use
- You need to turn a git diff into a reviewer-friendly pull request description.
- You want a PR summary with change categories, risks, testing notes, and a checklist.
- The diff is large enough that reviewers need explicit structure instead of a short ad hoc summary.
Workflow
- Run
git diff <base>...HEAD --stat to identify changed files and scope
- Categorise changes: source, test, config, docs, build, styles
- Generate the PR description using the template below
- Add a review checklist based on which file categories changed
- Flag breaking changes, security-sensitive files, or large diffs (>500 lines)
PR Description Template
## Summary
<!-- one-paragraph executive summary: what changed and why -->
## Changes
| Category | Files | Key change |
|----------|-------|------------|
| source | `src/auth.ts` | added OAuth2 PKCE flow |
| test | `tests/auth.test.ts` | covers token refresh edge case |
| config | `.env.example` | new `OAUTH_CLIENT_ID` var |
## Why
<!-- link to issue/ticket + one sentence on motivation -->
## Testing
- [ ] unit tests pass (`npm test`)
- [ ] manual smoke test on staging
- [ ] no coverage regression
## Risks & Rollback
- **Breaking?** yes / no
- **Rollback**: revert this commit; no migration needed
- **Risk level**: low / medium / high — because ___
Review Checklist Rules
Add checklist sections only when the matching file category appears in the diff:
| File category |
Checklist items |
| source |
no debug statements, functions <50 lines, descriptive names, error handling |
| test |
meaningful assertions, edge cases, no flaky tests, AAA pattern |
| config |
no hardcoded secrets, env vars documented, backwards compatible |
| docs |
accurate, examples included, changelog updated |
security-sensitive (auth, crypto, token, password in path) |
input validation, no secrets in logs, authz correct |
Splitting Large PRs
When diff exceeds 20 files or 1000 lines, suggest splitting by feature area:
git checkout -b feature/part-1
git cherry-pick <commits-for-part-1>
Resources
resources/implementation-playbook.md — Python helpers for automated PR analysis, coverage reports, and risk scoring
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
1---2name: comprehensive-review-pr-enhance3description: Generate structured PR descriptions from diffs, add review checklists, risk assessments, and test coverage summaries. Use when the user says "write a PR description", "improve this PR", "summarize my4---5
6
7# Pull Request Enhancement
8
9## When to Use
10- You need to turn a git diff into a reviewer-friendly pull request description.
11- You want a PR summary with change categories, risks, testing notes, and a checklist.
12- The diff is large enough that reviewers need explicit structure instead of a short ad hoc summary.
13
14## Workflow
15
161. Run `git diff <base>...HEAD --stat` to identify changed files and scope
172. Categorise changes: source, test, config, docs, build, styles
183. Generate the PR description using the template below
194. Add a review checklist based on which file categories changed
205. Flag breaking changes, security-sensitive files, or large diffs (>500 lines)
21
22## PR Description Template
23
24```markdown
25## Summary
26<!-- one-paragraph executive summary: what changed and why -->
27
28## Changes
29| Category | Files | Key change |
30|----------|-------|------------|
31| source | `src/auth.ts` | added OAuth2 PKCE flow |
32| test | `tests/auth.test.ts` | covers token refresh edge case |
33| config | `.env.example` | new `OAUTH_CLIENT_ID` var |
34
35## Why
36<!-- link to issue/ticket + one sentence on motivation -->
37
38## Testing
39- [ ] unit tests pass (`npm test`)
40- [ ] manual smoke test on staging
41- [ ] no coverage regression
42
43## Risks & Rollback
44- **Breaking?** yes / no
45- **Rollback**: revert this commit; no migration needed
46- **Risk level**: low / medium / high — because ___
47```
48
49## Review Checklist Rules
50
51Add checklist sections only when the matching file category appears in the diff:
52
53| File category | Checklist items |
54|---------------|----------------|
55| source | no debug statements, functions <50 lines, descriptive names, error handling |
56| test | meaningful assertions, edge cases, no flaky tests, AAA pattern |
57| config | no hardcoded secrets, env vars documented, backwards compatible |
58| docs | accurate, examples included, changelog updated |
59| security-sensitive (`auth`, `crypto`, `token`, `password` in path) | input validation, no secrets in logs, authz correct |
60
61## Splitting Large PRs
62
63When diff exceeds 20 files or 1000 lines, suggest splitting by feature area:
64
65```
66git checkout -b feature/part-1
67git cherry-pick <commits-for-part-1>
68```
69
70## Resources
71
72- `resources/implementation-playbook.md` — Python helpers for automated PR analysis, coverage reports, and risk scoring
73
74## Limitations
75- Use this skill only when the task clearly matches the scope described above.
76- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
77- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.