/unity-version-control:uvcs-mergefrom unity-version-control
Merge a UVCS / Plastic SCM branch, changeset, label, or shelve into the current workspace with the cm CLI and drive it to a clean, resolved workspace without ever opening a merge tool window: preview first, apply with diff3 conflict markers, resolve or pick a contributor, verify, then hand the check-in decision back to the user. Use whenever the user wants to merge or integrate one UVCS branch into another, merge down from /main into a task branch, cherry-pick a changeset, resolve UVCS merge conflicts, finish a merge that is already in progress, or when cm refuses an operation because a merge is in progress or conflict markers are still pending. All cm syntax comes from the uvcs-core skill — load it first.
Ships in unity-version-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
cmThis skill owns the decisions. Every cm flag, output format, and exit-code contract it names
belongs to the uvcs-core skill — load it first, and read these two references rather than
guessing: uvcs-core/references/merge-conflict-markers.md (marker mode, availability, exit
codes, marker format, the check-in guard) and uvcs-core/references/branches-and-merge.md
(preview output tokens, cherry-pick, no rebase).
A merge you cannot finish is worse than one you never started: it blocks the next merge and the next check-in for whoever owns the workspace. So the shape of this workflow is learn what the merge does before applying it, apply it in a mode that can never block, and leave the workspace either finished or obviously unfinished — never silently half-merged.
Merge direction in UVCS is "stand on the destination, pull from the source" — the workspace is the destination. Getting this backwards merges the wrong way round, so confirm before acting:
cm status --header # current branch@repo@server and head changeset
cm status # pending changes
Both are read-only, as is the preview in step 2; gather all three before deciding anything.
cm switch replaces their working tree.cm status is not clean, do not merge yet. By default cm merge refuses a dirty workspace:
it lists the pending changes and exits 0 without merging. Where the client is configured to
allow it, an undo after a bad merge would take the user's own edits with it. Offer to shelve
first (cm shelveset create --all -c "...", which is recoverable) or to check in, then merge.cm status reports a merge already in progress or files with pending conflict markers,
finish that merge first (jump to step 4) — a new merge is refused while either is pending.cm merge <source_spec> # read-only; no --merge, nothing is touched
Nothing is touched without --merge, so there is never a reason to skip this. If the preview
reports no merges detected, say so and stop. The output tokens are in
uvcs-core/references/branches-and-merge.md; --machinereadable gives one stable prefix per line
if you are parsing it.
One reading trap: a file the preview flags as conflicting usually merges cleanly. Report "N files need a content merge", never "N conflicts" — what actually collides is only known once the merge runs.
| The user has said | Do this |
|---|---|
| nothing about conflicts | --conflict-markers (below). It behaves exactly like a normal merge when nothing collides, so it costs nothing to use by default. |
| "resolve the conflicts", "handle it", "just merge it" | --conflict-markers, then resolve. |
| they want to resolve in their own merge tool / GUI | The merge is theirs to run: give them the exact command, then stop and wait. Say why you are not running it — the call blocks until the window closes, and killing it on a timeout leaves the merge half-applied. Do not quietly substitute markers: a marked-up file is not the three-pane merge they asked for. Offering markers as an alternative is fine; deciding for them is not. |
| which side wins ("take theirs", "keep ours", "prefer main") | --keepsource / --keepdestination — no markers, no resolution work. Confirm which contributor they mean: source is the branch being merged in, destination is the workspace. |
.unity, .prefab and other Unity YAML assets are a deliberate exception. They are text, so
marker mode will happily mark them — but it bypasses UnityYAMLMerge, and a scene file full of
markers is worse than useless. Which side wins is a content decision you cannot make from the
file, so ask, then take that whole side: --keepsource / --keepdestination when it applies to
the merge as a whole, otherwise restore that one file from the chosen changeset with cm cat
(the marker header names both changesets) — once the markers are gone the entry clears itself.
Marker mode is newer than some clients (uvcs-core/references/merge-conflict-markers.md says how
to probe for it).
Where it is missing the only headless options are --keepsource / --keepdestination; if
neither fits, hand the merge back to the user rather than launching a tool that will hang.
cm merge <source_spec> --merge --conflict-markers
This is mutating, but it is confined to the workspace: the merge lands as pending changes, and
nothing reaches the server until check-in, so cm undo still backs the whole thing out. Exit 1
here means "files need attention", not failure — never retry the command on it (the full
exit-code contract is in uvcs-core/references/merge-conflict-markers.md).
Then work the output, one line per file that needs you:
--keepsource / --keepdestination. For a binary asset, which side wins is a call you usually
cannot make from the file alone — ask, naming both changesets.Resolving means producing the code that should exist, which is frequently neither side verbatim:
two people adding to the same list usually want both additions; two people rewriting the same
function usually want one design, not a stitched-together hybrid. Read all three sections —
destination (the workspace), base (the common ancestor, context only), source (incoming) —
and delete every marker line when done.
Judgement, not mechanics, is what makes this safe:
/main.If the correct content legitimately contains marker text (a test fixture, a parser constant),
clear its entry without touching the file: cm merge --mark-resolved <path>.
cm merge --list-conflict-markers # read-only; exit 0 = nothing left
Build or run the tests if the repository has an obvious way to — a merge that compiles on both sides separately can still fail merged, and you are the last person who can catch it cheaply.
Stop there. The merge result is pending changes in the user's workspace; checking it in
creates a changeset on the server that other people build on, and no cm command deletes it.
That is the user's call, and "merge this branch" does not ask for it. Report what is pending and
offer:
The merge is applied and nothing is left to resolve. To finish it, the changes need to be checked in —
cm checkin --all -c "Merge br:/main/task001". Want me to run that?
Run it only once they say yes. cm checkin also refuses while any marked file still contains
markers and names them — that guard is the safety net, not the plan.
Merges from a shelve never end in a check-in. cm merge sh:<id> and cm shelveset apply
exist to put work-in-progress back into a workspace: pending changes are the finished state,
and the user carries on editing. Do not check in, and do not offer to.
Say so explicitly and leave the workspace in a state the user can see. A merge is backed out all at once, from the workspace root, and the undo discards anything else pending with it, irreversibly — so offer a shelve first, and never present the undo as a casual next step:
cm undo . -r
Leaving markers in place is also a legitimate outcome: the check-in guard means nothing bad can land by accident.
There is no rebase, no staging area, and no local commit. Never reach for git in a UVCS
workspace, and never fabricate a cm flag — check cm help merge or uvcs-core instead.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub unity-technologies/uvcs-agent-plugin --plugin unity-version-control7 skills in this plugin
/uvcs-address-reviewAddress the comments a reviewer left on a UVCS / Plastic SCM code review or merge request, as the code author: find the review on the workspace's branch, list the change requests, questions and comments still pending, plan their order, then fix, answer, discard or re-request under the user's direction, one check-in per change request. Use when the user says fix the review, address the review comments, apply the review changes, my review came back as rework required, answer the reviewer's question, discard a review comment, or re-request review. This is the author side — producing findings and publishing them is uvcs-code-review. All cm syntax comes from the uvcs-core skill — load it first./uvcs-code-reviewReview UVCS / Plastic SCM changes as the reviewer and publish the findings as review comments: a branch through its merge request, a changeset or shelve through a code review, or the workspace's pending changes in chat. Use when the user says review my changes, review this branch, review changeset 42 or shelve 12, code review, open a merge request or pull request, request a review from someone, publish review comments, approve, LGTM, or set my status to rework required. Merges the project's own code-review-rules skill into its general review rules when the project has one. Performing the merge is uvcs-merge; fixing a review as its author is uvcs-address-review. All cm syntax comes from the uvcs-core skill — load it first./uvcs-coreCore knowledge for Unity Version Control (UVCS, formerly Plastic SCM) and its cm command line: how UVCS concepts differ from git, object specs (br:, cs:, lb:, sh:, serverpath:), which cm command answers which question, read-only vs mutating vs irreversible commands, how to name UVCS objects and build deep links (plastic://, or unityhub:// when the workspace is a Unity project) when reporting results, and curated cm recipes for status, find queries, diff and patch, history, branches, checkin, shelves, merge requests and code reviews. Use whenever composing or running any cm command, or when the user mentions UVCS, Unity Version Control, Plastic SCM, cm, changeset, cset, workspace, selector, branch, label, shelve, shelveset, checkin, annotate, merge request, MR, pull request, PR, code review, reviewer, xlink, plastic:// or unityhub:// links. Every UVCS workflow skill builds on this one — load it first./uvcs-report-issueReport a defect or a gap in this UVCS agent plugin itself — a cm command or flag a skill gave that cm rejected, a fact a reference gets wrong, a recipe or workflow that is missing, a skill that did not trigger or behaved differently in another agent, or a result that was not what the user asked for — as a GitHub issue on the plugin's repository, with a redacted, reproducible scenario a maintainer can turn into a fix and an eval. Use when the user says report this bug, file an issue, the plugin or the skill got it wrong, request a skill or a workflow, or when uvcs-core flags a rejected recipe. Not for problems in UVCS, cm or a server themselves, and not for bugs in the user's own code./uvcs-root-causeTrace a bug, regression, crash or failing test back to the UVCS / Plastic SCM changeset that most likely introduced it: bound the history window, expand from the symptom file to what it depends on, rank only changesets with concrete evidence, and confirm the top suspect at line level with cm annotate. Read-only end to end. Use when the user asks why something broke, what changeset or cset broke it, which change introduced a bug, who broke a file or a line, when a feature last worked, how to bisect or blame a regression in UVCS, or hands you a stack trace, error message or failing test and wants the culprit changeset. Not for reviewing what a branch changed and not for performing a merge. All cm syntax comes from the uvcs-core skill — load it first./uvcs-switchMove a UVCS / Plastic SCM workspace onto another branch, changeset, label or shelve with cm switch — including creating the branch first — and handle pending changes the way the UVCS GUIs and the Unity plugin do: detect them, ask whether to leave them behind on a shelve or bring them along, then shelve, undo, switch, and reapply. Use whenever the user wants to switch, change or move the workspace to another UVCS branch, start a new task branch and work on it, or when cm switch is refused, cancelled or hangs because the workspace has pending changes. All cm syntax comes from the uvcs-core skill — load it first.