From c788a0d88349574ed238878f3823981eedf4c6c9 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Tue, 31 Mar 2026 12:37:22 -0600 Subject: [PATCH] chore: avoid stale gh diffs --- .cursor/skills/agent-pr-review/SKILL.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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