fusion-skill-authoring

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Skill

创建Skill

When to use

适用场景

Use this skill when you need to create a new skill under
skills/
and want a valid, maintainable
SKILL.md
.
Typical triggers:
  • "Create a skill for ..."
  • "Scaffold
    skills/<name>/SKILL.md
    "
  • "Add a new skill with proper metadata and guardrails"
  • "Help me create a skill that helps create other skills"
当你需要在
skills/
目录下创建新Skill,并且想要生成合法、可维护的
SKILL.md
文件时使用本Skill。
典型触发词:
  • "为...创建一个Skill"
  • "搭建
    skills/<name>/SKILL.md
    脚手架"
  • "添加带有规范元数据和防护规则的新Skill"
  • "帮我创建一个用于生成其他Skill的Skill"

When not to use

不适用场景

Do not use this skill for:
  • Editing product/application code outside
    skills/
  • Large refactors of existing skills unless explicitly requested
  • Running destructive commands or making unrelated repository changes
不要将本Skill用于以下场景:
  • 编辑
    skills/
    目录外的产品/应用代码
  • 对现有Skill进行大规模重构,除非有明确要求
  • 运行破坏性命令或对仓库进行无关修改

Required inputs

必要输入

Collect before writing files:
  • Base skill name in kebab-case (
    <skill-name>
    , without prefix)
  • Prefix choice (ask explicitly; suggest
    custom-
    by default unless the repository has its own convention)
  • Final skill name (
    custom-<skill-name>
    unless the user chooses a different prefix or none)
  • Target path (
    skills/<final-skill-name>/
    ,
    skills/.experimental/<final-skill-name>/
    , or
    skills/.curated/<final-skill-name>/
    )
  • Initial semantic version for frontmatter metadata (
    MAJOR.MINOR.PATCH
    , default
    0.0.0
    for skills created in this repository)
  • License for frontmatter (
    MIT
    by default, or repository-specific choice)
  • One-sentence purpose for frontmatter
    description
  • Expected output (files, commands, summary)
  • Safety boundaries
Validate metadata constraints:
  • name
    : <= 64 chars, lowercase letters/numbers/hyphens only, no XML tags, and no platform-reserved words
  • description
    : non-empty, <= 1024 chars, no XML tags, includes both what it does and when to use it
  • metadata.version
    : semantic version string (
    MAJOR.MINOR.PATCH
    ) in quoted YAML format
  • metadata
    : primarily string key/value map; arrays allowed for explicit relationship fields, avoid nested objects
    • metadata.role
      :
      "orchestrator"
      or
      "subordinate"
      (subordinates cannot run without their orchestrator)
    • metadata.orchestrator
      : required orchestrator skill name (subordinates only)
    • metadata.skills
      : list of subordinate skill names (orchestrators only)
    • metadata.tags
      : optional list of lowercase kebab-case strings for discoverability
    • metadata.mcp
      : optional map for MCP server needs (
      required
      and
      suggested
      lists)
  • license
    and
    compatibility
    : optional top-level frontmatter fields (not inside
    metadata
    )
If required inputs are missing, ask concise targeted questions first. Use
assets/follow-up-questions.md
as the default question bank.
在写入文件前请收集以下信息:
  • 短横线命名格式的基础Skill名称(
    <skill-name>
    ,不带前缀)
  • 前缀选择(明确询问用户;除非仓库有自己的规范,否则默认建议使用
    custom-
  • 最终Skill名称(除非用户选择其他前缀或不使用前缀,否则格式为
    custom-<skill-name>
  • 目标路径(
    skills/<final-skill-name>/
    skills/.experimental/<final-skill-name>/
    skills/.curated/<final-skill-name>/
  • 前置元数据的初始语义化版本号(
    MAJOR.MINOR.PATCH
    ,本仓库创建的Skill默认值为
    0.0.0
  • 前置元数据的许可证(默认
    MIT
    ,或遵循仓库特定选择)
  • 前置元数据
    description
    字段的一句话用途说明
  • 预期输出(文件、命令、摘要)
  • 安全边界
元数据约束校验:
  • name
    :长度不超过64字符,仅允许小写字母/数字/短横线,无XML标签,无平台保留字
  • description
    :非空,长度不超过1024字符,无XML标签,需同时包含功能说明和适用场景
  • metadata.version
    :语义化版本字符串(
    MAJOR.MINOR.PATCH
    ),使用YAML引号包裹格式
  • metadata
    :主要为字符串键值对;明确的关系字段允许使用数组,避免嵌套对象
    • metadata.role
      "orchestrator"
      "subordinate"
      (从属Skill无法脱离对应的编排Skill独立运行)
    • metadata.orchestrator
      :必填的编排Skill名称(仅从属Skill需要)
    • metadata.skills
      :从属Skill名称列表(仅编排Skill需要)
    • metadata.tags
      :可选的短横线命名小写字符串列表,用于提升可发现性
    • metadata.mcp
      :可选的MCP服务需求映射(包含
      required
      suggested
      列表)
  • license
    compatibility
    :可选的顶层前置元数据字段(不放在
    metadata
    内部)
如果缺失必要输入,请先询问简洁的针对性问题。默认使用
assets/follow-up-questions.md
作为问题库。

Instructions

使用说明

  1. Check whether an existing skill already covers the request:
    • Run
      npx -y skills add . --list
    • If an existing skill matches, recommend using/updating that skill instead of creating a duplicate
    • If a skill almost matches, open/recommend a repository issue to request tweaks to that existing skill instead of creating a new custom skill
    • Prioritize reuse of repository skills to avoid proliferation of one-off custom skills
  2. Confirm scope, base skill name, prefix choice, and target path.
  3. Derive
    <final-skill-name>
    from prefix choice.
  4. Create
    <target>/<final-skill-name>/SKILL.md
    .
  5. Create resource directories as needed:
    • references/
      for longer guidance and detailed docs
    • assets/
      for templates/checklists/static resources
    • scripts/
      only when deterministic automation is required
  6. Write frontmatter (
    name
    ,
    description
    ) that satisfies constraints.
  7. Add the core sections:
    • When to use
    • When not to use
    • Required inputs
    • Instructions
    • Expected output
    • Safety & constraints
  8. Keep
    SKILL.md
    concise; move long guidance/examples to
    references/
    .
  9. Use
    assets/
    for templates, sample files, and static resources used by the skill.
  10. Add
    scripts/
    only when deterministic automation is required.
  11. When inputs are missing, ask from
    assets/follow-up-questions.md
    and proceed once answered.
  1. 检查是否已有现有Skill覆盖需求:
    • 运行
      npx -y skills add . --list
    • 如果已有匹配的Skill,建议使用/更新该Skill,不要重复创建
    • 如果有接近匹配的Skill,建议提交仓库Issue申请调整现有Skill,不要创建新的自定义Skill
    • 优先复用仓库现有Skill,避免一次性自定义Skill泛滥
  2. 确认范围、基础Skill名称、前缀选择和目标路径。
  3. 根据前缀选择生成
    <final-skill-name>
  4. 创建
    <target>/<final-skill-name>/SKILL.md
    文件。
  5. 按需创建资源目录:
    • references/
      :存放更详细的指导和文档
    • assets/
      :存放模板/检查清单/静态资源
    • scripts/
      :仅在需要确定性自动化时创建
  6. 编写符合约束的前置元数据(
    name
    description
    )。
  7. 添加核心章节:
    • 适用场景
    • 不适用场景
    • 必要输入
    • 使用说明
    • 预期输出
    • 安全与约束
  8. 保持
    SKILL.md
    简洁;将长指导/示例移动到
    references/
    目录。
  9. 将Skill使用的模板、示例文件、静态资源放在
    assets/
    目录。
  10. 仅在需要确定性自动化时添加
    scripts/
    目录。
  11. 缺失输入时,参考
    assets/follow-up-questions.md
    询问用户,获得答复后继续执行。

Expected output

预期输出

Return:
  • Created/updated file paths
  • Validation command(s) run
  • Pass/fail result with interpretation
  • Any required follow-up actions
  • Any unresolved follow-up questions (if user input was still missing)
  • Whether an existing skill was reused, and if an issue was created/recommended for an almost-match
For a newly scaffolded skill, the default structure should be:
text
skills/<final-skill-name>/
├── SKILL.md
├── references/
└── assets/
Use this baseline for generated
SKILL.md
files:
markdown
---
name: <final-skill-name>
description: <what it does + when to use it>
license: MIT
metadata:
   version: "<initial-version>"
---
返回以下内容:
  • 已创建/更新的文件路径
  • 已运行的验证命令
  • 包含解读的通过/失败结果
  • 所有需要的后续操作
  • 所有未解决的后续问题(如果仍缺失用户输入)
  • 是否复用了现有Skill,以及是否为接近匹配的Skill创建/建议提交Issue
新搭建的Skill默认结构如下:
text
skills/<final-skill-name>/
├── SKILL.md
├── references/
└── assets/
生成
SKILL.md
文件的基线模板如下:
markdown
---
name: <final-skill-name>
description: <what it does + when to use it>
license: MIT
metadata:
   version: "<initial-version>"
---

<Skill Title>

<Skill Title>

When to use

When to use

When not to use

When not to use

Required inputs

Required inputs

Instructions

Instructions

Expected output

Expected output

Safety & constraints

Safety & constraints

undefined
undefined

Validation

验证

Run from repo root:
bash
npx -y skills add . --list
Pass criteria:
  • Exit code is
    0
  • New skill appears discoverable/valid
  • No metadata/path errors
If validation fails:
  • Fix frontmatter (
    name
    ,
    description
    )
  • Verify path and
    SKILL.md
    existence
  • Re-run and report final status
在仓库根目录运行:
bash
npx -y skills add . --list
通过标准:
  • 退出码为
    0
  • 新Skill可被发现/验证通过
  • 无元数据/路径错误
如果验证失败:
  • 修复前置元数据(
    name
    description
  • 验证路径和
    SKILL.md
    文件是否存在
  • 重新运行命令并报告最终状态

Ready-to-merge checklist

合并就绪检查清单

Use
assets/ready-to-merge-checklist.md
as a lightweight PR gate.
使用
assets/ready-to-merge-checklist.md
作为轻量级PR准入条件。

Safety & constraints

安全与约束

Never:
  • Request or expose secrets/credentials
  • Run destructive commands without explicit user confirmation
  • Invent validation results
  • Modify unrelated files outside requested scope
  • Add hidden network-fetch or unsafe script guidance without explicit request
禁止以下行为:
  • 请求或泄露密钥/凭证
  • 未经用户明确确认运行破坏性命令
  • 伪造验证结果
  • 修改请求范围外的无关文件
  • 未经明确要求添加隐藏网络请求或不安全脚本指引