merge-down
Skill9 starsChanged 3 months agoMITView on GitHub
Use when the user is inside a parallel stream (worktree branch) and wants to bring that branch up to date with the LATEST of its parent branch — typically after one or more sibling streams have merged their work up into the parent (via /merge-up). Pulls the parent's accumulated commits down into the current branch with a true merge. Inverse of /merge-up; the parent is recorded by /parallel-work in git config (branch.<name>.exosuitParent). Read-only on the parent — safe to run while the parent worktree is busy.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Lesani/skillstheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Lesani/skills★ 1same 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-upSkill
- 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
10 rules. About 0 are common, 4 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
If B is HEAD (detached), STOP — tell the user to check out a branch.
- Very specific: line 45
If empty, fall back to stripping the last -<suffix> (e.g.
- Distinctive: line 47
If still unresolved or ambiguous, ASK the user which branch is the parent.
- Very specific: line 48
If P == B or P doesn't exist, STOP and report.
- Distinctive: line 55
If dirty, STOP: merging the parent in could collide with uncommitted work.
- Very specific: line 62
Only needed if parent commits were pushed from elsewhere (local /merge-ups already updated the shared parent ref).
- Very specific: line 71
If origin/$P is ahead of local $P (right-count > 0), the canonical latest is on the remote.
- Very specific: line 84
Fast-forward: when the current branch has no commits of its own ahead of $P.
- Distinctive: line 91
Do not leave the worktree half-merged without telling the user which state it's in.
- Distinctive: line 112
Read-only on the parent: this skill never moves the parent's branch tip and never touches the parent worktree's working files — only the …
≈ “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-down
Bring the current stream's branch up to date with the parent it was created
from. Use it after a round of /merge-ups have landed sibling streams' work on
the parent: each sibling still only has its OWN commits, so run this in each
stream to integrate everyone else's merged work.
This is the complement of /merge-up:
/merge-up— merge THIS branch into the parent (publish your work upward)./merge-down— merge the parent into this branch (pull everyone's work downward).
Because all worktrees of a repository share one object store and one set of
branch refs, the parent ref already reflects every local /merge-up — no
network fetch is needed for local merges. A fetch is only relevant if merges
were pushed from another machine (Step 3 handles that optionally). This skill
never writes to the parent's working tree, so it is safe to run even while the
parent worktree is in use.
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:git 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 (current worktree only)
git status --porcelain # current worktree — must be empty- If dirty, STOP: merging the parent in could collide with uncommitted work. Tell
the user to commit or
git stashfirst, then re-run. - Unlike
/merge-up, the parent worktree does not need to be clean — this skill only reads the parent branch ref; it never commits into the parent's working tree.
Step 3 — Optionally refresh the parent from origin
Only needed if parent commits were pushed from elsewhere (local /merge-ups
already updated the shared parent ref). Best-effort; skip silently if there is no
remote.
git fetch origin "$P" 2>/dev/null || true
# Is origin/P ahead of local P?
git rev-list --left-right --count "$P...origin/$P" 2>/dev/null || true- If
origin/$Pis ahead of local$P(right-count > 0), the canonical latest is on the remote. Note: local$Pis usually checked out in the primary worktree, so it cannot be fast-forwarded from here. In that case ASK the user whether to mergeorigin/$Pinstead of local$Pin Step 4 (substitute the ref). For the common all-local workflow, local$Palready holds every merged sibling — proceed with it.
Step 4 — Merge the parent into the current branch (true merge)
git merge "$P" # or origin/$P if Step 3 selected it- "Already up to date." → the current branch already contains everything on the parent. Report and SKIP to Step 5.
- Fast-forward when the current branch has no commits of its own ahead of
$P. - On conflict (the parent's merged work overlaps this branch's work): do NOT
auto-abort — the user usually wants to integrate. STOP and:
- Show the conflicting files:
git diff --name-only --diff-filter=U. - Offer two paths: (a) help resolve the conflicts now, then
git add <files> && git committo complete the merge; or (b) back out withgit merge --abortto return to the pre-merge state. - Do not leave the worktree half-merged without telling the user which state it's in.
- Show the conflicting files:
- On success, show
git log --oneline -5.
Step 5 — Report
echo "$B now contains $P:"; git log --oneline -5
git status --short
git rev-list --left-right --count "$P...$B" # left = parent-only (should be 0), right = this branch aheadSummarize: the current branch is now up to date with $P (it contains every
sibling's merged work), and is ready for continued work or a later /merge-up
(whose Step 5 sync stays a clean fast-forward).
Notes
- True merge by design, matching
/merge-up, so history is preserved and a later/merge-upof this branch fast-forwards cleanly. - Typical cadence: run all the
/merge-ups for the round first, then run/merge-downin each still-active stream to redistribute the integrated parent to every branch. - Read-only on the parent: this skill never moves the parent's branch tip and never touches the parent worktree's working files — only the current branch advances.
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.

