review-gate-diff-verification

Verifies branch diff integrity before gate reviews by checking merge-base drift and grep pitfalls.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill review-gate-diff-verification-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-gate-diff-verification
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/review-gate-diff-verification
Command: npx skills add https://github.com/Arasz/ai-badger --skill review-gate-diff-verification-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Review gates that judge a branch diff can be misled by the diff itself: a moved origin/main ref produces phantom deletions and modifications, grep anchors silently match nothing, binary build artifacts pollute symbol searches, and the committed plan doc may lag the accepted amended plan. This Skill verifies the diff is real before any content judgment is made. ## Core Features & Use Cases - Base-drift diagnosis: Runs merge-base, rev-parse, and ls-tree comparisons to detect phantom D/M files caused by a moved origin/main ref, then re-bases the review on the true fork point. - Grep and search hygiene: Anchors name-status greps after the status tab, excludes bin/obj directories from symbol searches, and distinguishes stale symbols from substrings of new ones. - Plan and test verification: Diffs the committed plan against the accepted amended version, validates plan claims against base code, and applies test-honesty heuristics for concurrency gates and FakeLogger assertions. - Use Case: A code-reviewer gate flags deletions your branch never made; use this Skill to confirm the origin/main ref drifted past the fork point and re-run the review against the merge-base. ## Quick Start Ask the agent to verify the branch diff base with merge-base before judging the review-gate findings on this pull request.

Frequently Asked Questions about review-gate-diff-verification

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does git diff show deleted files my branch never touched?

Phantom deletions appear when the origin/main ref moved past the branch's fork point, so files added on main show as deletions in the worktree diff. Run git merge-base origin/main HEAD to find the true fork point and diff against that instead.

How do I verify a branch diff base before a code review gate?

Run git merge-base origin/main HEAD to get the true fork point, compare git rev-parse origin/main against the first commit's parent, and confirm with git diff <true-base>..HEAD --name-status. Review against the merge-base, not the moved ref.

Why does grep on git show --name-status output match nothing?

Name-status lines begin with a status letter followed by a tab, so anchoring grep with ^src or ^docs fails silently. Anchor after the tab with grep -E "\tsrc/" or grep the bare filename instead.

How do I exclude bin and obj folders from symbol searches?

Restrict grep with --include="*.cs" or add --exclude-dir=bin --exclude-dir=obj so compiled DLLs do not pollute results. Also check whether a match is a substring of a new symbol rather than a stale old symbol before reporting it.

What if the committed plan doc differs from the accepted plan?

Diff the committed plan against the accepted amended version with diff <(git show HEAD:docs/work/<plan>.md) /path/to/accepted/plan.md. Judge the implementation against the accepted version, and check commit messages for documented amendments.