← ClaudeAtlas

pr-diff-verificationlisted

Check that a branch's actual diff matches what its commit messages and any subagent report claim, before the commits leave the machine. Use before `git push` of a feature branch, before `gh pr create` or `gh pr merge`, after a subagent reports "committed N files", after an amend / rebase / force-push, or when a verification report's headline count looks off. Catches "commit log wrote but code didn't make it" accidents. Does NOT read the diff for correctness (that is a Code Reviewer's job) nor own gh / PR mechanics (github-contribution-workflow).
wei18/apple-dev-skills · ★ 18 · Code & Development · score 81
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