From magic-merge-commit
Fixes Git merge conflicts after a squash-merged PR by creating a merge commit that reconnects branch history.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magic-merge-commit:magic-merge-commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Resolves conflicts where a pull request's base branch was squash-merged into
Resolves conflicts where a pull request's base branch was squash-merged into
main. After the squash-merge, Git no longer connects the branch to its
history, so merging main produces spurious conflicts. This skill runs a tool
that creates a merge commit with two parents (main + branch tip), wiring the
histories back together so main merges cleanly.
All of the following are true:
main.main into the current branch now conflicts.jbang is on PATH. If not, a gg.cmd file in the repository root works
as a fallback (see https://github.com/eirikb/gg#ggcmd).GITHUB_TOKEN environment variable is set with read access to the
repository. The tool authenticates via GitHubBuilder().fromEnvironment().main.If a prerequisite is missing, tell the user how to fix it and stop.
Ask the user for <pr-number> — the number of the PR that was squash-merged
into main. Then run:
jbang do@koppor/magic-merge-commit <pr-number>
Fallback when jbang is not installed (gg.cmd in repo root):
sh ./gg.cmd jbang do@koppor/magic-merge-commit <pr-number>.\gg.cmd jbang do@koppor/magic-merge-commit <pr-number>The tool creates a merge commit with main and the branch tip as parents.
Confirm with git log --graph --oneline -5 that the magic commit exists, then
the user can merge main without conflicts.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub koppor/magic-merge-commit --plugin magic-merge-commit