diff --git a/.cursor/skills/agent-pr-review/SKILL.md b/.cursor/skills/agent-pr-review/SKILL.md index 7df5013f..449e6c38 100644 --- a/.cursor/skills/agent-pr-review/SKILL.md +++ b/.cursor/skills/agent-pr-review/SKILL.md @@ -7,7 +7,8 @@ description: Review pull requests in plugin-agent using GitHub CLI. Use for "rev ## Required -- `gh` CLI required (no git-only fallback) +- `gh` CLI +- `git` (PR branch must be checked out locally for authoritative diff) ## Working directory @@ -15,8 +16,17 @@ description: Review pull requests in plugin-agent using GitHub CLI. Use for "rev ## Commands +Run all three together: + - `gh pr view --json title,number,body,files,commits,additions,deletions,changedFiles,baseRefName,headRefName,author,labels` -- `gh pr diff ` +- `gh pr diff ` — GitHub API diff (may be stale) +- `git diff $(gh pr view --json baseRefName --jq '.baseRefName') -- $(gh pr view --json files --jq '[.files[].path] | join(" ")')` — authoritative local diff + +## Diff precedence + +- `gh pr diff` can be stale after a recent push +- cross-check with local `git diff ` and `Read` tool on changed files +- local git diff + file contents win any disagreement ## Review checklist