pr-from-stale-branch-silently-reverts-newer-main-files SKILL.md skillA
pr-from-stale-branch-silently-reverts-newer-main-files 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/pr-from-stale-branch-silently-reverts-newer-main-files@v1.3.0Pins v1.3.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/pr-from-stale-branch-silently-reverts-newer-main-files/SKILL.md- Versions recorded
- 5
- Latest version
- v1.3.0, committed Sep 12, 2026
- First version recorded
- Aug 7, 2026
- Size
- 17,439 bytes
- Repository stars
- 3
- License
- MIT
Trap: merging a PR whose branch carries an OLD TREE silently DELETES (reverts) files that landed on main after that tree was built — with NO merge conflict to warn you, because a deletion your own commit records is not a conflict. Use when: (1) about to `gh pr create` or squash-merge from a long-lived / earlier-branched branch, from a worktree committed with `git add -A`, or after a `git reset --soft`; (2) `git diff --diff-filter=D --name-only origin/main...HEAD` lists files you never touched…
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
# A PR from a stale branch can silently revert newer main files (no conflict) ## Problem **Your branch's commit records a DELETION of files that are on main.** Merging it applies that deletion, and **there is no merge conflict** — a removal your own side committed is not a conflict, it is a change git carries out. The PR looks "clean", `mergeable: MERGEABLE`, CI green, and the removals sit in the diff stat where nobody reads them. Nobody decides to delete anything. The tree gets that way by accident: - **`git reset --soft origin/main`** (or `--mixed` then `git add -A`) run from a branch whose base was old. The POINTER lands on current main; the index still holds the OLD tree; the commit therefore records *"delete everything added since"* as part of your change. - **Committing a stale worktree with `git add -A`.** Same result — the tree you stage predates main, so everything main gained is staged as removed. - **A branch re-created or re-pointed onto a newer base while its working tree stayed old.** ### What does NOT cause it: simply being behind main A branch that merely *lacks* files B/C/D — never had them, never recorded …
Read the whole file at its exact version.
How to install
mdr add wan-huiyan/agent-traffic-control/pr-from-stale-branch-silently-reverts-newer-main-files@sha256:048fafb6327860afThe line at the top of this page pins the label v1.3.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_u4sht4avanqxrrmz)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Aug 7, 2026 and Sep 12, 2026, about one every 9 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.3.0 latest | 2026-09-12 | aec1aa9 | 17,439 B | A | view · diff |
| v1.3.0 | 2026-08-11 | f274e4b | 18,592 B | A | view · diff |
| v1.3.0 | 2026-08-10 | ff2caaa | 18,576 B | A | view · diff |
| v1.2.0 | 2026-08-07 | d679ef6 | 14,179 B | A | view · diff |
| v1.1.0 | 2026-08-07 | 6a49203 | 11,861 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 (17439 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_u4sht4avanqxrrmz GET https://markdownregistry.com/api/v1/resolve?ref=wan-huiyan/agent-traffic-control/pr-from-stale-branch-silently-reverts-newer-main-files GET https://markdownregistry.com/api/v1/blob/048fafb6327860af2343c6478eb922e15ecc958707acbd58e4d62cd4052819ca
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.