refine-skill-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill: Refine Skill Design

Skill:Skill设计优化

Purpose

用途

As a "Skill for Skills," this skill audits and refactors AI capability definitions in draft form. It applies a senior prompt-engineering perspective to improve logic robustness, scenario coverage, and instruction adherence so each capability meets LLM best practices.

作为一款“面向Skill的Skill”,本Skill负责审核并重构草稿形式的AI能力定义。它以资深提示工程的视角,提升逻辑健壮性、场景覆盖度以及对指令的遵循度,确保每项能力符合LLM最佳实践。

Use Cases

适用场景

  • New skill onboarding: Expert review after an Agent has generated a new Skill draft.
  • Quality fixes: When a Skill behaves inconsistently on newer models, align logic and strengthen examples.
  • Consistency audit: Check that a new Skill matches the tagging system and naming in
    INDEX.md
    .
  • Upgrade: Turn a simple "formatting tool" into a full Agent capability with interaction policy and error handling.
Scope: This skill is for auditing and refactoring existing SKILLs, not creating from scratch. For learning how to create new skills, plan scripts/references/assets, or run init/package scripts, use skills.sh's
skill-creator
(e.g. anthropics/skills).

  • 新Skill入门:Agent生成新Skill草稿后的专家评审。
  • 质量修复:当Skill在较新模型上表现不一致时,对齐逻辑并强化示例。
  • 一致性审核:检查新Skill是否与
    INDEX.md
    中的标签系统和命名规则匹配。
  • 升级优化:将简单的“格式化工具”升级为具备交互策略和错误处理的完整Agent能力。
适用范围:本Skill仅用于审核并重构现有SKILL,不支持从零创建。如需学习如何创建新技能、规划脚本/参考资料/资源,或运行初始化/打包脚本,请使用skills.sh的
skill-creator
(例如anthropics/skills)。

Behavior

行为规范

Meta-audit model

元审核模型

  1. Intent: Is Purpose specific enough? Avoid vague terms like "Helper," "Utilities."
  2. Logic: Does Input → Behavior → Output form a clear chain?
  3. Constraints: Do Restrictions cover the most common failure modes in the domain?
  4. Examples: Do Examples progress from simple to complex and include at least one edge case?
  1. 意图:Purpose是否足够具体?避免使用“助手”“工具集”等模糊表述。
  2. 逻辑:输入→行为→输出是否形成清晰的链路?
  3. 约束:Restrictions是否覆盖了该领域最常见的失败场景?
  4. 示例:Examples是否从简单到复杂递进,且至少包含一个边缘案例?

Optimization flow

优化流程

  1. Structure: Apply the standard template (YAML, Purpose, Use cases, Behavior, I/O, Restrictions, Self-Check, Examples).
  2. Verbs: Use precise, unambiguous verbs (e.g. "handle" → "parse," "transform," "trim").
  3. Interaction: For complex logic, add "confirm before proceed" or "choose among options."
  4. Metadata: Align tags with
    INDEX.md
    and suggest a sensible SemVer version.

  1. 结构:应用标准模板(YAML、Purpose、Use cases、Behavior、I/O、Restrictions、Self-Check、Examples)。
  2. 动词:使用精准、无歧义的动词(例如将“处理”替换为“解析”“转换”“修剪”)。
  3. 交互:针对复杂逻辑,添加“执行前确认”或“选择选项”机制。
  4. 元数据:与
    INDEX.md
    中的标签对齐,并建议合理的SemVer版本。

Input & Output

输入与输出

Input

输入

  • A SKILL Markdown document to optimize, or a rough draft.
  • 待优化的SKILL Markdown文档或草稿。

Output

输出

  • Optimized SKILL: Production-grade Markdown that satisfies the spec.
  • Diff summary: What was changed and why.
  • Version suggestion: SemVer recommendation.

  • 优化后的SKILL:符合规范的生产级Markdown内容。
  • 差异总结:变更内容及原因说明。
  • 版本建议:SemVer版本推荐。

Restrictions

约束条件

  • Do not change intent: Optimization must preserve the skill's core purpose.
  • Minimize prose: Prefer lists and tables over long README-style text.
  • Multiple examples: Do not keep only one "happy path" example; include at least one challenging or edge-case example.

  • 不得修改核心意图:优化必须保留Skill的核心用途。
  • 精简文字:优先使用列表和表格,而非长篇README式文本。
  • 多示例要求:不得仅保留“常规路径”示例;至少包含一个具有挑战性的边缘案例示例。

Self-Check

自我检查

  • Self-apply: Could this skill successfully refine itself?
  • Clarity: Could an Agent without domain background reproduce results from Behavior?
  • Compliance: Are all required sections and metadata fields present?

  • 自我验证:本Skill能否成功优化自身?
  • 清晰度:无领域背景的Agent能否根据Behavior部分复现结果?
  • 合规性:是否包含所有必填章节和元数据字段?

Examples

示例

Before

优化前

name: spell-check This skill checks spelling. Input: multilingual text. Output: corrected text.
name: spell-check 本技能用于检查拼写。 输入:多语言文本。 输出:修正后的文本。

After

优化后

name: polish-text-spelling description: Context-aware spelling and terminology correction for multilingual documents. tags: [writing, quality-control] version: 1.1.0

Skill: Spelling and terminology

Purpose: Identify and fix low-level spelling errors and terminology inconsistency without changing the author's intent or tone.

Behavior:

  1. Detect language.
  2. Build a term list if the text is long.
  3. Distinguish "typos" from "intentional style."

Restrictions: Do not change proper nouns or specific abbreviations unless clearly wrong.

name: polish-text-spelling description: 针对多语言文档的上下文感知拼写与术语修正。 tags: [writing, quality-control] version: 1.1.0

Skill:拼写与术语修正

用途:识别并修复低级拼写错误和术语不一致问题,不改变作者的意图或语气。

行为:

  1. 检测语言类型。
  2. 若文本较长,构建术语列表。
  3. 区分“拼写错误”与“有意的风格表达”。

约束条件:不得修改专有名词或特定缩写,除非明显错误。

Example 2: Edge case — ambiguous draft

示例2:边缘案例——模糊草稿

  • Input: A Skill draft whose Purpose is "help users handle files," with no Use Cases or Restrictions.
  • Expected: Pin down intent (replace "handle" with concrete verbs: parse, convert, merge, etc.); add Use Cases and Restrictions (e.g. do not overwrite source; do not modify binaries); add at least one edge example (e.g. empty file, very large file, permission denied).

  • 输入:一款Purpose为“帮助用户处理文件”的Skill草稿,无Use Cases和Restrictions章节。
  • 预期输出:明确核心意图(将“处理”替换为具体动词:解析、转换、合并等);添加Use Cases和Restrictions(例如:不得覆盖源文件;不得修改二进制文件);至少添加一个边缘示例(例如:空文件、超大文件、权限不足)。

Appendix: Output contract

附录:输出契约

When this skill produces a refinement, the output MUST satisfy this contract so that Agents and downstream tools can consume it consistently:
ElementRequirement
Optimized SKILLFull Markdown content (or path to file). MUST satisfy spec/skill.md: YAML front matter, Purpose, Use cases, Behavior, I/O, Restrictions, Self-Check, and at least one Example.
Diff summaryList of changes. Each entry MUST include Section (e.g.
Purpose
,
Behavior
,
metadata
), Change (short description of what was changed), and Reason (why the change was made).
Version suggestionSemVer string
major.minor.patch
. Optionally Rationale (e.g.
minor: added Restrictions
).
当本Skill生成优化结果时,输出必须满足以下契约,以便Agent和下游工具能够一致地使用:
元素要求
优化后的SKILL完整的Markdown内容(或文件路径)。必须符合spec/skill.md规范:包含YAML前置元数据、Purpose、Use cases、Behavior、I/O、Restrictions、Self-Check,以及至少一个Example。
差异总结变更列表。每个条目必须包含章节(例如
Purpose
Behavior
metadata
)、变更内容(简短描述变更点)和原因(说明变更的理由)。
版本建议SemVer格式字符串
major.minor.patch
。可选择性添加理由(例如
minor: 新增Restrictions章节
)。