agentleFS
yuan-ai-cloudyuan-ai-cloud/yuanliaofan-harness/skills/makeskill/SKILL.md

makeskill

Skill1 starsChanged 32 days agoApache-2.0View on GitHub

创建新的声明式 skill,并执行归位门槛、触发描述、声明式写法和 500 行/Pattern 2 检查。触发“做个 skill / 固化流程 / 新建技能 / makeskill”。不适用于给既有 skill 加教训(reflect)、重组 harness(harness-groom)、新建 rules 或写 spec/ADR。

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    NEVER 望文生义只取动词——名字叫 releaselog 不代表只更新 release log,用户实际期望可能是「更新工作日志 + 写发布存档 + commit&push」三件套。漏 step 的 skill 触发时会少做事,用户被迫每次手动补全等于白做 skill。

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

创建新 Skill

用法

/makeskill [skill 名称] [一句话描述这个 skill 做什么]

如果用户没有提供完整信息,先确认:

  1. 名称:英文短横线命名(如 drift-check)
  2. 场景:什么时候用?谁会触发?
  3. 来源:是 /reflect 提取的 pattern?还是全新需求?

创建流程

Step -1:归位门槛(先确认该不该立新技能)

过 .claude/rules/harness-write.md §一 归位决策树:已有技能 description 无歧义命中 → 归它不新建;多命中 → 先修边界;无命中 → 挂最近手册技能内部分区,同主题第 3 次出现才立新技能(验证三次再抽)。跨过此门槛才进 Step 0。

Step 0:澄清完整动作链(最容易漏)

创建 skill 前 MUST 问用户:"触发本 skill 时希望按顺序发生哪些完整动作?" 列举所有 step 后再设计 description。

NEVER 望文生义只取动词——名字叫 releaselog 不代表只更新 release log,用户实际期望可能是「更新工作日志 + 写发布存档 + commit&push」三件套。漏 step 的 skill 触发时会少做事,用户被迫每次手动补全等于白做 skill。

✅ 问:"触发 /releaselog 时希望发生什么?"
   答:"① 更新 memory 日志 ② 写 release log entry ③ commit + push"
   → description 反映三件套,触发后一次到位

❌ 直接望文生义
   "releaselog → 写 release log" → 漏掉 commit/push 和 memory 更新
   → 用户每次还要手动补全,skill 价值打折

Step 1:设计 description(最重要)

description 决定了 resolver 能否匹配到这个 skill。质量标准:

  • 前置动作词:第一句说"做什么"(检查/诊断/创建/审查...)
  • 触发场景:什么时候用(编码完成后/发布前/故障时...)
  • 关键词覆盖:用户可能怎么说?把这些词包含进去
  • 不适用转向:写清"不适用于 X → 转 Y",减少误命中
  • 长度/description 标准单一源 → harness-write.md §二.4(≤1024 字符);本 skill 不另立标准
# 好的 description
description: 线上故障诊断与恢复。收到告警、服务不可用、5xx 错误、容器挂了时使用。

# 差的 description
description: 一个用于处理各种线上问题的综合性技能包。

Step 2:写 SKILL.md 内容

声明式原则——告诉 Claude 查什么、标准在哪,不要写具体步骤:

# 好:声明式
## 检查什么
- 是否绕过 @design-system 使用原生 HTML
## 标准来源
以 .claude/rules/frontend.md 为准

# 差:过程式
## Step 1
运行 grep '<button' --include='*.tsx' apps/
## Step 2
过滤掉 design-system 目录...

例外:确定性操作(如 release 的 tsc/docker build 命令)与可执行判据(grep -c 计数 / wc -l 行数等客观检查命令)可以写具体命令——它们不依赖模型判断,是好东西(drift-check / reflect 健康巡检即靠它们)。要避免的是把需要模型判断的检查写成一串 grep-then-filter 过程步骤。

Step 3:决定触发方式

场景frontmatter
Claude 可以自动触发(大多数情况)不加额外字段
只能用户手动触发(部署/发布等高风险操作)disable-model-invocation: true

Step 4:创建文件

.claude/skills/<name>/SKILL.md

Step 5:验证

  • 行数 ≤ 500(超则 Pattern 2 化:SKILL 作导航 + 按 domain 拆引用文件,见 harness-write.md §一⑤)
  • description ≤ 1024 字符,前置动作词,包含触发关键词 + 不适用转向
  • 内容是声明式(查什么 + 标准在哪)而非把模型判断写成过程步骤;客观检查用可执行判据(grep -c / wc)
  • 规则来源指向 CLAUDE.md / rules,skill 本身不定义新规则
  • 如果用了 $ARGUMENTS,说明了参数含义和用法

反模式(NEVER)

  • NEVER 超过 500 行 — 超了先 Pattern 2 化(导航 + 引用文件一级直达),标准单一源 harness-write.md
  • NEVER 在 skill 里定义规则 — 规则属于 CLAUDE.md 或 rules/,skill 只引用
  • NEVER 把需要模型判断的检查写成一串 grep-then-filter 过程步骤 — 让 Claude 自己决定怎么查;但客观计数/行数类可执行判据(grep -c / wc -l)是鼓励的,不在此列
  • NEVER 一个 skill 做两件不相关的事 — 拆成两个,或用 $ARGUMENTS 参数化

现有 skill 作为参考

创建前先看现有 skill 的风格:

  • incident/SKILL.md — 运维知识型(大量领域知识,少量流程)
  • drift-check/SKILL.md — 审计型(列检查项 + 指向规则来源)
  • review/SKILL.md — 参数化型($ARGUMENTS 区分 code/spec 模式)
  • release/SKILL.md — 确定性型(具体命令 + 通过标准)
  • reflect/SKILL.md — 闭环型(提取 → 分类 → 提议 → 确认)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.