Skip to content

[Bug]: 安装 Skill 导致 skill.md 头部 YAML 前置注释重复叠加 #131

@Linate

Description

@Linate

Area

Desktop app

Platform

Windows x64

Version

0.5.5

What happened?

下载skill时skill.md已带有YAML 前置注释,将skill安装到AI编程工具时skill.md头部会再次添加YAML前置注释,而不是替换或跳过,导致出现多段重复的前置注释。

What did you expect?

  • 安装时检测 skill.md 是否已有 YAML 前置注释,如果有则更新替换,而不是追加。
  • 或者先移除所有现有前置注释,再插入最新元数据。

Steps to reproduce

  1. skill商店选择一个skill导入到我的skills(例如官方商店的“Word Docs”)
  2. 我的skills页面进入下载的skill,工具栏选择文件查看skill.md源码,观察YAML前置注释,此时仅一个YAML前置注释
  3. 将skill安装到AI编程平台中(例如TRAE)
  4. 工具栏选择文件查看skill.md源码,观察YAML前置注释,此时出现两个YAML前置注释

Logs, screenshots, or extra context

下载“Word Docs” skill时skill.md的YAML前置注释:


---
name: docx
description: "Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation."
license: Proprietary. LICENSE.txt has complete terms
---


安装到平台后skill.md的YAML前置注释:

---
name: docx
description: "Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation."
version: 1.0.0
author: Anthropic
compatibility: [claude, cursor, windsurf, opencode, antigravity]
---
---
name: docx
description: "Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation."
license: Proprietary. LICENSE.txt has complete terms
---

Before submitting

  • I searched existing issues and did not find an obvious duplicate.
  • I can still reproduce this on the latest available build for my channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingversion: 0.5.5Issues reported against a specific PromptHub version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions