{"manifest":{"name":"PR Review Assistant","version":"1.0.0","description":"Generates PR descriptions from branch diffs and performs structured code review with must-fix/suggestion/question/praise categories.","tags":["git","pr","code-review","workflow"],"standard":"agentskills.io","standard_version":"1.0","content_checksum":"1c952839abaff4d30625fbd1795c121a8621bd04a436348c5006f01d80ad9df6","bundle_checksum":null,"metadata":{},"files":[]},"files":{"SKILL.md":"# PR Review Assistant\n\n> **Purpose:** Generate a comprehensive pull request description and perform automated review when creating or reviewing PRs.\n\n---\n\n## Invocation\n\n```\n/pr-review [pr_number]       # Review existing PR\n/pr-create                    # Generate PR description for current branch\n```\n\n---\n\n## PR Description Generation\n\n### Step 1: Analyze the Branch\n\n```bash\ngit log main..HEAD --oneline    # All commits\ngit diff main...HEAD --stat     # Files changed\ngit diff main...HEAD            # Full diff\n```\n\n### Step 2: Generate Description\n\n```markdown\n## Summary\n[2-3 bullet points explaining WHY these changes were made]\n\n## Changes\n- [Grouped by area: API, UI, Database, Config, Tests]\n\n## Testing\n- [ ] Unit tests added/updated\n- [ ] Manual testing completed\n- [ ] Edge cases verified\n\n## Screenshots\n[If UI changes, describe what changed visually]\n```\n\n---\n\n## Review Checklist\n\nWhen reviewing a PR, check:\n\n### Architecture\n- [ ] Changes follow existing patterns in the codebase\n- [ ] No unnecessary abstractions or premature optimization\n- [ ] Module boundaries respected (no circular dependencies)\n- [ ] Database queries use proper indexes\n\n### Safety\n- [ ] No secrets or credentials in code\n- [ ] User input is validated at boundaries\n- [ ] Error handling doesn't leak internal details\n- [ ] Auth checks present on new endpoints\n\n### Quality\n- [ ] Tests cover the happy path and key edge cases\n- [ ] No console.log / print debugging left in\n- [ ] Naming is clear and consistent\n- [ ] Comments explain WHY, not WHAT\n\n### Operations\n- [ ] Database migrations are reversible\n- [ ] No breaking API changes without version bump\n- [ ] Feature flags for risky changes\n- [ ] Monitoring/logging added for new failure modes\n\n---\n\n## Review Comment Format\n\n```\n**[MUST FIX]** src/api/route.ts:42\nMissing auth middleware on this endpoint. Any unauthenticated user can access user data.\n\n**[SUGGESTION]** src/utils/format.ts:15\nConsider using Intl.NumberFormat instead of manual formatting — handles locale differences.\n\n**[QUESTION]** src/hooks/useData.ts:28\nWhy was the cache timeout changed from 5min to 30min? Could this cause stale data issues?\n\n**[PRAISE]** src/lib/validation.ts:50\nNice use of discriminated unions here — makes the error handling much cleaner.\n```\n\n---\n\n## Rules\n\n- Always read the full diff before commenting\n- One MUST FIX blocks the PR; everything else is advisory\n- Praise good code — reviews shouldn't be only negative\n- If unsure about a pattern, ask with QUESTION rather than demanding a change\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 Review Assistant</span><span>Example · SkillSlap</span></div><div class='panels'><div class='panel'><div class='label'>Input: Git diff snippet</div><pre><span style='color:#8b949e'>@@ -12,6 +12,8 @@ export async</span>\n<span style='color:#8b949e'>   function getUser(id: string) {</span>\n<span style='color:#f85149'>-  const user = await db.query(</span>\n<span style='color:#f85149'>-    `SELECT * FROM users WHERE id='${id}'`)</span>\n<span style='color:#3fb950'>+  const user = await db.query(</span>\n<span style='color:#3fb950'>+    'SELECT * FROM users WHERE id=$1',</span>\n<span style='color:#3fb950'>+    [id])</span>\n<span style='color:#8b949e'>   return user</span></pre></div><div class='panel'><div class='label'>Output: Review Comment</div><pre><span style='color:#3fb950'>✅ Good catch — SQL injection fix</span>\n\n<span style='color:#8b949e'>The old query interpolated `id` directly</span>\n<span style='color:#8b949e'>into the SQL string. Parameterised</span>\n<span style='color:#8b949e'>query with `$1` is correct.</span>\n\n<span style='color:#e3b341'>💡 Suggestion</span>\n<span style='color:#8b949e'>Also add `LIMIT 1` — the query returns</span>\n<span style='color:#8b949e'>an array; a future schema change could</span>\n<span style='color:#8b949e'>return multiple rows silently.</span>\n\n<span style='color:#e3b341'>💡 Type guard</span>\n<span style='color:#8b949e'>Validate that `id` is a UUID before</span>\n<span style='color:#8b949e'>hitting the DB to fail fast.</span></pre></div></div></body></html>"}}