pr-description
Generate comprehensive pull request descriptions by analyzing git commits and diff. Creates structured summaries with changes breakdown, testing instructions, and related issues following team PR templates.
What this skill does
# PR Description Generator
Generate comprehensive pull request descriptions from git history.
## Overview
This skill creates well-structured PR descriptions by analyzing your branch's commits and diff against the base branch. It categorizes changes, extracts related issues, detects breaking changes, and formats everything according to your team's PR template.
**What it creates:**
- Formatted PR title following conventional commits
- Summary of what changed and why
- Categorized list of modifications
- Testing instructions
- Related issue links
## Workflow
### Step 1: Analyze Branch
I'll examine your branch compared to the base:
```bash
# Get commit history
git log main..HEAD --oneline
# Get file changes
git diff main..HEAD --name-status
# Get statistics
git diff main..HEAD --stat
```
### Step 2: Categorize Changes
Group modified files by type:
| Category | Patterns | Label |
|----------|----------|-------|
| Source | `src/`, `lib/`, `app/` | Implementation |
| Tests | `test/`, `*.test.*`, `*.spec.*` | Testing |
| Docs | `docs/`, `*.md`, `README` | Documentation |
| Config | `*.json`, `*.yaml`, `.*rc` | Configuration |
| CI/CD | `.github/`, `Dockerfile` | Infrastructure |
| Styles | `*.css`, `*.scss` | Styling |
### Step 3: Extract Information
From commits and diff, I identify:
- **PR Type**: feat, fix, refactor, docs, etc.
- **Scope**: Primary area affected
- **Breaking Changes**: API changes, removed features
- **Related Issues**: #123, JIRA-456 references
- **Authors**: Contributors to credit
### Step 4: Generate Description
Create structured PR description:
```markdown
## Summary
[What changed and why]
## Changes
### [Category]
- Change 1
- Change 2
## Testing
[How to verify]
## Related Issues
Closes #123
```
### Step 5: Apply Template
If `.github/pull_request_template.md` exists, I'll fill in its sections. Otherwise, I use the standard format.
## Examples
### Example 1: Feature PR
```
User: Generate a PR description for this branch
Assistant: Analyzing branch against main...
Commits found: 5
Files changed: 8
Lines: +245, -32
## Generated PR Description:
**Title:** feat(auth): add OAuth2 login with Google
## Summary
Add Google OAuth2 authentication as an alternative login method.
Users can now sign in with their Google account, reducing friction
for new user registration.
## PR Type
- [x] Feature
- [ ] Bug fix
- [ ] Refactoring
## Changes
### Backend
- `src/auth/oauth.ts` - OAuth2 client implementation
- `src/auth/routes.ts` - New `/auth/google` endpoint
- `src/config/oauth.ts` - Google OAuth configuration
### Frontend
- `src/components/LoginButton.tsx` - Google sign-in button
- `src/pages/Login.tsx` - OAuth callback handling
### Configuration
- `.env.example` - Added GOOGLE_CLIENT_ID, GOOGLE_SECRET
## Testing Instructions
1. Set up Google OAuth credentials in `.env`
2. Start the dev server: `npm run dev`
3. Click "Sign in with Google" on login page
4. Verify redirect and token exchange
5. Check user session is created
## Related Issues
Closes #42
Relates to #38
## Checklist
- [x] Tests added
- [x] Documentation updated
- [ ] Ready for review
```
### Example 2: Bug Fix PR
```
User: Generate PR description
Assistant: Analyzing branch...
Commits: 2
Files: 3
Lines: +12, -8
**Title:** fix(api): handle null response in user fetch
## Summary
Fix crash when API returns null for deleted users.
Previously, accessing properties on null response
caused runtime errors.
## PR Type
- [ ] Feature
- [x] Bug fix
- [ ] Refactoring
## Changes
### Source
- `src/services/user.ts` - Add null check before access
### Tests
- `tests/user.test.ts` - Add test for null response case
## Root Cause
API returns `null` instead of 404 for deleted users.
Code assumed response was always an object.
## Testing Instructions
1. Delete a user via admin panel
2. Try to fetch deleted user's profile
3. Verify graceful error message instead of crash
## Related Issues
Fixes #89
```
### Example 3: Breaking Change PR
```
User: Generate PR description - this has breaking changes
Assistant: Analyzing branch...
**Title:** feat(api)!: redesign authentication response
## Summary
Restructure authentication API response format to include
refresh tokens and standardize error codes.
## PR Type
- [x] Feature (Breaking Change)
## Breaking Changes
**Previous Response:**
```json
{"token": "xxx", "user": {...}}
```
**New Response:**
```json
{"accessToken": "xxx", "refreshToken": "yyy", "user": {...}}
```
## Migration Guide
1. Update token storage to handle both tokens
2. Implement refresh token rotation
3. Update error handling for new error codes
See `docs/migration-v2.md` for detailed guide.
## Related Issues
Closes #156
BREAKING CHANGE: Authentication response format changed
```
## Configuration
### PR Template Detection
I'll check these locations for templates:
1. `.github/pull_request_template.md`
2. `.github/PULL_REQUEST_TEMPLATE.md`
3. `docs/pull_request_template.md`
4. `pull_request_template.md`
### Base Branch Detection
Default comparison branch (in order):
1. `main`
2. `master`
3. `develop`
4. Current tracking branch
Override with: "Compare against `release/v2`"
## Output Checklist
Before finalizing PR description:
- [ ] Title follows conventional commit format
- [ ] Summary explains what and why
- [ ] All changed files categorized
- [ ] Testing instructions are specific
- [ ] Related issues linked
- [ ] Breaking changes documented
- [ ] Migration guide included (if breaking)
- [ ] Checklist items relevant to changes
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.