dev-merge-main/SKILL.md
Merge origin/main into the current branch and resolve all conflicts. Use when the user wants to sync their branch with main, pull in upstream changes, or says "merge in main", "sync with main", "rebase from main", or "update from main". Always invoke this skill for merge/sync workflows — don't just run git merge manually.
npx skillsauth add paulund/skills dev-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.
git fetch origin main && git merge origin/main --no-edit
If the merge succeeds cleanly, skip to step 4.
If there are conflicts, git diff --name-only --diff-filter=U lists the conflicted files. Resolve them all before continuing.
Read every conflicted file before editing. For each conflict, decide which strategy applies:
Lock files — always take theirs, then reinstall:
pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb: git checkout --theirs <file>, then run the package manager install (see step 3).Config/manifest files (package.json, pyproject.toml, etc.):
Read both sides of the conflict marker. Usually the right answer is to include both sides' additions (e.g. a new dependency from each branch). Resolve manually, keeping all new entries from both sides.
Source files — prefer the better pattern: Read the diff carefully. Take whichever side represents an improvement:
logger.error) over raw console.error/console.logtry/catch with error handling over bare async callsgetErrorMessage(err) over inline err instanceof Error ? err.message : String(err)When both sides are equally valid, prefer origin/main to stay aligned with the shared baseline.
After editing each file, verify no <<<<<<<, =======, or >>>>>>> markers remain.
If package.json or any lock file was part of the conflict resolution:
pnpm install --frozen-lockfile=false
git add <all resolved files>
git commit -m "Merge origin/main"
Use git commit without --no-edit so the default merge message is used. Don't amend — create the commit fresh.
pnpm test
If tests fail, fix the root cause before presenting the work as done.
git merge -X theirs — it blindly discards work from the current branch.git reset --hard to escape conflicts; investigate and resolve them.origin/main and flag it to the user.development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.