Resolve rebase/merge conflicts in CDS release-versioning files — package.json "version" fields and CHANGELOG.md entries — that arise because packages were versioned independently on master and the current branch. Recomputes each package's version by applying the branch's bump type (patch/minor/major) on top of master's latest version, rewrites CHANGELOG entries with today's date and the new version, then continues the rebase and formats. Use when the user asks to "resolve a versioning conflict", "resolve a package.json conflict", "resolve a changelog conflict", or when you organically detect conflict markers in package.json / CHANGELOG.md files during a rebase or merge. When detected organically, ALWAYS ask the user for confirmation before running this flow.
CDS ships many packages, and the cds release group (web, mobile, common,
mcp-server) is version-locked. When both master and the current branch bump
package versions independently, a rebase (or merge) collides on two file types only:
packages/<pkg>/package.json — the "version" fieldpackages/<pkg>/CHANGELOG.md — the top-of-file version entriesThis skill resolves only those two file types mechanically. Anything else that conflicts must be raised to the user.
Prefer re-running the release when the plan is recoverable. Versions and changelog entries are generated by
nx releasefrom the version plans in.nx/version-plans/. If you still have the branch's plan file (or can recreate it withyarn nx release plan), the cleanest fix is to takemaster's side of both conflicted files, restore the plan, and re-runyarn release. Use the manual recomputation below only when that is not practical. Seedocs/release.md.
Trigger this flow when EITHER:
package.json / CHANGELOG
conflict, or<<<<<<<, =======, >>>>>>>) inside
package.json or CHANGELOG.md files during a rebase/merge.In case 2 you MUST ask the user for confirmation before performing any resolution. Describe what you found (which packages, which files) and ask whether to run this resolution flow. Do not resolve organically-detected conflicts without an explicit go-ahead.
origin/master (equivalently, the HEAD/"ours" side of a rebase) is the newest
published version.version commit, then apply
that same bump to master's latest version. That is the resolved version.
x.y.Z → x.y.(Z+1)x.Y.z → x.(Y+1).0X.y.z → (X+1).0.0package.json and CHANGELOG.md conflicts are in scope. If any other
file is conflicted, STOP and raise it to the user before continuing.git statusList the conflicted (both modified / unmerged) paths. Partition them:
packages/*/package.json, packages/*/CHANGELOG.mdIf any out-of-scope file is conflicted, stop and raise it to the user now. Do not touch those files. Only proceed once the user decides how to handle them.
If you got here organically (not via an explicit user request), also confirm with the user that they want you to run this resolution flow before editing anything.
Note: package.json files often auto-merge cleanly even when the CHANGELOG for the
same package conflicts — you must still recompute their versions in the steps below,
so include every affected package, not just the ones with visible conflict markers.
The conflict is anchored on a specific commit (during a rebase, git names it in
git status as the commit it "could not apply", e.g. 571c39254 (version)).
Inspect exactly what versions that commit changed and by how much:
git show <version-commit> -- '**/package.json'For each package, read the - "version": "A.B.C" → + "version": "A.B.D" hunk and
classify the bump as patch / minor / major (rule 2).
For every affected package:
git show origin/master:packages/<pkg>/package.json | grep '"version"'(During a rebase the working-tree/HEAD value equals master's, since master's side
was checked out — either source is fine.)
Compute the resolved version = master's latest version + the branch's bump type.
Example from a real run: master was 9.6.9 for all packages; the branch's bump was
patch (9.6.8 → 9.6.9); resolved version = 9.6.10 for all of them.
package.jsonSet the "version" field of every affected package to its resolved version.
Check whether packages pin each other's versions:
grep -nE '"@coinbase/cds-(common|web|mobile|mcp-server|icons)"' packages/<pkg>/package.jsonIf internal deps use workspace:^ (the CDS convention), only the top-level
"version" field needs changing. If any dep pins an explicit version of a package
you just bumped, update that pin to match.
CHANGELOG.mdFor each conflicted CHANGELOG, produce this order (newest first):
Match the file's existing heading format exactly. CDS uses two shapes:
## <version> (M/D/YYYY PST) followed by a #### 🐞 Fixes (or
🚀 Updates, 📘 Misc, …) section and bullet(s).## <version> ((M/D/YYYY, HH:MM AM/PM PST)) followed by
This is an artificial version bump with no new change.Rules of thumb:
Remove every <<<<<<<, =======, >>>>>>> marker.
grep -rn '^<<<<<<<\|^=======\|^>>>>>>>' packages/*/CHANGELOG.md packages/*/package.jsonExpect no output.
Stage the resolved files and continue without editing commit messages:
git add packages/*/package.json packages/*/CHANGELOG.md
GIT_EDITOR=true git rebase --continueGIT_EDITOR=true accepts each existing message unchanged. If more conflicts surface
on later commits, repeat Steps 0–6; if a later conflict is out-of-scope, stop and
raise it.
(For a merge instead of a rebase, git commit --no-edit after git add.)
yarn nx format:writeSummarize:
git push --force-with-lease) will be needed — do NOT push unless asked.5e282a3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.