agents/skills/merge-main/SKILL.md
Use this skill whenever the user wants to merge the main branch into their current branch. Triggers include phrases like "merge main", "mainをマージ", "mainを取り込む", "mainに追従", "sync with main", "mainの変更を取り込みたい", or any request to bring changes from main into a feature/working branch. Always use this skill — do not improvise git commands without it.
npx skillsauth add nazozokc/dotfiles 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.
Procedure for merging changes from the main branch into the current working branch.
git status
git branch --show-current
main itselfgit fetch origin main
Use fetch instead of pull to retrieve the latest without modifying local state.
git log HEAD..origin/main --oneline
git diff HEAD...origin/main --stat
git merge origin/main --no-ff -m "Merge branch 'main' into $(git branch --show-current)"
--no-ff to create a merge commitIf conflicts occur, choose based on the situation:
git checkout --ours / --theirs after confirming with the user# Check conflicting files
git diff --name-only --diff-filter=U
# After resolving
git add <resolved-files>
git merge --continue
To abort the merge:
git merge --abort
git log --oneline -5
git status
If everything looks good, suggest pushing to the user.
git push origin $(git branch --show-current)
Never suggest force push — it is unnecessary when a merge commit exists.
main branch, warn the user and stoporigin, confirm with the user before proceedingdevelopment
Method and notes when performing web searches
development
Guidelines when working on TypeScript/JS projects
tools
Template and notes when creating or updating SKILL.md files under skills/
tools
When writing fish shell scripts, functions, abbreviations, or editing shell configuration