skills/merge-main/SKILL.md
Merge main branch into current feature branch with stashing, animated progress, conflict resolution, and auto-commit
npx skillsauth add sipherxyz/universal-ue-skills merge-mainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Role: Git Merge Automation Scope: Merge main into feature branches with conflict handling Platform: Windows + PowerShell
Automate the common workflow of merging main into a feature branch:
main branch./scripts/merge-main.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action validate
Expected Output:
BRANCH={current-branch} on successError Handling:
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action stash
Expected Output:
STASHED=true if changes were stashedSTASHED=false if worktree was cleanStore: Remember if stash was created for Step 7.
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action pull-main
Actions performed by script:
Expected Output:
CURRENT_BRANCH={branch} on successError Handling:
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action merge
Expected Output:
CONFLICTS=false if merge succeededCONFLICTS=true and CONFLICT_COUNT={n} if conflicts detected (exit code 3)If no conflicts: Skip to Step 6.
First, list the conflicting files:
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action list-conflicts
Output format:
MERGE CONFLICTS (3 files)
==================================================
1. Source/S2/Combat/Damage.cpp [text] +50/-30
2. Config/DefaultGame.ini [text] +5/-2
3. Content/BP_Player.uasset [binary]
ASK THE USER how they want to resolve conflicts:
How would you like to resolve these conflicts?
Options:
[A] Accept ALL from main (theirs) - Use main branch version for all files
[O] Keep ALL from current branch (ours) - Keep your version for all files
[I] Resolve individually - Choose per file
[M] Manual - Abort merge, resolve in IDE
Resolution Commands:
For "Accept ALL from main":
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action resolve-all-theirs
For "Keep ALL from current branch":
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action resolve-all-ours
For "Resolve individually", loop through each file and ask:
File: {filename}
[O] Keep ours (current branch)
[T] Accept theirs (main)
[S] Skip (resolve manually later)
Then run for each file:
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action resolve-file -File "{filename}" -Resolution "{ours|theirs|skip}"
For "Manual":
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action abort
Then tell user to resolve conflicts in their IDE and run git add + git commit when done.
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action commit
Note: Only run this if conflicts were resolved. Skip if user chose "Manual" resolution.
Only if STASHED=true from Step 2:
powershell -NoProfile -ExecutionPolicy Bypass -File "./scripts/merge-main.ps1" -Action restore-stash
Error Handling:
git stash list to see themERROR: Failed to connect to origin
Solution: Check network connection, try again. If VPN required, ensure it's connected.
ERROR: refusing to merge unrelated histories
Solution: This usually means the branches diverged significantly. User should manually review with git log --oneline main..HEAD.
WARNING: Failed to restore stash
Solution: Stashed changes conflict with merged code. User should:
git stash list to see stashesgit stash show -p stash@{0} to see stashed changesOn completion, display:
Merge completed successfully!
Branch: {current-branch}
Merged: main → {current-branch}
Stash: {restored/not needed}
You can now continue working or push your changes.
skill: merge-main
type: workflow
category: git
scope: project-root
development
This skill should be used when implementing features in isolation using git worktrees. Triggers on "create worktree", "isolated workspace", "parallel development", or when starting implementation that should not affect main workspace.
testing
Manage VFX team issues on GitHub Projects - timeline scheduling, status updates, member commit checks, bulk assign. Use when managing VFX team project board, adding issues to timeline, checking member progress, or bulk-updating issue fields.
tools
Generate C++ validation rules from JSON definitions. Use when team updates ValidationRules.json or asks to add/modify validation rules.
development
Check codebase for Microsoft Xbox XR (Xbox Requirements) compliance issues. Scans for account picker, cloud saves, achievements, Quick Resume, and Xbox certification requirements. Use before console submission or when preparing for Microsoft certification. Triggers on "XR", "Xbox certification", "Microsoft compliance", "Xbox cert", "Xbox requirements", "GDK compliance".