skill-maker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill maker

Skill 制作器

Paths:
${CLAUDE_SKILL_DIR}
means the folder containing this SKILL.md, and
${CLAUDE_PLUGIN_ROOT}
the plugin folder two levels above it.
Every question to the user goes in the question box: call the AskUserQuestion tool (2-4 options, the recommended one first). Only in an agent without that tool, ask numbered questions in text.
The process follows Anthropic's public skill-creator and its skill-authoring best practices, cut down for video skills.
M="${CLAUDE_SKILL_DIR}/scripts/skill_maker.py"
. Run it with
python3
on Mac and Linux,
py
on Windows.
Copy this checklist and tick it off:
- [ ] 1. Interview done
- [ ] 2. Task run once without a skill, failures noted
- [ ] 3. Three scenarios in evals/evals.json
- [ ] 4. SKILL.md drafted, `check` passes
- [ ] 5. Saved and shown to the user
- [ ] 6. Tested in a fresh agent, pass/fail reported
- [ ] 7. Improved with the user
- [ ] 8. Offered as a style; skill-improver named for later notes
路径:
${CLAUDE_SKILL_DIR}
表示包含此 SKILL.md 的文件夹,
${CLAUDE_PLUGIN_ROOT}
表示其上两级的插件文件夹。
向用户提出的每个问题都要放在问题框中:调用 AskUserQuestion 工具(2–4 个选项,首选推荐项)。只有在没有该工具的 Agent 中,才用文本提出编号问题。
该流程遵循 Anthropic 公开的 skill-creator 及其 Skill 编写最佳实践,并针对视频 Skill 进行了精简。
M="${CLAUDE_SKILL_DIR}/scripts/skill_maker.py"
。在 Mac 和 Linux 上使用
python3
运行,在 Windows 上使用
py
。
复制此清单并逐项勾选:
- [ ] 1. 访谈完成
- [ ] 2. 在没有 Skill 的情况下运行任务一次,并记录失败情况
- [ ] 3. 在 evals/evals.json 中准备三个场景
- [ ] 4. 完成 SKILL.md 草稿,且 `check` 通过
- [ ] 5. 已保存并向用户展示
- [ ] 6. 在全新的 Agent 中测试,并报告通过或失败
- [ ] 7. 与用户共同完成改进
- [ ] 8. 提供为 style;说明后续笔记可使用 skill-improver

1. Interview

1. 访谈

If this chat already shows the workflow ("turn this into a skill"), take the steps, tools and the user's corrections from it and only ask for the gaps. From the Skills page ("Make a new skill",
JOB skill-new text=...
), the text answers question 1; report each checklist step with
home.py status skill-new --step "..."
(
start/references/home.md
). Otherwise ask, one question box at a time:
  1. What it does:
    Edits a whole video in a look (Recommended)
    /
    Adds one kind of visual
    /
    Cuts or tightens
    /
    Something else
    .
  2. An example: a video in the library (
    edits/<name>/
    ), a file path, or a link to a video in the look they want.
  3. What good looks like: two or three things they would check on the result ("captions never cover my face").
  4. The name: offer two short hyphenated names from their words (
    caption-pop
    ,
    quick-cuts
    ).
如果当前对话已经展示过该流程(“turn this into a skill”),则从中整理步骤、工具和用户的修正,只询问缺失的信息。如果内容来自 Skills 页面(“Make a new skill”,
JOB skill-new text=...
),则文本内容就是问题 1 的回答;使用
home.py status skill-new --step "..."
报告每个清单步骤的完成情况(
start/references/home.md
)。否则,每次使用一个问题框,依次询问:
  1. 功能:
    一次性编辑完整视频(推荐)
    /
    添加某一种视觉效果
    /
    剪切或精简内容
    /
    其他
    。
  2. 示例:媒体库中的视频(
    edits/<name>/
    )、文件路径,或指向所需风格视频的链接。
  3. 什么算效果好:用户会检查成品的两三项标准(“字幕绝不遮住我的脸”)。
  4. 名称:根据用户提供的词,给出两个简短、使用连字符的名称(
    caption-pop
    、
    quick-cuts
    )。

2. Run it once without a skill

2. 不使用 Skill 运行一次

Do the task on the example the plain way, without writing a skill. Note each place you guessed, asked, or got it wrong, and anything the user corrected. These notes are what the skill must say; skip what you already did right.
直接按普通方式对示例执行任务,不编写 Skill。记录所有猜测、提问、出错以及用户纠正的地方。这些记录正是 Skill 必须写明的内容;已经做对的部分可以省略。

3. Write three scenarios

3. 编写三个场景

bash
python3 "$M" new <name>
That makes
<skills folder>/<name>/SKILL.md
(a template) and
evals/evals.json
. Fill the evals first, one ordinary request, one edge case, one where the skill should not do something:
json
[{"query": "make my captions pop on edits/demo", "files": ["edits/demo/cut.mp4"],
  "expected_behavior": ["Reads the user's taste first", "Key word of each caption in yellow", "Nothing outside the safe zone", "Render on the review page"]}]
bash
python3 "$M" new <name>
该命令会创建
<skills folder>/<name>/SKILL.md
(模板)和
evals/evals.json
。先填写 evals:一个普通请求、一个边界情况,以及一个 Skill 不应执行某项操作的场景:
json
[{"query": "make my captions pop on edits/demo", "files": ["edits/demo/cut.mp4"],
  "expected_behavior": ["Reads the user's taste first", "Key word of each caption in yellow", "Nothing outside the safe zone", "Render on the review page"]}]

4. Draft the SKILL.md

4. 起草 SKILL.md

Write it from step 2's notes. Read
references/cooked-hooks.md
for where the edit's files are, how to hand a render to the review page, the safe zone and how to reuse the editor's renderer. Rules:
  • name
    : lowercase, digits and hyphens, at most 64, no "claude" or "anthropic", same as the folder.
  • description
    : third person, what it does then "Use when the user says ..." with their own phrases, at most 1024 characters. Name video, edit, reel or clip in the first sentence so cooked.'s style list shows it.
  • Body: only what Claude would not know already, a copyable checklist, a check step with the fix (check, fix, check again), one real example. Under 500 lines; longer detail in
    references/<topic>.md
    , linked from SKILL.md, one level deep. A step that is the same every time is a script in
    scripts/
    : write "Run X".
  • End with an empty
    ## Learned rules
    section (skill-improver fills it).
Then check it and fix every FAIL:
bash
python3 "$M" check <skills folder>/<name>
根据第 2 步的记录起草文档。阅读
references/cooked-hooks.md
,了解编辑文件所在位置、如何将渲染结果交给审阅页面、安全区,以及如何复用编辑器的渲染器。规则如下:
  • name
    :使用小写字母、数字和连字符,最多 64 个字符,不包含“claude”或“anthropic”,并且与文件夹同名。
  • description
    :使用第三人称,先说明功能,然后写
    Use when the user says ...
    并附上用户自己的说法,最多 1024 个字符。第一句中要包含 video、edit、reel 或 clip,这样
    cooked.
    的 style 列表才会显示它。
  • 正文:只包含 Claude 原本不知道的信息;提供可直接复制的清单;一个带修复方式的检查步骤(检查、修复、再次检查);以及一个真实示例。少于 500 行;更详细的内容放在
    references/<topic>.md
    中,并从 SKILL.md 链接,链接深度仅一层。每次都相同的步骤应写成
    scripts/
    中的脚本,并写明“Run X”。
  • 末尾保留一个空的
    ## Learned rules
    章节(由 skill-improver 填充)。
然后检查文档,并修复所有 FAIL:
bash
python3 "$M" check <skills folder>/<name>

5. Save and show

5. 保存并展示

The skill is already in its folder (
python3 "$M" where
prints it). Show the user the whole SKILL.md and the scenarios, and the path.
Skill 已经位于其文件夹中(
python3 "$M" where
会打印该路径)。向用户展示完整的 SKILL.md、测试场景及路径。

6. Test in a fresh agent

6. 在全新的 Agent 中测试

For each scenario, launch an agent with no memory of this chat (the Agent tool, general-purpose), give it the skill's full SKILL.md path and the scenario's query, and have it do the task (or, with no footage, write each command and what it expects). Grade every
expected_behavior
line yourself as pass or fail from what it did. Report a table: scenario, pass/fail, why.
对于每个场景,启动一个不记得当前对话的 Agent(Agent 工具,general-purpose),向其提供 Skill 的完整 SKILL.md 路径和场景 query,并让它执行任务(如果没有视频素材,则写出每条命令及其预期结果)。根据其实际表现,亲自将每一条
expected_behavior
评为
pass
或
fail
。报告以下表格:场景、pass/fail、原因。

7. Improve with the user

7. 与用户共同改进

Show the failures and what the user thinks of the result. Change the SKILL.md for each failure (a missing step, a vague rule, a check that would have caught it), run
check
, then test the failing scenarios again. Stop when they all pass and the user is happy, or after three rounds, saying what is left.
展示失败项以及用户对结果的反馈。针对每个失败项修改 SKILL.md(补充缺失步骤、明确模糊规则,或添加本可提前发现问题的检查),运行
check
,然后重新测试失败的场景。当所有场景都通过且用户满意时停止;或者进行三轮后停止,并说明仍存在的问题。

8. Hand over

8. 交付

Ask in the question box:
Make it a style (Recommended)
/
Not now
. Make it a style: cooked.'s window, Skills >
/<name>
> Use as a style (or Styles > New style > Use your own skill); every video made with that style runs the skill. Say in one line that notes on later videos go into the skill with skill-improver.
在问题框中询问:
Make it a style (Recommended)
/
Not now
。将其设为 style:在
cooked.
的窗口中,依次选择 Skills >
/<name>
> Use as a style(或者 Styles > New style > Use your own skill);使用该 style 制作的每个视频都会运行这个 Skill。
用一行说明,后续视频中的笔记可通过 skill-improver 写入该 Skill。

Example

示例

"Make a skill that adds a yellow underline under the word I stress." Interview: adds one visual; example
edits/demo
; good = underline lands on the word, never over the face. The plain run guessed the stressed word and drew it below the safe zone, so the draft says how to pick the word (asked once per video when the script marks none) and checks a still with the safe-zone box. Scenarios: a normal video, a video with no clear stress, "underline every word" (should push back). Saved as
stress-underline
, 3 of 3 passing after one round.
“创建一个 Skill,为我强调的词添加黄色下划线。”访谈结果:添加一种视觉效果;示例
edits/demo
;合格标准为下划线落在被强调的词上,且绝不覆盖面部。不使用 Skill 的普通运行猜错了要强调的词,并把下划线画在安全区之外,因此草稿中会说明如何选择该词(如果脚本未作标记,则每个视频询问一次),并使用带安全区框的静帧进行检查。测试场景包括:普通视频、没有明确强调词的视频,以及“给每个词都加下划线”(应拒绝或提出异议)。保存为
stress-underline
,经过一轮改进后 3 个场景全部通过。

Files

文件

  • scripts/skill_maker.py
    :
    where
    ,
    new
    ,
    check
    ,
    demo
    .
  • references/cooked-hooks.md
    : what a video skill can read and call in cooked.
  • scripts/skill_maker.py
    :提供
    where
    、
    new
    、
    check
    、
    demo
    。
  • references/cooked-hooks.md
    :介绍视频 Skill 在
    cooked.
    中可以读取和调用的内容。