pr-diff-verification

Solid

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).

Code & Development 19 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
43
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ``` Plain `--stat` only prints `path | N +-` per file; the `create mode` / `delete mode` / `rename A => B (NN%)` lines only appear with `--summary` added. For each concrete claim, grep the stat output. If the claim mentions a path that doesn't appear in the stat, that's a discrepancy — investigate before push. ### Step 3 — surface discrepancies If found: - Did `git commit --amend` or rebase squash the...

Details

Author
wei18
Repository
wei18/apple-dev-skills
Created
2 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category