merge-main
Skill0 starsChanged 3 months agoMITView on GitHub
Fetch and merge origin/main into the current branch and resolve conflicts.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- griddynamics/rosettatheir own version, first seen Nov 6, 2026
- bbvch-ai/aihub-coretheir own version, first seen Oct 25, 2026
- insapption-projects/claude-agent-team-startertheir own version, first seen Oct 15, 2026
- bryce-evans/claude-skillstheir own version, first seen Oct 13, 2026
- garthcodes/claude-skillstheir own version, first seen Oct 8, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- griddynamics/rosetta★ 373same name
- bbvch-ai/aihub-core★ 16same name
- garthcodes/claude-skills★ 2same name
- insapption-projects/claude-agent-team-starter★ 1same name
- bryce-evans/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- buildSkill
- cleanup-worktreeSkill
- db-querySkill
- db-searchSkill
- dd-errorsSkill
- devops-wiki-updateSkill
- devops-workitem-createSkill
- devops-workitem-readSkill
- devops-workitem-updateSkill
- finalize-taskSkill
- find-codeSkill
- panel-review-fixSkill
- panel-reviewSkill
- prSkill
- rebase-mainSkill
- starttaskSkill
- testSkill
- ask-codexSkill
- ask-geminiSkill
- councilSkill
- dailySkill
- find-sessionSkill
- merged-prsSkill
- mm-notifySkill
- optimize-promptSkill
- qSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Run git rev-parse --abbrev-ref HEAD to get the current branch name.
- Distinctive: line 18
Run git status --porcelain to check for uncommitted changes.
- Distinctive: line 19
If there are uncommitted changes, stop and warn the user.
- Distinctive: line 23
Run git fetch origin to get the latest remote state.
- Very specific: line 24
Run git log --oneline HEAD..{main-branch} --count (use git rev-list --count HEAD..{main-branch}) to see how many commits are incoming.
- Distinctive: line 25
If 0 commits incoming, report "Already up to date" and stop.
- Distinctive: line 30
If the merge reports conflicts:
- Very specific: line 31
Run git diff --name-only --diff-filter=U to list conflicted files.
- Distinctive: line 37
Both sides changed: Use your best judgment based on the code context.
- Distinctive: line 40
After all conflicts are resolved, run git commit --no-edit to complete the merge.
- Distinctive: line 67
If there are uncommitted changes, do not proceed — ask the user first
- Distinctive: line 68
If a conflict resolution is ambiguous, flag it clearly in the report so the user can review
- Very specific: line 69
Always use --no-edit on merge/commit to avoid interactive editors
- Distinctive: line 70
After completion, do NOT push — leave that to the user
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Merge Main into Current Branch
Merge the latest origin/main (or origin/master) into the current working branch, handle conflicts, and produce a summary report.
Your Task
Execute the following steps in order:
1. Pre-flight checks
- Run
git rev-parse --abbrev-ref HEADto get the current branch name. - Run
git status --porcelainto check for uncommitted changes.- If there are uncommitted changes, stop and warn the user. Ask if they want to stash or commit first. Do NOT proceed with a dirty working tree.
- Determine the main branch: check if
origin/mainexists (git rev-parse --verify origin/main). If not, fall back toorigin/master.
2. Fetch and merge
- Run
git fetch originto get the latest remote state. - Run
git log --oneline HEAD..{main-branch} --count(usegit rev-list --count HEAD..{main-branch}) to see how many commits are incoming.- If 0 commits incoming, report "Already up to date" and stop.
- Run
git merge {main-branch} --no-edit. - Capture the merge output.
3. Handle conflicts
If the merge reports conflicts:
- Run
git diff --name-only --diff-filter=Uto list conflicted files. - For each conflicted file:
a. Read the file to see the conflict markers (
<<<<<<<,=======,>>>>>>>). b. Analyze the conflict:- Theirs-only changes (our side is unchanged around the conflict): accept theirs.
- Ours-only changes (their side is unchanged around the conflict): accept ours.
- Both sides changed: Use your best judgment based on the code context. Prefer combining both changes when they don't overlap logically. If the conflict is complex or ambiguous, resolve it conservatively and flag it in the report.
c. Edit the file to remove conflict markers and apply the resolution.
d. Run
git add {file}to mark it resolved.
- After all conflicts are resolved, run
git commit --no-editto complete the merge.
4. Post-merge report
Generate a clear report with:
## Merge Report: {main-branch} → {current-branch}
### Summary
- **Incoming commits:** {count}
- **Conflicts:** {count} ({list of files, or "None"})
- **Status:** {Merged cleanly | Merged with conflict resolution}
### Incoming Commits
{list of commits from git log --oneline HEAD..origin/main BEFORE the merge, i.e., the commits that were brought in}
### Conflict Resolutions (if any)
For each resolved conflict:
- **{filename}**: {brief description of what conflicted and how it was resolved}
### Files Changed
{git diff --stat HEAD~1 summary showing files changed, insertions, deletions}Important
- Never force-push or reset — this skill is purely additive (fetch + merge)
- If there are uncommitted changes, do not proceed — ask the user first
- If a conflict resolution is ambiguous, flag it clearly in the report so the user can review
- Always use
--no-editon merge/commit to avoid interactive editors - After completion, do NOT push — leave that to the user
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

