tools/opencode/profiles/portable/skills/pr-review/SKILL.md
Reviews GitHub PRs and leaves human, direct comments. Trigger: When user asks to review a PR, check a PR, or gives a PR URL.
npx skillsauth add albarracin-sg/mis-dotfiles pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when:
Be a helpful colleague, not a robot.
You're reviewing code like a senior dev who actually CARES about the codebase and the author's growth. Not a linter. Not a checklist machine.
# Get PR metadata
gh pr view {number} --json title,body,files,additions,deletions,author,state,baseRefName,headRefName
# Get the diff (exclude lockfiles - they're noise)
gh pr diff {number} -- ':(exclude)**/pnpm-lock.yaml' ':(exclude)**/package-lock.json' ':(exclude)**/yarn.lock'
If the diff is huge, fetch specific files from the PR branch:
gh api "repos/{owner}/{repo}/contents/{path}?ref={branch}" --jq '.content' | base64 -d
Only comment on things that MATTER:
| Category | When to Comment | |----------|-----------------| | CRITICAL | Will break in production, security issue, data loss | | NEEDS REVIEW | Might be wrong, need author to confirm intent | | QUESTION | Curious about a choice, not necessarily wrong |
DO NOT comment on:
NEVER assume. If you're not sure about something:
# Check official docs
# Search for the API/convention being used
# Verify the claim before saying "this is wrong"
Example: If someone uses a new API signature, CHECK if that's the new standard before flagging it.
Write like you're talking to a colleague on Slack. Not a formal code review template.
BAD (robotic):
Issue: The function export does not conform to Next.js 16 proxy.ts specification.
Recommendation: Modify the export to use named export pattern.
Severity: Critical
GOOD (human):
Hey! Looking at the proxy.ts export - according to Next.js 16 docs, the function needs to be named `proxy`, not an anonymous default. Should be something like:
export const proxy = auth((req) => { ... })
Can you double check this works correctly? I'm seeing conflicting info about whether next-auth handles this automatically.
Keep it simple:
If you have several things to discuss, put them ALL in one comment. Don't spam the PR with 10 separate comments.
Hey! Did a review. Found a few things worth discussing:
**1. First thing**
{explanation}
**2. Second thing**
{explanation}
Let me know if any of these need clarification!
gh pr comment {number} --body "Your comment here"
For inline comments on specific files/lines, use the review API:
gh api repos/{owner}/{repo}/pulls/{number}/comments -f body="comment" -f path="file.ts" -f line=42 -f side="RIGHT"
After reviewing, summarize for the user:
Listo, dejé el comentario en el PR: {url}
Los puntos principales:
1. {brief summary of critical/review items}
2. {another point}
A ver qué responde el autor.
pr, pull request, review, github, code review, gh
development
Zustand 5 state management patterns. Trigger: When managing React state with Zustand.
databases
Zod 4 schema validation patterns. Trigger: When using Zod for validation - breaking changes from v3.
development
TypeScript strict patterns and best practices. Trigger: When writing TypeScript code - types, interfaces, generics.
development
Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind - cn(), theme variables, no var() in className.