Works with the AI Agents you already use
Merge Loss Guard
Dry-run any git merge and prove nothing was lost: reverted merges, forbidden branches, deleted files and dropped lines.
Free
Merge Loss Guard
Example session with this skill installed
Merge feature/billing into main. Ensure no code from the 'experimental-vault' branch leaks in.
- Read your context and instructions
- Compiled the merge loss guard
I have previewed the merge without changing anything. A plain merge would bring in 4 commits from experimental-vault, would not bring back the billing work you reverted earlier, and would conflict on one file.
Merge Guard Preview Report
| Check | Result | Details |
|---|---|---|
| Reverted work | ❌ Found | d4e5f6a on main reverts the earlier merge of feature/billing. Git treats that work as already merged, so a plain merge would not bring it back |
| Forbidden branch | ❌ Found | 4 commits from experimental-vault would reach main (the branch was started from it) |
| Conflicts | ❌ 1 file | src/gateways/stripe.js |
| Files deleted | ✅ None | No unexpected deletions |
| Commits to bring | 16 | 12 billing commits and 4 from experimental-vault |
Verdict: Don't merge the branch. Cherry-pick only the 12 billing commits.
Proposed Plan
- Cherry-pick the 12 billing commits onto
main, skipping the 4 fromexperimental-vault. Replaying them as new commits also restores the reverted work, so the revert of the revert isn't needed. - Resolve
src/gateways/stripe.jsby keeping both sides' changes. - Before committing, run
lost --ours main --theirs feature/billing. Lines from the 4 skipped commits will show as missing. That is expected. Anything else needs a look. - Re-run the preview with
--forbid experimental-vaultto confirm nothing leaked, then run the tests.
I will not run any command that changes a branch until you approve. Nothing is pushed unless you ask.
Next steps
- Approve the plan, or tell me if you would rather merge and use the revert of the revert instead.
- Review the list of 12 commits I'm about to cherry-pick.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Merges lose work quietly. A merge that was reverted earlier leaves its work out when you merge again. A branch started from the wrong place brings in commits nobody meant to ship. A conflict resolved by "take theirs" drops the other side's fixes.
What it does
- Previews the merge before it happens without changing your branches
- Finds reverted merges and commits that a plain merge would silently skip
- Flags commits from branches that must never reach the target
- Lists files the merge deletes and files that lose many lines
- After you resolve conflicts, lists every line either side added that is missing from the result
- Proves the finished merge kept everything and that the tests pass
Why not just prompt your agent?
An agent will merge and report success. This skill adds a read-only preview and a line-by-line check that shows exactly what was lost.
Works with
Any git repository. Needs git 2.38 or newer and Python 3.8 or newer.
Test prompts
- Merge feature/payments into main.
- We reverted that merge last week and now want it back in.
- Code went missing after the merge. Find what was lost.
- Merge this branch but nothing from the experimental branch may come along.
Safety
It never commits, pushes, resets or switches branches without your approval. The script only reads and uses no network.
Where it stops
It reports what is missing but cannot judge whether a dropped line was meant to go, so you confirm each one.
Looks for reverts only in the last 3,000 commits of the target branch. Compares added lines of 4 or more characters, so very short lines, meaning changes and binary files are not checked, and a line moved elsewhere in the same file counts as present. Lines replaced on purpose are listed too, so review each one. A commit cherry-picked from a forbidden branch is not recognised as coming from it. Needs git 2.38+ and Python 3.8+. Review all changes.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 3 days ago
- Free with an Agensi account
- Software
Git
Permissions
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.