merge-up
Skill9 starsChanged 3 months agoMITView on GitHub
Use when the user is inside a parallel stream (worktree branch) and wants to merge that branch's committed work into the parent branch it was created from, then bring the stream back up to date with the parent. True merge (keeps individual commits); prompts before pushing the parent. Pairs with /parallel-work, which records the parent in git config (branch.<name>.exosuitParent), and with /merge-down (the inverse direction).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- symfony/uxtheir own version, first seen Oct 8, 2026
- symfony/symfonytheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- symfony/symfony★ 31ksame name
- symfony/ux★ 1.1ksame 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 repository56 other files it gives its agents.
- .claude/agents/CLAUDE.mdCLAUDE.md
- .claude/hooks/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/prompts/CLAUDE.mdCLAUDE.md
- .claude/rules/CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- vision/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- scaffold/llms.txtllms.txt
- architecture-checkSkill
- backlog-reviewSkill
- bootstrapSkill
- brainstormSkill
- buildSkill
- claude-sense-checkSkill
- code-qualitySkill
- commitSkill
- continueSkill
- custom-hooksSkill
- dashboardSkill
- debug-sessionSkill
- deploySkill
- discoverSkill
- doctorSkill
- fix-issueSkill
- framework-upgradeSkill
- handoffSkill
- help-meSkill
- ideateSkill
- lanesSkill
- manual-testSkill
- merge-downSkill
- optimizeSkill
- parallel-workSkill
- performance-checkSkill
- phase-reviewSkill
- pr-statusSkill
- quality-checkSkill
- quickstartSkill
- refine-loopSkill
- researchSkill
- retrospectiveSkill
- security-auditSkill
- skill-createSkill
- skill-evalSkill
- sprint-endSkill
- sprint-startSkill
- story-cycleSkill
- testing-cycleSkill
- test-validatorSkill
- UAT-cycleSkill
- undo-workSkill
- uninstallSkill
- weekly-maintenanceSkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
If B is HEAD (detached), STOP — tell the user to check out a branch.
- Very specific: line 33
If empty, fall back to stripping the last -<suffix> (e.g.
- Distinctive: line 35
If still unresolved or ambiguous, ASK the user which branch is the parent.
- Very specific: line 36
If P == B or P doesn't exist, STOP and report.
- Distinctive: line 43
If the current worktree is dirty, STOP: the skill merges committed work only.
- Very specific: line 50
If P is not checked out in any worktree, STOP and tell the user to check it out in a worktree first (the merge needs a working tree to run …
- Very specific: line 52
Verify the parent worktree is clean: git -C "$PDIR" status --porcelain must be empty.
- Distinctive: line 57
Run the merge in the parent's worktree:
- Very specific: line 70
ASK the user (AskUserQuestion): "Push $P to origin now?" — Yes / No.
- Very specific: line 71
If yes: git -C "$PDIR" push origin "$P" (never --force.
- Distinctive: line 73
If no: leave it local.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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-up
Merge the current stream's branch into the parent it was created from, then
fast-forward the current branch back up to the parent. Safe across worktrees:
the parent is usually checked out in another worktree, so the merge runs there
via git -C rather than checking the parent out here (git forbids that).
Step 1 — Identify branches
B="$(git rev-parse --abbrev-ref HEAD)"
echo "current branch: $B"- If
BisHEAD(detached), STOP — tell the user to check out a branch. - Resolve the parent
P:P="$(git config "branch.$B.exosuitParent" || true)"- If empty, fall back to stripping the last
-<suffix>(e.g.sprint-3-a→sprint-3) and verify it exists withgit show-ref --verify --quiet refs/heads/<cand>. - If still unresolved or ambiguous, ASK the user which branch is the parent.
- If empty, fall back to stripping the last
- If
P == BorPdoesn't exist, STOP and report.
Step 2 — Pre-flight cleanliness (both worktrees)
git status --porcelain # current worktree — must be empty- If the current worktree is dirty, STOP: the skill merges committed work only. Tell the user to commit or stash first.
- Locate the parent's worktree dir:
Find the entry whose branch isgit worktree list --porcelainrefs/heads/$P; call its pathPDIR.- If
Pis not checked out in any worktree, STOP and tell the user to check it out in a worktree first (the merge needs a working tree to run in).
- If
- Verify the parent worktree is clean:
git -C "$PDIR" status --porcelainmust be empty. If dirty, STOP and report which worktree/path needs attention.
Step 3 — Merge current branch into parent (true merge)
Run the merge in the parent's worktree:
git -C "$PDIR" merge "$B"- This keeps
B's individual commits (fast-forwards when possible). - On "Already up to date." → nothing to merge; tell the user and SKIP to Step 5.
- On conflict: run
git -C "$PDIR" merge --abort, then STOP and report the conflicting files. Offer to help resolve, but do NOT leave the parent worktree in a half-merged state without telling the user. - On success, show
git -C "$PDIR" log --oneline -3.
Step 4 — Offer to push the parent
ASK the user (AskUserQuestion): "Push $P to origin now?" — Yes / No.
- If yes:
git -C "$PDIR" push origin "$P"(never--force; if rejected, report and let the user decide — likely needs a pull/merge of origin first). - If no: leave it local.
- Note: if
Pis the repository's default branch, do NOT push — the framework's git rules require all changes to the default branch to go through a PR (/sprint-endhandles that). Skip this step and say so.
Step 5 — Sync current branch back up to parent
Back in the current worktree:
git merge "$P" # fast-forward: B now contains everything on P- This should fast-forward cleanly (P already contains B's commits plus anything else that landed on P). If it somehow reports a conflict, STOP and report.
Step 6 — Report
Show the final state so the user can see both branches aligned:
echo "$B:"; git log --oneline -3
echo "$P:"; git -C "$PDIR" log --oneline -3
git status --shortSummarize: what merged into $P, whether it was pushed, and that $B is now up
to date with $P and ready for continued work.
Notes
- True merge by design so the stream branch stays alive and Step 5 is a clean fast-forward. Do not switch to squash/rebase without re-checking with the user.
- The parent worktree's checked-out branch tip moves as a result of this skill — that's intended (it IS the merge). Anyone else working in that worktree should be clean before you run this.
- Typical cadence with several streams: each stream runs
/merge-upwhen a story completes, then every still-active stream runs/merge-downto pick up the integrated result.
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.

