写好Agent Skill的15条
Fifteen rules for agent skills that work
要点
- 先不加 Skill 跑 3 个真实任务,记下代理出错的每一处,这份清单就是 Skill 的内容
- 把 description 当触发器:写全所有“何时使用”,用用户真正会打的词(文件名、报错、工具名),不要在里面概括流程
- 只写能改变行为的内容,并加一个 gotchas 小节;讲清原因,而不是用全大写的 ALWAYS/NEVER
- 每次都必须执行的放 hook,每个任务都需要的放 CLAUDE.md 或 AGENTS.md,介于两者之间的才写成 Skill
- 用约 20 条提示像分类器一样测试触发(一半应触发、一半是近似反例),并与无 Skill 的干净基线对比、每例多跑几次
- 读转录定位问题:没加载就改 description,加载后做错才改正文;每次只改一处,保留留出测试集,模型更新后全部重跑
原帖开头
how to write Agent SKILLS that actually work: 1. watch the agent fail before you write anything (run it on 3 real tasks with no skill, write down everything it gets wrong. that list is your skill, the rest is filler) 2. treat the description as the trigger, not a summary. The a …





