Skip to content

fix: 修复 description 只在创建时写入、后续 publish 不更新的 bug#15

Merged
ginuim merged 1 commit into
ginuim:mainfrom
StrMQL:fix/description-not-updated-on-publish
Jul 20, 2026
Merged

fix: 修复 description 只在创建时写入、后续 publish 不更新的 bug#15
ginuim merged 1 commit into
ginuim:mainfrom
StrMQL:fix/description-not-updated-on-publish

Conversation

@StrMQL

@StrMQL StrMQL commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

问题

publishSkillFromZip() 只在新建 skill 时(!skillExists 分支)调用 SkillModel.create() 写入 description。当 skill
已存在时,CLI 发送的 description 字段被忽略,只进了 versions 表,skills.description 始终保持初始值。

修复

skillExists 为 true 且 description 非空时,调用 SkillModel.update() 刷新 skills.description

改动 ────────────────────────

src/utils/publish-skill.js — 加 3 行 ────────────────────────

复现

  1. 创建一个 skill(description = "5 步检查")
  2. 修改 SKILL.md description 为 "7 步检查",skb publish
  3. 访问 GET /api/v1/skills/<id> → description 仍为 "5 步检查"

publishSkillFromZip only wrote description when creating a new skill.
On subsequent publishes, the description sent by the CLI was silently
dropped — only the version record got it, while skills.description
stayed stale.

Now calls SkillModel.update() for existing skills when description is
provided, keeping the skills table description in sync with the latest
publish.
@ginuim
ginuim merged commit 49f29b0 into ginuim:main Jul 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants