write-agentmemory-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
agentmemory skills follow one tiered format so they stay skimmable, accurate, and current. Match it exactly.
agentmemory skills采用分层格式,以便于快速浏览、内容准确且保持更新。请严格遵循该格式。

Directory layout

目录结构

text
plugin/skills/<name>/
  SKILL.md      (required, under 100 lines)
  REFERENCE.md  (optional, dense facts; auto-generate data tables)
  EXAMPLES.md   (optional, worked transcripts)
text
plugin/skills/<name>/
  SKILL.md      (required, under 100 lines)
  REFERENCE.md  (optional, dense facts; auto-generate data tables)
  EXAMPLES.md   (optional, worked transcripts)

SKILL.md rules

SKILL.md 规则

  • Frontmatter:
    name
    ,
    description
    , optional
    argument-hint
    , and
    user-invocable
    . Set
    user-invocable: true
    only for skills the user runs as a slash command; reference and knowledge skills are
    false
    .
  • Description is two sentences and the only thing the agent sees when deciding to load the skill. Sentence one states the capability. Sentence two starts "Use when" and lists concrete triggers. Keep it distinct from sibling skills, under 1024 chars, third person.
  • Body order: Quick start (one concrete example), Why (the governing principle), Workflow (numbered steps with decision gates), Anti-patterns (a WRONG vs RIGHT callout for the top mistake), Checklist, See also (cross-link siblings), Reference or Troubleshooting pointer.
  • Stay under 100 lines. Move dense facts to REFERENCE.md and examples to EXAMPLES.md.
  • Cross-references link one level deep only. Shared recovery steps live in
    ../_shared/TROUBLESHOOTING.md
    , never inlined.
  • 前置元数据:包含
    name
    description
    ,可选
    argument-hint
    user-invocable
    。仅当技能可由用户通过斜杠命令调用时,设置
    user-invocable: true
    ;参考类和知识类技能需设为
    false
  • 描述部分需包含两句话,这是Agent决定是否加载该技能时唯一会查看的内容。第一句说明技能能力,第二句以“Use when”开头,列出具体触发场景。描述需与同类技能区分开,字符数不超过1024,采用第三人称表述。
  • 正文顺序:快速入门(一个具体示例)、设计初衷(核心原则)、工作流程(带决策节点的编号步骤)、反模式(针对常见错误的对错对比说明)、检查清单、相关链接(同类技能交叉引用)、参考或故障排除指引。
  • 内容需控制在100行以内。将密集的事实内容移至REFERENCE.md,示例移至EXAMPLES.md。
  • 交叉引用仅允许链接到一级深度。通用故障恢复步骤需放在
    ../_shared/TROUBLESHOOTING.md
    中,切勿内联到当前文档。

Keep it current

保持内容更新

Facts that exist in source (tool names and parameters, REST endpoints, env vars, connect adapters, hook events) are generated, never hand-typed. Edit the source, then run
npm run skills:gen
. CI runs
npm run skills:check
and fails on drift, so generated tables cannot fall behind the code.
源文件中的事实内容(工具名称与参数、REST端点、环境变量、连接适配器、钩子事件)需通过生成获取,禁止手动编写。编辑源文件后,运行
npm run skills:gen
生成内容。CI会执行
npm run skills:check
,若内容与代码不一致则会失败,确保生成的表格不会落后于代码版本。

Style

风格规范

No external or competitor product names. No emojis. No em-dashes. No filler. State the thing and stop.
禁止提及外部或竞品产品名称。禁止使用表情符号、破折号和冗余内容。直接陈述事实即可。

Checklist

检查清单

  • Description has a "Use when" sentence with real triggers.
  • SKILL.md is under 100 lines.
  • No time-sensitive claims and no duplicated troubleshooting block.
  • Concrete example present; generated facts come from the generator.
  • Cross-links resolve and go one level deep.
  • 描述包含带有真实触发场景的“Use when”语句。
  • SKILL.md内容不超过100行。
  • 无时效性声明,无重复的故障排除模块。
  • 包含具体示例;生成的事实内容来自生成工具。
  • 交叉引用可正常解析且仅为一级深度。