feat(artifacts): Share again takes a skill's newest version; a same-named upload updates it

A shared skill followed its owner's ~/.claude/skills folder only, so one
uploaded from a browser (or living in a plugin) stayed at its first snapshot
for good. Share again (a skill's ⋯ menu and detail sheet) now takes the
owner's copy on the server — its source folder, else the same-named skill of
a plugin they installed at user scope — and shares it; with no copy it asks
for the folder and uploads it onto that row (`id`). An upload whose skill is
named like one the uploader already has replaces that row's version instead
of adding a twin. Installers are then offered Update, as before.
This commit is contained in:
2026-10-30 14:20:18 +07:00
parent 4b8f59695b
commit e7060a5e42
12 changed files with 436 additions and 19 deletions
+2 -1
View File
@@ -238,7 +238,7 @@ const paths = {
summary: "Skills from files: a file, a folder, a .zip/.skill or several skills",
operationId: "uploadArtifactSkills",
description:
"`paths` is a JSON array of each file's relative path. Zip sizes are read before inflating; nothing is stored if any skill fails.",
"`paths` is a JSON array of each file's relative path. Zip sizes are read before inflating; nothing is stored if any skill fails. A skill whose name matches one the caller already has (not a workspace's) becomes that row's new version (`replaced: true`, `changed`) instead of a second row; `id` (Share again) puts the ONE uploaded skill onto that row, under the row's name.",
requestBody: multipart(
{
files: { type: "array", items: { type: "string", format: "binary" } },
@@ -246,6 +246,7 @@ const paths = {
name: { type: "string" },
title: { type: "string" },
description: { type: "string" },
id: { type: "string", description: "Share again: the skill row the upload replaces." },
},
["files"]
),