starlight-skills-bp-descriptive-frontmatter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
The
description
field in the frontmatter is the most critical piece of metadata for your skill.
AI agents do not read the entire body of every skill in your repository to figure out what they do. Instead, the agent looks solely at the description to autonomously decide whether to load and execute that skill.
To ensure the agent discovers and uses your skill correctly, your natural language description (written in English) must clearly explain three things:
  1. What the skill does.
  2. When it should be triggered.
  3. When NOT to use it (a negative trigger).
Example of a great description:
Generates descriptive commit messages by analyzing git diffs. Use this when the user asks for help writing a commit message or reviewing staged changes. Do not use this for merging branches or rebasing.
frontmatter中的
description
字段是你的skill最重要的元数据。
AI Agent不会读取仓库中每个skill的全部正文内容来了解其功能,相反,Agent仅会参考description字段来自主决定是否加载并执行该skill。
为了确保Agent能正确发现并使用你的skill,你编写的自然语言描述(需使用英文撰写)必须清晰说明三点:
  1. 该skill的功能是什么
  2. 何时应该触发该skill
  3. 何时不应使用该skill(即负触发条件)
优秀描述示例:
Generates descriptive commit messages by analyzing git diffs. Use this when the user asks for help writing a commit message or reviewing staged changes. Do not use this for merging branches or rebasing.