skillkit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseskillkit
skillkit
Authoring skill for a personal skill collection. It turns a rough idea ("I want a skill that does X") into a lean, conventions-compliant in the host collection's skill layout, then hands the user a live-test loop to try it for real. Every skill is authored from scratch, never forked, and follows the conventions inlined below; skillkit exists so you don't re-derive those rules each time.
SKILL.md为个人技能集创作技能。它能将一个粗略的想法(比如“我想要一个能做X的技能”)转化为符合规范的精简版文件,存放在宿主技能集的技能目录结构中,随后为用户提供实时测试循环来实际试用该技能。每个技能都是从零开始创作,而非派生而来,并且遵循下文内嵌的规范;skillkit的存在就是为了让你不必每次都重新推导这些规则。
SKILL.mdInvocation
调用方式
/skillkit输入命令,或者任何表达“创建/创作/搭建一个技能”的自然语言请求。如果用户尚未说明技能的具体功能,先询问清楚。按照以下流程逐步推进,在确定意图、可见性、来源和名称之前,不要跳过步骤直接进入起草阶段。
/skillkitProcedure
流程
1. Gather intent
1. 收集意图
Ask what the skill should do and when it should trigger (the real user phrasings). Optionally ask for example skill links; if given, skim them for structure ideas, which is non-blocking and only worth doing if fetching is available. Capture the job, the trigger conditions, and any hard constraints (tools it needs, things it must not do).
Then check that a new skill is the right shape, because the collection's index is a human's to hold. A skill earns its own directory when a person genuinely wants to choose it: a distinct moment, a distinct decision they'd make deliberately. When the choice is one the agent should make from context instead, it belongs as a mode inside an existing skill, since a mode costs one branch in that skill's description where a new skill costs a permanent entry the user has to remember. Name the existing skill and let the user decide; don't refuse the request.
询问技能的功能以及触发时机(用户实际会使用的表述)。可选择性地询问示例技能链接;如果提供了链接,可快速浏览获取结构思路,这一步非阻塞,仅在可获取链接时进行。记录技能的用途、触发条件以及任何硬性约束(所需工具、禁止事项)。
随后确认新技能是否是合适的形式,因为技能集的索引由用户掌控。当用户确实希望主动选择某个技能时,它才值得拥有独立目录:这是一个明确的时刻,是用户会刻意做出的明确决策。如果该选择应该由Agent根据上下文自动做出,那么它应该作为现有技能中的一个模式存在,因为模式仅在该技能的描述中占用一个分支,而新技能会增加一个用户必须记住的永久条目。告知用户现有技能的名称并让其决定;不要拒绝请求。
2. Visibility (internal or public?)
2. 可见性(内部还是公开?)
Ask whether this is an internal repo-only skill or a public publishable one, because it changes the rules for everything downstream.
- internal: a maintenance/meta skill for the host repo. Repo coupling is fine, so it may reference the repo's conventions doc, build tooling, and use repo-relative links. Stamp . skills.sh hides it from discovery.
metadata.internal: true - public: a shareable skill. It must follow Portability below and stamp . It gets discovered and listed on skills.sh automatically once pushed to a public collection repo.
metadata.internal: false
询问该技能是内部仅仓库可见的技能,还是公开可发布的技能,因为这会影响后续所有规则。
- 内部:宿主仓库的维护/元技能。可以与仓库耦合,可引用仓库的规范文档、构建工具,并使用仓库相对链接。标记。skills.sh会将其隐藏,不对外展示。
metadata.internal: true - 公开:可共享的技能。必须遵循下文的可移植性要求,并标记。推送到公开技能集仓库后,会自动在skills.sh上被发现并列出。
metadata.internal: false
3. Provenance (original vs. "my version of")
3. 来源(原创还是“我的定制版本”?)
Ask: is this original, or your version of an upstream skill? Either way it's authored from scratch here; the answer just informs how much you lean on the upstream for structure ideas (Gather intent).
询问:该技能是原创,还是基于上游技能的定制版本?无论哪种情况,都将从零开始创作;答案仅会影响你参考上游技能结构思路的程度(见收集意图)。
4. Propose names
4. 提议名称
Follow the host collection's naming convention when it has one. Otherwise suggest 3–5 names and recommend one: one lowercase word, the functional term leads so it stays searchable (people search , not ), appended, and shorten an awkward root rather than force a clumsy join ( → , not ). Avoid collisions with well-known tools (, , anything already popular): when network access exists, search the candidate on the web and in the skills.sh directory; when offline, state that the popularity check was skipped. Let the user pick. The chosen name must equal the directory name.
kitcommitkitkithumanizehumankithumanizekitspeckitshipkit如果宿主技能集有命名规范,遵循该规范。否则建议3-5个名称并推荐一个:单个小写单词,以功能术语开头确保可搜索性(人们会搜索而非),后缀为,若词根过长则适当缩短而非生硬拼接(例如→,而非)。避免与知名工具重名(如、或其他已流行的工具):若有网络访问权限,在网页和skills.sh目录中搜索候选名称;若离线,需说明已跳过流行度检查。让用户选择。最终选定的名称必须与目录名称一致。
kitcommitkitkithumanizehumankithumanizekitspeckitshipkit5. Draft
5. 起草
Create the skill in the host collection's documented layout from the Frontmatter template below, applying the Quality bar, and stamp from Visibility. In a collection repo this is commonly ; standalone, use the agent's discovered skills directory such as . Keep it lean, and prefer one file.
metadata.internalskills/<name>/SKILL.md.claude/skills/<name>/SKILL.md- If public, apply the Portability checklist below as a hard gate: the skill must stand alone once installed.
根据下文的Frontmatter模板,按照宿主技能集的文档目录结构创建技能,同时遵循质量标准,并根据可见性标记。在技能集仓库中,通常路径为;若为独立使用,存放在Agent已发现的技能目录中,例如。保持精简,优先使用单个文件。
metadata.internalskills/<name>/SKILL.md.claude/skills/<name>/SKILL.md- 如果是公开技能,需严格遵循可移植性检查清单:技能安装后必须能够独立运行。
6. Review loop
6. 审核循环
Show the draft. Take edits and iterate until the user explicitly approves. Don't proceed to testing on a draft the user hasn't signed off.
展示草稿。接受修改并迭代,直到用户明确批准。用户未确认的草稿不得进入测试阶段。
7. Live test
7. 实时测试
Don't install the skill yourself. Hand the user the commands to drive the live trial. If the collection provides dev-link tooling (check its README or Makefile for a link/unlink target), tell them to inject the skill with that; otherwise have them symlink or copy into their agent's skills directory (e.g. ). Then test in a fresh session, because the skill list loads at startup, so a running session won't see the new skill. No scratch test-plan file; testing here is done live and directly. Suggest they exercise it against reality:
skills/<name>~/.claude/skills/<name>- fire it with a few varied, realistic phrasings that should trigger it, plus a near-miss or two that should not (guards against overtriggering);
- confirm the real run follows the drafted procedure end to end and produces the artifact or outcome the skill promises;
- settle any line you suspect is a no-op by running it, not by arguing. A no-op is an instruction the model already obeys by default, so the test is model-relative: delete the suspect line, run the same phrasing again, and keep the line only when the behavior changes.
When done testing, they remove the dev link the same way it was added (the collection's unlink command, or deleting the symlink/copy).
不要自行安装技能。告知用户驱动实时测试的命令。如果技能集提供了开发链接工具(查看其README或Makefile中的link/unlink目标),告知用户使用该工具注入技能;否则让用户将符号链接或复制到Agent的技能目录中(例如)。然后在全新会话中进行测试,因为技能列表在启动时加载,运行中的会话无法识别新技能。无需创建测试计划文件;测试需直接实时进行。建议用户结合实际场景测试:
skills/<name>~/.claude/skills/<name>- 使用多种不同的、符合真实触发场景的表述来启动技能,同时使用一两个接近但不应触发的表述(防止过度触发);
- 确认实际运行完全遵循起草的流程,并生成技能承诺的产物或结果;
- 通过运行来验证任何疑似**无操作(no-op)**的步骤,而非争论。无操作指的是模型默认已遵循的指令,因此测试需基于模型:删除疑似无操作的行,再次运行相同表述,仅当行为发生变化时才保留该行。
测试完成后,用户需按添加时的方式移除开发链接(使用技能集的unlink命令,或删除符号链接/复制的文件)。
8. Hand off
8. 交付
Write this section in the procedural register: one instruction per sentence, active voice, present tense, no metaphor.
First finish the mechanical tail: run the collection's skill lint if it has one (fix errors and address warnings; without one, self-check against the Conventions, Quality bar, and, for public skills, Portability), and update whatever the collection uses to list its skills (typically a README skills table, and a directory-grouping file if the repo has one). Then close:
skills.sh.jsonWhat changed. Report the skill created (name, visibility, file count), the listing surfaces updated, and the lint or self-check result.
Where it landed. Give the skill's directory path, and whether a dev link from Live test is still in place (it should be removed by now; say so if it isn't).
Next. The work is uncommitted, so the move is to commit it: suggest a conventional message (e.g. ) for the user to run. Never commit automatically, because committing is the user's call.
feat(<name>): add <name> skill本节采用流程式写法:每句一个指令,主动语态,现在时态,无比喻。
首先完成收尾工作:如果技能集有技能检查工具(lint),运行该工具(修复错误并处理警告;若无该工具,自行对照规范、质量标准以及公开技能的可移植性要求进行检查),并更新技能集用于列出技能的内容(通常是README中的技能表格,若仓库有目录分组文件也需更新)。然后进行收尾说明:
skills.sh.json变更内容:报告创建的技能(名称、可见性、文件数量)、更新的列表展示渠道,以及检查或自检结果。
存放位置:提供技能的目录路径,并说明实时测试中的开发链接是否仍存在(此时应已移除;若未移除需告知用户)。
下一步操作:当前工作尚未提交,因此下一步是提交代码:建议用户使用符合规范的提交信息(例如)。切勿自动提交,因为提交是用户的决策。
feat(<name>): add <name> skillConventions
规范
Frontmatter template
Frontmatter模板
yaml
---
name: <matches directory>
description: >-
<what it does>. Use when <explicit English trigger>.
license: MIT
allowed-tools: <only if the skill needs a restricted set>
metadata:
internal: true # true = repo-only meta skill; false = public/publishable
---yaml
---
name: <matches directory>
description: >-
<what it does>. Use when <explicit English trigger>.
license: MIT
allowed-tools: <only if the skill needs a restricted set>
metadata:
internal: true # true = repo-only meta skill; false = public/publishable
---Information hierarchy
信息层级
A skill is built from steps (the ordered actions the agent performs) and reference (definitions, rules, and facts consulted on demand). The two mix freely: all steps, all reference, or both. What you decide for each piece is where it sits on a ladder ranked by how immediately the agent needs it. An in-file step is the primary tier; in-file reference is consulted on demand, and a flat peer-set of rules on one rung is a fine arrangement rather than a smell; disclosed reference is pushed into a satellite file inside the skill's own directory and loaded only when its pointer fires.
Disclose by branch, not by size. Inline what every branch needs, and push behind a pointer what only some branches reach, where a mode-filtered catalog that each run reads a third of is the clean case. Push too much down and you hide material the agent needs; push too little and the top bloats. Neither direction is the safe default.
Co-locate a concept: keep a definition, its rules, and its caveats under one heading rather than scattered through the file. Scattering is not duplication, since duplication repeats one meaning in two places while scattering fragments one meaning across many, and it fails differently, because the agent reads one part and never meets the rest.
Sprawl is the failure mode: a skill simply too long, even when every line is live and unique. Attention thins across the excess. The cure is the ladder, not a trim pass.
技能由步骤(Agent执行的有序操作)和参考内容(按需查阅的定义、规则和事实)构成。两者可自由混合:全步骤、全参考内容或两者结合。每部分的定位取决于Agent对其的即时需求程度。文件内步骤是首要层级;文件内参考内容按需查阅,同级规则采用扁平排列即可,无需刻意分层;外部参考内容需放入技能目录内的附属文件中,仅在需要时加载。
按分支拆分,而非按大小拆分。将所有分支都需要的内容内联,仅将部分分支需要的内容放入外部链接后,例如每个运行仅读取三分之一的模式过滤目录就是清晰的案例。拆分过多会隐藏Agent需要的内容;拆分过少会导致顶部内容臃肿。两种方向都不是安全的默认选择。
概念集中存放:将定义、规则和注意事项放在同一标题下,而非分散在文件各处。分散并非重复,重复是同一含义出现在两处,而分散是同一含义碎片化到多处,会导致Agent仅读取部分内容而错过其他部分。
内容冗长是失败模式:即使每一行都是有用且唯一的,技能内容过长也会导致注意力分散。解决方法是使用信息层级,而非简单删减内容。
Completion criteria
完成标准
Every step ends on a completion criterion, the condition that tells the agent the work is done. A step without one ends when the agent feels finished, which is the largest single source of run-to-run variance. Two properties make it a lever. Clarity: can the agent tell done from not-done? A vague bound ("understanding reached", "keep it lean") invites premature completion, where the step ends early because attention has already slipped to the steps still visible ahead of it. Demand: how much the wording requires. "Every modified model accounted for" forces real digging where "produce a change list" does not, so prefer the exhaustive form to the productive one. Demand is not step-bound; "every rule applied" binds a body of flat reference the same way, which is how an all-reference skill still carries a bar. The strongest criteria are both checkable and exhaustive.
Sharpen a rushed step's bound first, because that edit is local and cheap. Split the sequence only when the bound is irreducibly fuzzy and you have watched the rush happen, and note that splitting works only across a real context boundary, meaning a hand-off document or a subagent dispatch. An inline call leaves the later steps in context and hides nothing.
每个步骤都要有完成标准,即告知Agent工作已完成的条件。没有完成标准的步骤会在Agent感觉完成时结束,这是导致运行结果不一致的最大原因。完成标准有两个关键特性。清晰性:Agent能否区分已完成和未完成?模糊的边界(如“达成理解”、“保持精简”)会导致提前完成,即由于注意力已转移到后续步骤,而提前结束当前步骤。要求程度:表述的严格程度。“所有修改的模型都已记录”会促使Agent深入挖掘,而“生成变更列表”则不会,因此优先使用穷尽式表述而非产出式表述。要求程度不限于步骤:“所有规则已应用”同样适用于扁平的参考内容,这也是纯参考内容的技能仍有质量标准的原因。最有效的完成标准既可检查又穷尽。
首先优化仓促步骤的边界,因为这种修改是局部且低成本的。仅当边界模糊且确实观察到仓促完成的情况时,才拆分步骤序列,并且拆分必须基于真实的上下文边界,例如交付文档或子Agent调度。内联调用会保留后续步骤的上下文,不会隐藏任何内容。
Prose formatting
文本格式
No hard wrapping. Write each paragraph and list item as one continuous line; let the editor and renderer soft-wrap. Fixed-width line breaks mid-sentence buy nothing, because the agent reads the text regardless of newlines, and every Markdown renderer soft-wraps anyway. Keep line structure only where it is meaningful: code fences, tables, and YAML frontmatter (a folded scalar is fine).
description: >-不要硬换行。每个段落和列表项写成连续的一行;让编辑器和渲染器自动软换行。句子中间的固定宽度换行毫无意义,因为Agent会忽略换行读取文本,且所有Markdown渲染器都会自动软换行。仅在有意义的地方保留换行结构:代码块、表格和YAML Frontmatter(折叠的标量格式是允许的)。
description: >-Prose register
文本语体
A skill writes for two different readers, and they need opposite prose. Text a skill writes back to its own operator (QA steps, handoff documents, status snapshots, sections, next-move lines, preview-and-confirm lines) is procedural: write it in ASD-STE100 Simplified Technical English. One instruction per sentence. Procedural sentences 20 words or fewer, descriptive sentences 25 or fewer. Active voice, present tense, name the actor. No metaphor, idiom, or second meaning. Pick one term per concept and keep it within a single document; the rule never reaches across documents. Text a person reads to form an opinion (plan context, research recommendations, ADR rationale, review verdicts) is explanatory and keeps uneven rhythm and a stated position; do not apply STE to it. Machine-read or format-bound text is exempt: commit subjects, issue titles, prompts, design tokens, code, paths, commands, and quoted source. Content the skill produces for a third-party audience is out of scope entirely, including project documentation, published prose, and UI copy, because that is production writing for readers outside the session and needs room to explain a concept. Precedence: an explicit user instruction, then the target repository's documented convention, then the register. Inline this rule in a public skill rather than linking it.
Hand off技能面向两种不同的读者,需要使用相反的语体。技能写给自身操作者的文本(QA步骤、交付文档、状态快照、交付部分、下一步操作提示、预览确认提示)采用流程式写法:遵循ASD-STE100简化技术英语。每句一个指令。流程式句子不超过20个单词,描述性句子不超过25个单词。主动语态,现在时态,明确执行者。无比喻、习语或双重含义。每个概念在单个文档中使用唯一术语;该规则不适用于跨文档场景。用户用于形成观点的文本(计划背景、研究建议、ADR依据、审核结论)采用解释性写法,可保留多变的节奏和明确的立场;不要对这类文本应用STE规范。机器读取或格式绑定的文本除外:提交主题、问题标题、提示词、设计标记、代码、路径、命令和引用的源内容。技能为第三方受众生成的内容完全不在范围内,包括项目文档、发布的文章和UI文案,因为这些是面向会话外读者的生产性写作,需要空间来解释概念。优先级:明确的用户指令优先,其次是目标仓库的文档规范,最后是语体规范。在公开技能中内嵌此规则,而非链接到外部文档。
Documentation artifact naming
文档产物命名
When a skill creates a durable Markdown artifact under , follow the host collection's convention when it has one. Otherwise use : a lowercase type prefix, a short lowercase kebab-case subject slug, and the artifact's ISO creation date at the end (for example, ). Keep that creation date stable when the file is edited. Update the same artifact in place; for a genuine same-day collision, make the slug more specific and only then insert a sequence immediately before the date (). ADRs retain their sequence as . Multi-file artifacts put the convention on their bundle directory, such as , while structural child names remain fixed. Inline the applicable rule in every public skill that creates such an artifact so the installed skill remains self-contained.
docs/<type>-<slug>-YYYY-MM-DD.mddocs/plans/plan-sso-login-2026-07-23.mdresearch-auth-providers-02-2026-07-23.mddocs/adr/adr-NNNN-<slug>-YYYY-MM-DD.mddocs/verify/verify-<slug>-YYYY-MM-DD/当技能在目录下创建持久化Markdown产物时,若宿主技能集有规范则遵循该规范。否则使用格式:小写类型前缀、简短的小写短横线分隔主题标识(slug),以及产物的ISO创建日期(例如)。文件编辑时保留创建日期不变。在原地更新同一产物;若当天确实出现命名冲突,先细化标识,必要时在日期前添加序号(例如)。ADR保留序号格式为。多文件产物将规范应用于其目录名称,例如,而子文件名称保持固定。在每个创建此类产物的公开技能中内嵌适用规则,确保安装后的技能保持独立。
docs/<type>-<slug>-YYYY-MM-DD.mddocs/plans/plan-sso-login-2026-07-23.mdresearch-auth-providers-02-2026-07-23.mddocs/adr/adr-NNNN-<slug>-YYYY-MM-DD.mddocs/verify/verify-<slug>-YYYY-MM-DD/Cross-referencing steps
步骤交叉引用
Never reference a step by its number (a bare "see step N" citation). A bare number binds to a step's position, so inserting or reordering steps silently makes it point at the wrong one. Reference the step's identity instead: for a step with a heading, link to it by name with a GitHub anchor (, since GitHub builds the anchor from the full heading text by lowercasing it, dropping punctuation, and turning spaces into hyphens); for a list item with no heading, name the action in prose rather than citing its ordinal.
[Gather intent](#1-gather-intent)切勿通过编号引用步骤(如仅写“参见步骤N”)。仅用编号会绑定到步骤的位置,插入或重新排序步骤会导致引用指向错误的步骤。应引用步骤的标识:对于有标题的步骤,使用GitHub锚点链接到其名称(例如,因为GitHub会将完整标题文本转换为小写、去除标点并将空格替换为短横线来生成锚点);对于无标题的列表项,用文本描述操作而非引用序号。
[Gather intent](#1-gather-intent)Closing hand-off
收尾交付
Every skill ends by reporting what it did and naming what comes next, in a closing section titled (or inside a numbered procedure; a mode-per-section skill gets one per mode). A skill that goes quiet at the end leaves the user to reconstruct what changed on disk and what the next move is, which is exactly the work skills exist to remove. Three beats, in order. What changed: the mutations, concretely, including the ones that didn't happen. Where it landed: paths, branches, URLs, so nothing has to be hunted for. Next: the single best move, crowned, not a menu of equals. Route, don't launch: name the follow-up and its one-line invocation without invoking it, name a sibling skill only when it's installed, and always give the plain fallback ("open a PR with a PR skill, otherwise "). A terminal skill says plainly there is no next step rather than inventing one; a read-only skill may drop a genuinely empty beat, never pad it.
## Hand off### N. Hand offgh pr create每个技能都要以报告已完成的工作和说明下一步操作结束,收尾部分标题为(或在编号流程中为;按模式分节的技能每个模式对应一个收尾部分)。技能结束时静默不语会让用户自行梳理磁盘上的变更和下一步操作,而这正是技能要解决的问题。需包含三个要点,按顺序排列:变更内容:具体的修改,包括未执行的操作;存放位置:路径、分支、URL,无需用户查找;下一步操作:最佳的单一操作,而非等同的选项菜单。引导而非启动:说明后续操作及其单行调用方式但不执行,仅当兄弟技能已安装时才提及,始终提供简单的备选方案(例如“使用PR技能创建PR,否则执行”)。终结性技能需明确说明没有下一步操作,而非编造;只读技能可省略该部分,切勿填充内容。
## Hand off### N. Hand offgh pr createQuality bar
质量标准
Apply these while drafting; they are the difference between a skill that triggers and reads well and one that doesn't:
- Front-load the leading word. A leading word is the compact term that names what the skill does, and the first words of and
namedo the invocation work, so put it there. It works twice over when it's a word the model already knows (description,commit,review,slop): a pretrained word anchors a region of behavior for free, where a coined one charges you definition tokens for the same anchor. Repeat it as a token through the body; never restate it as a sentence.ledger - "Use when" trigger. The starts with what it does, then a plain-English "Use when …" clause, phrased slightly pushy to fight undertriggering (name the phrasings/commands that should fire it). A description is a context pointer, and it loads on every turn whether or not the skill fires, so spend it on one trigger per branch, not per synonym: cover every mode, and collapse the phrasings that rename a single one. Cut identity the body already carries, because a pointer says what the material is and when to reach it, never the skill's rules or scope disclaimers. Prune synonyms, never coverage; a branch with no trigger silently never fires.
description - Skills are for what the model can't already do. A skill only fires for tasks the base model can't handle directly. If the guidance is obvious, it won't trigger no matter how you word it.
- Stay lean; disclose by branch. Prefer one , and apply Information hierarchy: inline what every branch needs, push into a satellite file inside the skill's own directory what only some branches reach, and co-locate each concept under one heading. Watch for sprawl, which a trim pass can't fix.
SKILL.md - Every step ends on a completion criterion, per Completion criteria. Write the bound so the agent can tell done from not-done, and prefer the exhaustive form ("every X accounted for") to the productive one ("produce a list of X"). A step that ends on a feeling is where run-to-run variance comes from.
- Intent over incantation. A skill says what to accomplish and why, and lets the agent work out the exact invocation. Pin an exact command only when it's a stable public contract (,
git commit,gh pr create,grep) where re-deriving it every run just burns tokens and invites variance, and even then, make it self-correcting ("runjq; if a flag is rejected, checkgh pr create …"). Never hardcode a volatile or vendor tool's syntax, and never encode a tool's internal behavior as if it were contract (output-format parsing, help-text scraping, default-shape assumptions), because that's the brittle stuff that breaks on a tool update; describe the goal and let the agent read the docs. The failure mode to avoid on both ends: pinning brittle syntax that breaks loudly, or over-abstracting a frozen command into "figure it out" that taxes every run quietly.gh pr create --help - One meaning, one place. No duplication. For internal skills, point to the host repo's conventions doc instead of restating it; for public skills, inline what they need (see Portability). The environment is a source of truth too (scripts, a
package.json, a config file,Makefileoutput), so a skill that restates one is a cache, and a cache earns its load only when the lookup is expensive. Cache the unwritten convention and the reason behind a choice; leave the one-command lookups where they cannot go stale.--help - Prompt the positive. Steering by prohibition drags the forbidden behavior into context and makes it more available, not less. State the target behavior instead ("write one-line comments" beats "don't write long comments"). A prohibition earns its place only as a hard guardrail you cannot phrase positively, and even then it gets a positive target beside it.
- Prune no-ops. A no-op is an instruction the model already obeys by default, paying load to say nothing. The test is model-relative rather than reader-relative: two people disagreeing about a no-op disagree about the default, so settle it by running the skill during Live test, not by arguing. Delete the whole sentence rather than trimming its words. Explain the why behind a rule when it isn't obvious.
- No hard-wrapping, per Prose formatting.
- Classify the output's register, per Prose register. Text the skill writes back to its operator is procedural and follows STE; text a reader weighs an opinion against is explanatory; content produced for a third-party audience is out of scope and keeps its own standards. Getting this wrong flattens a verdict or bloats a runbook.
- Close with a hand-off. End on a section per Closing hand-off: what changed, where it landed, one crowned next move, written in the procedural register.
Hand off - Durable docs artifacts. When the skill writes Markdown under , apply Documentation artifact naming and inline the applicable convention in a public skill.
docs/ - kit naming + frontmatter. Obey the naming rules in Propose names and the Frontmatter template exactly; must match the directory; declare
name.metadata.internal
起草时需遵循以下标准,这是技能触发和可读性优劣的关键:
- 前置核心词汇:核心词汇是概括技能功能的简洁术语,和
name的开头词汇用于触发技能,因此需将核心词汇放在开头。如果核心词汇是模型已熟知的单词(如description、commit、review、slop),效果会加倍:预训练词汇可免费锚定行为区域,而自创词汇则需要消耗定义令牌来实现相同的锚定效果。在正文中重复使用该词汇作为令牌;切勿用句子重述。ledger - “Use when”触发条件:先说明功能,然后是直白的“Use when …”条款,表述略带主动性以避免触发不足(明确应触发技能的表述/命令)。描述是上下文指针,无论技能是否触发,每次都会加载,因此需为每个分支设置一个触发条件,而非每个同义词:覆盖所有模式,合并表述不同但模式相同的情况。删除正文中已包含的身份信息,因为指针只需说明内容是什么以及何时调用,无需包含技能的规则或范围声明。精简同义词,但不要遗漏覆盖范围;没有触发条件的分支将永远不会被触发。
description - 技能用于模型无法直接完成的任务:技能仅在基础模型无法直接处理的任务时触发。如果指导内容显而易见,无论如何措辞都不会触发技能。
- 保持精简;按分支拆分:优先使用单个文件,并遵循信息层级:将所有分支需要的内容内联,仅将部分分支需要的内容放入技能目录内的附属文件,每个概念集中存放在同一标题下。注意避免内容冗长,这无法通过简单删减解决。
SKILL.md - 每个步骤都要有完成标准,见完成标准。编写清晰的边界,让Agent能区分已完成和未完成,优先使用穷尽式表述(如“所有X已记录”)而非产出式表述(如“生成X的列表”)。凭感觉结束的步骤会导致运行结果不一致。
- 意图优先于咒语:技能说明要完成什么以及原因,让Agent自行确定具体的调用方式。仅当命令是稳定的公开契约时(如、
git commit、gh pr create、grep),才固定具体命令,因为每次重新推导会消耗令牌并导致结果不一致,即使如此,也要使其具备自修正能力(例如“运行jq;如果标志被拒绝,查看gh pr create …”)。切勿硬编码易变或厂商工具的语法,切勿将工具的内部行为编码为契约(如输出格式解析、帮助文本抓取、默认格式假设),因为这些内容在工具更新时容易失效;描述目标并让Agent查阅文档。需避免两种失败模式:固定易失效的语法导致崩溃,或过度抽象固定命令为“自行解决”导致每次运行都消耗资源。gh pr create --help - 一个含义,一个位置:不要重复。对于内部技能,指向宿主仓库的规范文档而非重述;对于公开技能,内嵌所需内容(见可移植性)。环境也是事实来源(如脚本、
package.json、配置文件、Makefile输出),因此重述这些内容的技能相当于缓存,只有当查找成本很高时才值得缓存。缓存未成文的规范和选择背后的原因;将只需一次命令查找的内容保留在原地,避免过时。--help - 正向引导:通过禁止来引导会将禁止的行为带入上下文,使其更易被触发,而非更少。应说明目标行为(如“编写单行注释”优于“不要写长注释”)。仅当无法正向表述的硬性规则时才使用禁止,且需同时提供正向目标。
- 精简无操作内容:无操作指的是模型默认已遵循的指令,加载此类内容毫无意义。测试需基于模型而非读者:两人对无操作的分歧实际上是对默认行为的分歧,因此需在实时测试中运行技能来解决,而非争论。删除整句而非删减单词。当规则的原因不明显时,解释其背后的原因。
- 不要硬换行,见文本格式。
- 分类输出语体,见文本语体。技能写给操作者的文本采用流程式写法并遵循STE规范;用户用于形成观点的文本采用解释性写法;为第三方受众生成的内容不在范围内,遵循其自身标准。语体错误会削弱结论或使手册臃肿。
- 以交付收尾,按收尾交付的要求添加部分:变更内容、存放位置、一个最佳下一步操作,采用流程式写法。
Hand off - 持久化文档产物:当技能在下写入Markdown时,遵循文档产物命名规范,并在公开技能中内嵌适用规则。
docs/ - kit命名 + Frontmatter:严格遵循提议名称中的命名规则和Frontmatter模板;必须与目录名称一致;声明
name。metadata.internal
Portability (public skills only)
可移植性(仅公开技能)
A public skill is installed on its own into arbitrary environments. Only its own directory travels, so it must stand alone:
- Self-contained. Inline the conventions it relies on. No repo-relative links (), and no hard dependency on the host repo's Makefile, conventions doc, or helper tooling. If it needs a helper script, bundle it inside the skill's own directory.
../… - Machine/OS-agnostic. No absolute paths, no platform-specific assumptions; prefer instructions that work on any shell or none.
- Environment-degrading output. When a filesystem and shell are available, write/edit files directly; when they aren't (e.g. a browser-based agent), print the finished artifact as a codeblock for the user to save, and skip repo-only steps like dev-linking and linting.
Internal skills are exempt, because they live and die in their repo and may use its machinery freely.
公开技能会独立安装到任意环境中。仅其自身目录会被迁移,因此必须能够独立运行:
- 独立完整:内嵌所需的规范。不要使用仓库相对链接(),不要依赖宿主仓库的Makefile、规范文档或辅助工具。如果需要辅助脚本,将其打包在技能自身目录中。
../… - 跨机器/操作系统兼容:不要使用绝对路径,不要假设特定平台;优先使用适用于任何Shell或无需Shell的指令。
- 适配环境的输出:当有文件系统和Shell可用时,直接写入/编辑文件;当不可用时(如基于浏览器的Agent),将最终产物以代码块形式打印供用户保存,并跳过仅仓库可用的步骤,如开发链接和检查。
内部技能不受此限制,因为它们仅存在于宿主仓库中,可自由使用仓库的工具。
Notes
说明
- skillkit itself is public (). Inside its home collection it can lean on the repo's link/lint tooling, but everything it needs to author a skill is inlined here, so it works standalone wherever it's installed.
metadata.internal: false - Add scripts or satellite files to a new skill only when it genuinely needs one, never speculatively. Per-skill scripts live in the skill's own directory, not in any repo-root location.
- skillkit本身是公开的()。在其宿主技能集中可依赖仓库的链接/检查工具,但创作技能所需的所有内容都已内嵌在此文档中,因此无论安装在何处都能独立运行。
metadata.internal: false - 仅当新技能确实需要时才添加脚本或附属文件,切勿投机添加。每个技能的脚本存放在技能自身目录中,而非仓库根目录的任何位置。