merge-sync
Skill0 starsChanged 7 months agoUnlicenseView on GitHub
Use when an agent workspace must synchronize after a pull request has merged, including project aliases like "merged" or "merged N", branch cleanup, main/default-branch updates, docs or agent-rule rereads, and peer notifications.
In this repository8 other files it gives its agents.
- code-reviewSkill
- issue-checkSkill
- pr-feedbackSkill
- pr-recheckSkill
- pr-reviewSkill
- review-notifySkill
- spellsSkill
- tmux-sendSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read the project instructions to decide how merge-sync is triggered.
- Distinctive: line 21
If the PR number is missing, recover it from the current branch, recent PRs, or the user before deleting any branch.
- Distinctive: line 27
Delete the merged local feature branch only after confirming it is the PR head branch.
- Distinctive: line 29
If the project has peer agents, notify them with the project-defined merge-sync message after local sync completes.
- Distinctive: line 36
Do not notify the peer again.
- Distinctive: line 40
Never delete the current branch unless it is confirmed to be the merged PR head branch.
- Distinctive: line 41
Never treat tmux or chat output as proof of merge.
- Distinctive: line 42
If docs or agent rules changed, reread them before accepting another task.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Merge Sync
Overview
After a PR merges, each agent workspace must update to the merged default branch and refresh any changed agent rules before doing more work. The workflow differs depending on whether the message came from a human on the merged branch owner side or from another agent.
Project-specific trigger aliases such as merged and merged N are compatibility shims. The reusable concept is "sync after PR merge".
Identify Source
Read the project instructions to decide how merge-sync is triggered. Common patterns:
- Human-originated local sync: the agent that owned the PR is on or knows the PR's head branch.
- Peer-originated sync: another agent sends the PR number so this workspace can update without deleting an unrelated current branch.
If the PR number is missing, recover it from the current branch, recent PRs, or the user before deleting any branch.
Human-Originated Sync
- Fetch remote state and identify the PR head branch and default branch.
- Switch to the default branch and pull the latest remote default branch.
- Delete the merged local feature branch only after confirming it is the PR head branch.
- Inspect merged file paths. If agent rules, docs, or skill pointers changed, reread the affected files before starting new work.
- If the project has peer agents, notify them with the project-defined merge-sync message after local sync completes.
Peer-Originated Sync
- Fetch remote state, switch to the default branch, and pull latest.
- Inspect the merged PR's changed files. Reread changed agent rules, docs, or skill pointers.
- Optionally delete stale local branches for that PR if they are clearly associated with the merged PR.
- Do not notify the peer again; merge-sync notifications must not bounce forever.
Safety Rules
- Never delete the current branch unless it is confirmed to be the merged PR head branch.
- Never treat tmux or chat output as proof of merge; verify through the VCS or hosting provider.
- If docs or agent rules changed, reread them before accepting another task.
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.

