{"manifest":{"name":"PR Description Generator","version":"1.0.0","description":"Transform a branch diff into a structured GitHub PR description with summary, test plan, risk assessment, and migration notes. One command, zero blank PRs.","tags":["git","pull-request","review","workflow","documentation"],"standard":"agentskills.io","standard_version":"1.0","content_checksum":"512304975fdac7a0049427fca7c5445fb9fb62e4d6ce7188361d0623100fcab3","bundle_checksum":null,"metadata":{},"files":[]},"files":{"SKILL.md":"# PR Description Generator\n\n> **Purpose:** Transform a branch's commits and diff into a complete, structured GitHub Pull Request description. Covers: what changed and why, how to test it, what could break, and any migration steps. Eliminates blank or lazy PRs — every PR tells the full story.\n\n---\n\n## Invocation\n\n```\n/pr-description [branch]\n```\n\nInternally collects:\n```bash\ngit log origin/main..HEAD --oneline --no-merges\ngit diff origin/main...HEAD --stat\ngit diff origin/main...HEAD -- '*.sql'  # migration files\n```\n\nIf no branch specified, uses current branch vs `main`/`master`.\n\n---\n\n## Analysis\n\n### What to detect automatically\n\n- **New routes or API endpoints** → flag in Test Plan\n- **Database migrations** (any `.sql` files changed) → add Migration Steps section\n- **Environment variable changes** (`.env.example` changes) → list new vars required\n- **Breaking changes** (deleted exports, changed function signatures) → add Breaking Changes section\n- **Test files changed or missing** → note in Test Plan\n\n---\n\n## Output: PR Description\n\n```markdown\n## Summary\n\n[2-3 sentences: what this PR does and why it exists. Focus on the \"why\", not just the \"what\".]\n\n**Type:** `feature` / `fix` / `refactor` / `chore` / `breaking`\n\n---\n\n## Changes\n\n### [Area 1 — e.g., API]\n- [What changed and why]\n- [What changed and why]\n\n### [Area 2 — e.g., Database]\n- [What changed and why]\n\n---\n\n## Test Plan\n\n- [ ] [Manual step 1 — e.g., \"Log in as a new user and complete checkout\"]\n- [ ] [Manual step 2]\n- [ ] All unit tests pass: `[test command]`\n- [ ] [E2E scenario if applicable]\n\n---\n\n## Migration Steps\n\n> Only include if there are database migrations or env var changes\n\n1. Run migration: `[migration command]`\n2. Add env vars: `VAR_NAME=...` (see `.env.example`)\n3. Clear cache: `[cache clear command if needed]`\n\n---\n\n## Risk Assessment\n\n| Risk | Likelihood | Mitigation |\n|------|------------|------------|\n| [e.g., Auth flow broken] | Low | Covered by E2E tests |\n| [e.g., DB migration lock on large table] | Medium | Run during low-traffic window |\n\n**Breaking changes:** [Yes/No — if Yes, list what callers need to update]\n\n---\n\n## Screenshots / Demo\n\n[Note: Add before/after screenshots for UI changes]\n```\n\n---\n\n## Rules\n\n- Summary section is always first and always 2-3 sentences — never a list\n- Migration Steps section: only include if `.sql` files or `.env.example` changed\n- Risk Assessment: must have at least one row even if it's \"No significant risks identified\"\n- Breaking Changes: explicitly state \"None\" if there are none — don't omit the section\n- Test Plan must have at least 2 items: at least one manual step + one automated check\n- Never write \"See code\" as a change description — describe the actual change in plain English\n\n## Playground\n\n<!DOCTYPE html><html><head><meta charset='utf-8'><style>*{box-sizing:border-box;margin:0;padding:0}body{background:#0d1117;color:#e6edf3;font-family:monospace;font-size:12px;height:100vh;display:flex;flex-direction:column;overflow:hidden}.header{background:#161b22;border-bottom:1px solid #30363d;padding:8px 14px;font-size:11px;color:#8b949e;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.title{color:#58a6ff;font-weight:bold;font-size:13px}.panels{display:flex;flex:1;overflow:hidden}.panel{flex:1;overflow:auto;padding:12px;border-right:1px solid #30363d}.panel:last-child{border-right:none}.label{font-size:10px;color:#8b949e;text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}pre{white-space:pre-wrap;word-break:break-word;line-height:1.5}</style></head><body><div class='header'><span class='title'>PR Description Generator</span><span>Example · SkillSlap</span></div><div class='panels'><div class='panel'><div class='label'>Input: Commit messages</div><pre><span style='color:#8b949e'>feat: add rate limiting to /api/auth</span>\n<span style='color:#8b949e'>fix: catch null session in middleware</span>\n<span style='color:#8b949e'>test: rate limit integration tests</span>\n<span style='color:#8b949e'>chore: bump @auth/core 0.18→0.19</span></pre></div><div class='panel'><div class='label'>Output: PR Description</div><pre><span style='color:#58a6ff'>## Summary</span>\n<span style='color:#8b949e'>Add per-IP rate limiting to the auth</span>\n<span style='color:#8b949e'>endpoint to prevent brute-force attacks.</span>\n\n<span style='color:#58a6ff'>## Changes</span>\n<span style='color:#8b949e'>- Rate limit /api/auth: 5 req/min per IP</span>\n<span style='color:#8b949e'>- Fix null-session crash in middleware</span>\n<span style='color:#8b949e'>- Integration tests for limit behaviour</span>\n<span style='color:#8b949e'>- Bump @auth/core to 0.19</span>\n\n<span style='color:#58a6ff'>## Test plan</span>\n<span style='color:#8b949e'>- [ ] npm run test:integration passes</span>\n<span style='color:#8b949e'>- [ ] Manual: 6th login attempt 429</span>\n<span style='color:#8b949e'>- [ ] Check Vercel logs for rate-limit hits</span></pre></div></div></body></html>"}}