| name | writing-great-skills |
| description | Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable. |
| 触发词 | 编写与精修技能的参考——使技能具备可预测性的词汇与原则。 |
| disable-model-invocation | true |
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
A skill exists to wrangle determinism out of a stochastic system. Predictability — the agent taking the same process every run, not producing the same output — is the root virtue; every lever below serves it.
技能的存在,是为了从随机系统中驯服出确定性。可预测性——代理每次运行走相同的过程,而非产出相同的输出——是根本美德;下文每一个杠杆都服务于它。
Bold terms are defined in GLOSSARY.md; look them up there for the full meaning.
粗体术语在 GLOSSARY.md 中定义;请到该处查阅完整含义。
Two choices, trading different costs:
两种选择,各付不同的代价:
disable-model-invocation, and write a model-facing description with rich trigger phrasing ("Use when the user wants…, mentions…").disable-model-invocation: true; the description becomes human-facing — a one-line summary, trigger lists stripped.disable-model-invocation,编写面向模型的 description,包含丰富的触发措辞("当用户想要……、提到……时使用")。disable-model-invocation: true;description 变为面向人类——一行摘要,去掉触发词列表。Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.
只有在代理需要自主触达该技能,或其他技能需要触达它时,才选择模型调用。如果它永远只靠手动触发,就做成用户调用,不用付上下文负载。
When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a router skill: one user-invoked skill that names the others and when to reach for each.
当用户调用技能多到你记不住时,累积的认知负载可以通过一个路由器技能来解决:一个用户调用技能,列出其他技能以及何时使用每一个。
A model-invoked description does two jobs — state what the skill is, and list the branches that should trigger it. Every word increases context load, so a description earns even harder pruning than the body:
模型调用的description 承担两项工作——说明技能是什么,以及列出应触发它的分支。每个词都增加上下文负载,因此 description 比正文更需要严格修剪:
A skill is built from two content types — steps and reference — that mix freely: a skill can be all steps, all reference, or both. The core decision is which to use and where each sits on the information hierarchy, a ladder ranked by how immediately the agent needs the material:
技能由两种内容类型构建——步骤和参考——可自由混合:技能可以全是步骤、全是参考,或兼而有之。核心决策是使用哪种类型,以及每种类型在信息层级上的位置——一个按代理对材料需求的紧迫程度排列的阶梯:
SKILL.md, the primary tier: what the agent does, in order. Each step ends on a completion criterion, the condition that tells the agent the work is done. Make it checkable (can the agent tell done from not-done?) and, where it matters, exhaustive ("every modified model accounted for", not "produce a change list") — a vague criterion invites premature completion.SKILL.md, consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell. This skill is all reference.SKILL.md into a separate file, reached by a context pointer, loaded only when the pointer fires. (Spans disclosed reference — a sibling file like GLOSSARY.md, still part of the skill — through fully external reference that lives outside the skill system and any skill can point at.)SKILL.md 中的有序操作,主要层级:代理按顺序执行的动作。每个步骤以完成标准结束,即告诉代理工作已完成的条件。使其可检查(代理能否区分完成与未完成?)并在需要时穷尽("每个修改过的模型都已计入",而非"生成变更列表")——模糊的标准会招致过早完成。SKILL.md 中按需查阅的定义、规则或事实。通常是合理的扁平对等集合(审查的每条规则在同一层级上)——这是很好的安排,不是坏味道。本技能全是参考。SKILL.md 推入单独文件的参考,通过上下文指针触达,仅在指针触发时加载。(涵盖已披露的参考——如 GLOSSARY.md 这样的同级文件,仍属于技能——直到完全的外部参考,即存在于技能系统之外、任何技能均可指向的文件。)A demanding completion criterion drives thorough legwork — the digging the agent does within the work — whether the skill has steps or not, since "every rule applied" binds flat reference just as "every step done" binds a sequence.
要求严格的完成标准驱动彻底的基础工作——代理在工作中进行的深度挖掘——无论技能是否有步骤,因为"每条规则都已应用"约束扁平参考,正如"每个步骤都已完成"约束序列。
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
向下推得太少,顶层就会臃肿;推得太多,又会把代理真正需要的材料藏起来。这种张力就是整个决策的核心。
Progressive disclosure is the move down the ladder — out of SKILL.md into a linked file — so the top stays legible. Mechanics: a linked .md file in the skill folder, named for what it holds (this skill discloses its full definitions to GLOSSARY.md). Some skills are used in more than one way, and each distinct way is a branch — different runs taking different paths through the skill. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. A context pointer's wording, not its target, decides when and how reliably the agent reaches the material.
渐进式披露是沿阶梯向下移动——从 SKILL.md 移入一个链接文件——以保持顶层可读。机制:在技能文件夹中放一个链接的 .md 文件,以其内容命名(本技能将完整定义披露到 GLOSSARY.md)。有些技能有多种使用方式,每种不同的方式是一个分支——不同的运行在技能中走不同的路径。分支是最清晰的披露测试:内联每个分支都需要的内容,将只有部分分支触及的内容推到指针后面。上下文指针的措辞,而非其目标,决定了代理何时以及多可靠地触达材料。
Where the ladder decides how far down a piece sits, co-location decides what sits beside it once there: keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it.
阶梯决定一段内容放在多深,共置则决定它到了那里之后与什么相邻:将概念的定义、规则和注意事项放在同一标题下,而非分散各处,这样阅读一部分就能连带看到邻近内容。
Granularity is how finely you divide skills, and each cut spends one of the two loads, so split only when the cut earns it. Two cuts:
粒度是你划分技能的精细程度,每次切分都会消耗两种负载之一,因此只有在切分物有所值时才能进行。两种切分方式:
Keep each meaning in a single source of truth: one authoritative place, so changing the behaviour is a one-place edit.
将每个含义保存在单一真相源中:一个权威位置,这样改变行为只需改一处。
Check every line for relevance: does it still bear on what the skill does?
检查每一行的相关性:它是否仍然与技能的功能有关?
Then hunt no-ops sentence by sentence, not just line by line: run the no-op test on each sentence in isolation, and when one fails, delete the whole sentence rather than trim words from it. Be aggressive — most prose that fails should go, not be rewritten.
然后逐句排查无操作,而非仅仅逐行:对每个句子单独进行无操作测试,当某一句未通过时,删除整个句子而非删减其中的词语。要激进——大多数未通过的文句应该直接删掉,而非改写。
A leading word is a compact concept already living in the model's pretraining that the agent thinks with while running the skill (e.g. lesson, fog of war, tracer bullets). Repeated throughout the text (though not necessarily - a strong leading word might only be needed once), it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds.
前导词是已经存在于模型预训练中的紧凑概念,代理在运行技能时用它来思考(例如 lesson、fog of war、tracer bullets)。它在整个文本中重复出现(虽然不一定——一个强前导词可能只需出现一次即可),通过招募模型已有的先验,用最少的 token 积累分布式定义,锚定整个行为区域。
It serves predictability twice. In the body it anchors execution: the agent reaches for the same behaviour every time the word appears. In the description it anchors invocation: when the same word lives in your prompts, docs, and code, the agent links that shared language to the skill and fires it more reliably.
它以两种方式服务于可预测性。在正文中,它锚定执行:代理每次看到该词都会采取相同的行为。在 description 中,它锚定调用:当同一个词出现在你的提示词、文档和代码中时,代理将这种共享语言与技能关联起来,更可靠地触发它。
Hunt for opportunities to refactor skills to use leading words. A triad spelled out at three sites (duplication), a description spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token. Examples include:
寻找机会重构技能以使用前导词。在三处展开的三元组(重复),用一句话指向一个概念的 description——每段都渴望压缩成单个 token。示例包括:
You win twice over: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every skill is carrying restatements that leading words retire — go find them.
你赢得双重收获:更少的 token,以及更锐利的钩子让代理挂住思维。假设每个技能都带着前导词可以淘汰的重述——去找到它们。
Use these to diagnose issues the user may be having with the skill.
用这些来诊断用户在技能使用中可能遇到的问题。