You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
update: 3-way merge upstream changes into a locally modified skill #890
When a skill installed from git has local edits and upstream has a newer commit, skillshare update should be able to merge the upstream changes into the local copy. Today the only choices are to skip the skill or to discard the edits with --force.
Why
#622 added the modified indicator and made update skip modified skills. A user who keeps one small local change still cannot take upstream improvements without redoing that change by hand.
What already exists
.metadata.json stores the install commit and file_hashes for each skill. The base version of a file is its content at that commit. The data for a 3-way merge is therefore already recorded. (I read the metadata. I did not read the update code.)
Proposed behavior
skillshare update NAME --merge merges each file 3-way. Base is the file at the recorded commit. Ours is the local file. Theirs is the file at the new commit.
A clean merge writes the result and records the new commit.
A conflict writes <<<<<<< markers, lists the conflicted files, and exits non-zero.
Files added upstream are copied. Files deleted upstream are removed only if the local copy is unchanged.
skillshare check reports "modified and upstream changed" so the user knows a merge is needed.
Prototype
I wrote a shell script that does this for one skill with git merge-file. It has check, diff and merge commands. I tested a clean merge, a same-line conflict, and a refusal to run on a dirty tree. I can attach it or open a PR.
Environment
skillshare v0.26.0. On this version update NAME replaced my edited pr/SKILL.md with the upstream file.
Thanks for the detailed write-up, and for building a prototype before asking.
Nothing is decided yet, but here are my first thoughts:
Newer releases already cover part of this. update skips a modified skill instead of overwriting it, check reports "local changes since install; update available upstream", and check --diff shows your edits against the installed commit. Could you try v0.30.7 and tell me what's still missing for you?
The merge itself is the new part. Whether it should be a flag or the default is still open for me. Which would you expect?
Conflicts are what I'm least sure about. A SKILL.md with conflict markers would be synced to every tool, so a conflict should probably leave the skill untouched.
Two more questions:
In your use, how often does the merge conflict, compared to merging cleanly?
After a clean merge, would you expect the skill to still show as "modified"?
On the PR: yes, it's welcome, and feel free to attach the script here. I'd like to settle the direction in this issue first, so you don't build something that changes shape. Feature PRs here sometimes end up as a reference for the final implementation instead of being merged as-is.
Activity
runkids commentedon Nov 13, 2026
Thanks for the detailed write-up, and for building a prototype before asking.
Nothing is decided yet, but here are my first thoughts:
updateskips a modified skill instead of overwriting it,checkreports "local changes since install; update available upstream", andcheck --diffshows your edits against the installed commit. Could you try v0.30.7 and tell me what's still missing for you?SKILL.mdwith conflict markers would be synced to every tool, so a conflict should probably leave the skill untouched.Two more questions:
On the PR: yes, it's welcome, and feel free to attach the script here. I'd like to settle the direction in this issue first, so you don't build something that changes shape. Feature PRs here sometimes end up as a reference for the final implementation instead of being merged as-is.