skills-create
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkills Create — the meta-skill
Skills Create — 元Skill
A skill that authors and refactors skills. Two jobs:
- Create a new skill from scratch (or from an existing prompt/command).
- Refactor a fat skill — split detail into , move output shapes into
references/, trimtemplates/down to a lean spine of pointers.SKILL.md
It's built the way it teaches: a lean body that defers detail to . That's progressive
disclosure, and this skill is its own worked example. It's all composable markdown: a skill is a
plus optional files the agent loads only when it reaches for them.
references/SKILL.md这是一个用于编写和重构Skill的Skill,承担两项工作:
- 创建:从零开始(或基于现有提示词/命令)创建新Skill。
- 重构:优化臃肿的Skill——将细节拆分至目录,将输出格式移至
references/目录,把templates/精简为仅包含指向资源的核心框架。SKILL.md
它的构建方式与它所教授的一致:主体简洁,细节全部委托给目录。这是渐进式披露的设计,而本Skill本身就是一个实践范例。所有内容均为可组合的Markdown:一个Skill由文件加上可选的资源文件组成,Agent仅在需要时才会加载这些资源文件。
references/SKILL.mdPrescribe the craft, not the content
规范工艺,而非内容
Be strict on how a skill is built and agnostic on what any given skill — or its output — should contain.
- Prescribe (firm, universal): progressive disclosure · a third-person, trigger-rich · an imperative, lean body · no duplication · every bundled file wired · deliberate invocation control · validation that fits the skill type. (See
description.)references/skill-standards.md - Do NOT prescribe (the author's call): the sections a plan/PRD/report should have, the domain vocabulary, the output shape, which phases exist. There is no canonical output — guide the author to a good decision, never hand them a fixed one.
Strict on the craft so the author stays free on the content. (Guide, don't prescribe — and take-vs-build: you
build a skill when you own the process and want it to follow YOUR way.)
要严格规范Skill的构建方式,但不对具体Skill的内容或输出做强制要求。
- 强制规范(通用且严格):渐进式披露 · 第三人称、触发词丰富的· 命令式、简洁的主体内容 · 无重复内容 · 所有关联文件均已关联 · 可控的调用逻辑 · 适配Skill类型的验证机制。(详见
description)references/skill-standards.md - 不做强制要求(由作者决定):计划/PRD/报告应包含的章节、领域术语、输出格式、流程阶段等。不存在标准输出——引导作者做出合理决策,而非直接给出固定方案。
严格规范工艺是为了让作者在内容创作上拥有更大自由。(引导而非强制——另外,采用“自建”而非“取用”的场景:当你掌控流程,希望Agent遵循你的方式执行时,就需要自建Skill。)
Classify the skill first
先对Skill进行分类
Pin the type before applying the craft — the guidance is proportional, not one-size-fits-all:
| Type | What it is | Apply |
|---|---|---|
| Workflow | a multi-step procedure (plan, review, ship) | the full lens incl. verifiable validation gates |
| Artifact-generator | produces a document/output | Context-is-King + a suggested (never mandated) output shape |
| Knowledge / reference | facts the agent consults | Context-is-King + information-dense; no phases, no validation loop |
| Tool-wrapper | drives a script / CLI / API | a deterministic script + sharp triggers; validation = the tool's own exit code |
A skill can blend types — apply the union of what fits. Never force a workflow's machinery (phases, loops, output
skeletons) onto a knowledge skill. Full detail: → Skill types.
references/skill-standards.md在应用规范之前,先确定Skill的类型——指导方案需匹配类型,而非一概而论:
| 类型 | 定义 | 适用规范 |
|---|---|---|
| Workflow(工作流) | 多步骤流程(规划、评审、交付) | 完整规范,包括可验证的验证节点 |
| Artifact-generator(产物生成器) | 生成文档/输出内容 | 以上下文为核心 + 建议性(非强制性)的输出格式 |
| Knowledge / reference(知识/参考) | Agent可查阅的事实内容 | 以上下文为核心 + 信息密集;无流程阶段,无验证循环 |
| Tool-wrapper(工具封装) | 驱动脚本/CLI/API | 确定性脚本 + 明确触发词;验证机制=工具自身的退出码 |
一个Skill可以混合多种类型——应用所有适配的规范。切勿将工作流的机制(阶段、循环、输出框架)强加于知识类Skill。详细内容见 → Skill类型章节。
references/skill-standards.mdStep 0 — pick the mode (from $ARGUMENTS
)
$ARGUMENTS步骤0 — 选择模式(从$ARGUMENTS
中获取)
$ARGUMENTSParse to pick the mode and the target:
$ARGUMENTS- Starts with (or is clearly a new-skill ask) → create mode; use
create [<name>]as the skill name if one was given → follow<name>.references/creating-skills.md - Starts with (or points at an existing skill) → refactor mode on that path → follow
refactor <path/to/SKILL.md>.references/refactoring-skills.md - Blank or unclear → ask which mode and what the skill/target is. Don't guess.
Both modes obey the same craft rules → read first.
references/skill-standards.md解析****来选择模式和目标:
$ARGUMENTS- 以****开头(或明确是创建新Skill的请求)→ 创建模式;如果提供了
create [<name>],则将其作为Skill名称 → 遵循<name>的指导。references/creating-skills.md - 以**开头(或指向现有Skill)→ 对指定路径的Skill执行重构**模式 → 遵循
refactor <path/to/SKILL.md>的指导。references/refactoring-skills.md - 空白或不明确 → 询问用户选择哪种模式,以及Skill/目标是什么。切勿猜测。
两种模式均遵循相同的工艺规则 → 请先阅读。
references/skill-standards.mdCreate — quick spine (full detail: references/creating-skills.md
)
references/creating-skills.md创建 — 快速框架(详细内容:references/creating-skills.md
)
references/creating-skills.md- Gather context — the literal phrases that should trigger it, the task start-to-finish, the gotchas, the patterns to mirror. Ask the user; don't write yet.
- Plan the resources — what repeats → ; what informs the work →
scripts/; what shapes the output →references/; what you don't own / changes upstream → cite a path/URL; what only exists at runtime → gather it (ask the user, read git/codebase).templates/ - Scaffold — copy to
templates/SKILL.template.md; add.claude/skills/<name>/SKILL.md/references/only as the plan needs.templates/ - Write the spine first — third-person trigger-rich ; imperative, lean body; push detail to references. Get it triggering before you write the references.
description - Validate & iterate — (checklist → trigger test → run it for real).
references/validation.md
- 收集上下文——触发该Skill的具体短语、完整任务流程、注意事项、需遵循的模式。向用户询问这些信息,暂不开始编写。
- 规划资源——重复内容→放入目录;指导工作的参考内容→放入
scripts/目录;定义输出格式的内容→放入references/目录;非你维护/上游会变动的内容→引用路径/URL;仅在运行时存在的内容→收集(询问用户、读取git/代码库)。templates/ - 搭建脚手架——将复制到
templates/SKILL.template.md;仅根据规划需求添加.claude/skills/<name>/SKILL.md/references/目录。templates/ - 先编写核心框架——第三人称、触发词丰富的;命令式、简洁的主体内容;将细节移至参考文件。先确保Skill能被正确触发,再编写参考内容。
description - 验证与迭代——遵循(检查清单→触发测试→实际运行)。
references/validation.md
Refactor — quick spine (full detail: references/refactoring-skills.md
)
references/refactoring-skills.md重构 — 快速框架(详细内容:references/refactoring-skills.md
)
references/refactoring-skills.md- Inventory the SKILL.md — mark each block spine (keep) vs extractable (output templates, schemas, long examples, exhaustive pattern/edge-case lists).
- Extract verbatim into the target skill's (or
references/for output shapes) — don't reword anything that affects behavior.templates/ - Replace with a pointer — for always-needed content, a mandatory-read line ("Before producing output,
read "); for sometimes-needed content, a lazy pointer.
templates/<x>.md - Behavior-preservation check — same process, same output as before. Nothing lost, nothing duplicated.
- Validate — .
references/validation.md
The #1 refactor risk: moving an always-needed output format into a lazily-loaded reference, so the agent forgets to read it and the output silently changes. Always pair such an extraction with a mandatory-read line.
- 盘点SKILL.md——标记每个内容块是核心框架(保留)还是可提取内容(输出模板、 schema、长示例、详尽的模式/边缘情况列表)。
- 原封不动提取——将可提取内容移至目标Skill的目录(输出格式则移至
references/目录)——不要修改任何影响行为的内容。templates/ - 替换为指向链接——对于必须阅读的内容,添加强制阅读行(“生成输出前,请阅读”);对于按需阅读的内容,添加懒加载链接。
templates/<x>.md - 行为一致性检查——确保流程和输出与重构前一致。无内容丢失,无重复内容。
- 验证——遵循。
references/validation.md
重构的头号风险:将必须阅读的输出格式移至懒加载的参考文件,导致Agent忘记读取,进而使输出内容悄无声息地发生变化。对于此类提取操作,务必添加强制阅读行。
When to build a skill at all
何时需要自建Skill
Build one when you own a process and want the agent to follow your way of it, repeatedly — the
take-vs-build rule. A rough threshold: you've prompted the same thing ~3 times (the Rule of Three) → bank it as a skill.
Don't build a skill for a one-off, or for a tool whose owner already ships a good one.
当你掌控某个流程,希望Agent反复遵循你的方式执行时,就需要自建Skill——这就是“取用vs自建”的规则。大致阈值:当你重复三次使用相同的提示词时(三次原则)→ 将其保存为Skill。不要为一次性任务或已有官方优质Skill的工具自建Skill。
Resources
资源
- — the craft rules: skill types, anatomy, context sources, frontmatter spec, progressive disclosure, writing voice, no-duplication, "structure implies a maintainer", wiring, portability.
references/skill-standards.md - — the full create runbook (incl. porting an existing prompt/command).
references/creating-skills.md - — the full split-and-trim runbook, with a before/after.
references/refactoring-skills.md - — the validation gates (structure · description · body · disclosure · behavior · trigger test).
references/validation.md - — the lean SKILL.md skeleton to scaffold from.
templates/SKILL.template.md
- ——工艺规则:Skill类型、结构、上下文来源、前置规范、渐进式披露、写作风格、无重复原则、“结构暗示维护者”、关联机制、可移植性。
references/skill-standards.md - ——完整的创建手册(包括将现有提示词/命令转化为Skill)。
references/creating-skills.md - ——完整的拆分与精简手册,包含前后对比示例。
references/refactoring-skills.md - ——验证节点(结构·描述·主体·披露·行为·触发测试)。
references/validation.md - ——用于搭建脚手架的简洁SKILL.md框架。
templates/SKILL.template.md