git-diff-2dot-vs-3dot-merge-safety SKILL.md skillA
git-diff-2dot-vs-3dot-merge-safety from wan-huiyan/agent-traffic-control is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add wan-huiyan/agent-traffic-control/git-diff-2dot-vs-3dot-merge-safety@v1.2.0Pins v1.2.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- wan-huiyan/agent-traffic-control
- Path
plugins/agent-traffic-control/skills/git-diff-2dot-vs-3dot-merge-safety/SKILL.md- Versions recorded
- 4
- Latest version
- v1.2.0, committed Aug 10, 2026
- First version recorded
- May 29, 2026
- Size
- 9,290 bytes
- Repository stars
- 3
- License
- MIT
Two-dot `git diff origin/main..branch` reports files `main` gained after you branched as your deletions; three-dot uses the merge base and shows only real ones.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Git Diff 2-dot vs 3-dot — Merge Safety Assessment
## Problem
You're reviewing a PR before merging and run `git diff origin/main..pr-branch --stat`.
The output shows files being **deleted** — files that just landed on `main` via another
PR yesterday and that you absolutely don't want to lose. Looks like merging this PR
will wipe them out.
It won't. The 2-dot diff is showing the **symmetric difference between two trees**, not
"what the branch will change about main." Files added to main AFTER the PR's branch
point appear in the diff as "deletions" simply because the branch's tree doesn't have
them yet. GitHub's 3-way merge will preserve them.
Same trap appears when assessing a "divergent" local commit: `git log main..origin/main`
may show commits "missing" that are actually present under a different SHA (squash
merges produce new hashes; rebases rewrite history).
## Context / Trigger Conditions
Any of these:
1. **PR review:** `git diff origin/main..pr-branch --stat` shows file deletions, BUT
`gh pr view N --json mergeable,mergeStateStatus` returns
`{"mergeable":"MERGEABLE","mergeStateStatus":"CLEAN"}`.
…Read the whole file at its exact version.
How to install
mdr add wan-huiyan/agent-traffic-control/git-diff-2dot-vs-3dot-merge-safety@sha256:0f08635a3e5d7e66The line at the top of this page pins the label v1.2.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_gfz3nbu4e43yhrwq)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between May 29, 2026 and Aug 10, 2026, about one every 24 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.2.0 latest | 2026-08-10 | 319aa3b | 9,290 B | A | view · diff |
| v1.2.0 | 2026-08-10 | ff2caaa | 8,617 B | A | view · diff |
| v1.0.0 | 2026-07-08 | f1254dd | 8,366 B | A | view · diff |
| v1.0.0 | 2026-05-29 | 059688a | 8,335 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (9290 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
wan-huiyan/agent-traffic-control · 3 stars · license MIT · pushed 2026-09-22 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_gfz3nbu4e43yhrwq GET https://markdownregistry.com/api/v1/resolve?ref=wan-huiyan/agent-traffic-control/git-diff-2dot-vs-3dot-merge-safety GET https://markdownregistry.com/api/v1/blob/0f08635a3e5d7e667ca72e1289c03bb96283d999950729df2f5ede62f5373655
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.