pr-diff-verificationlisted
Install: claude install-skill wei18/apple-dev-skills
# PR Diff Verification
## When to invoke
Before:
- `git push` of a feature branch (especially after subagent return)
- `gh pr create`
- `gh pr merge` (final sanity)
- Force-push (`--force-with-lease`) of a rebased branch
Skip when: pushing a single trivial commit you authored line-by-line in the current session and didn't amend.
## The pattern (3-step verify)
### Step 1 — read the commit message claims
For the HEAD commit (or all commits on the branch since base), extract concrete claims:
- "modifies X" → look for X in the diff
- "adds Y" → look for `create mode 100644 Y` in the `--summary` output
- "deletes Z" → look for `delete mode 100644 Z` in the `--summary` output
- "renames A → B" → look for `rename dir/{A => B} (NN%)` in the `--summary` output
- "fixes N+M lines" → diff total should be in that ballpark
### Step 2 — compare against actual diff
```bash
git show --stat --summary HEAD # for single commit
git diff --stat --summary origin/main...HEAD # for branch cumulative
git log --oneline origin/main..HEAD # for commit count
```
`git diff` takes three dots (`origin/main...HEAD`, diff against the merge base — otherwise
commits landed on `origin/main` since the branch forked also show up in the stat);
`git log --oneline` keeps two dots (`origin/main..HEAD`, commits reachable from HEAD but not
from `origin/main`).
Plain `--stat` only prints `path | N +-` per file; the `create mode` / `delete mode` /
`rename A => B (NN%)` lines