create-moviepilot-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create MoviePilot Skill

创建MoviePilot Skill

This skill guides you through creating or updating a built-in MoviePilot agent skill in this repository.
本技能将引导您在本仓库中创建或更新内置的MoviePilot agent技能。

Scope

适用范围

Use this workflow for repository built-in skills:
  • Create or update files under
    skills/<skill-id>/
  • Commit the skill as part of the MoviePilot repository
  • Do not place the implementation only in
    config/agent/skills
    unless the user explicitly asks for a local override instead of a built-in skill
本工作流适用于仓库内置技能:
  • 创建或更新
    skills/<skill-id>/
    下的文件
  • 将技能作为MoviePilot仓库的一部分提交
  • 除非用户明确要求使用本地覆盖而非内置技能,否则不要仅将实现放在
    config/agent/skills

MoviePilot-Specific Rules

MoviePilot专属规则

  • The repository root
    skills/
    directory is the bundled source of truth for built-in skills.
  • On agent startup, bundled skills are synced into
    config/agent/skills
    .
  • Sync overwrite depends on the
    version
    field in
    SKILL.md
    . If you update an existing built-in skill, increment
    version
    , or users may continue using an older copied version.
  • Keep the folder name and frontmatter
    name
    identical. Use lowercase letters, digits, and hyphens only.
  • Prefer extending an existing skill instead of creating an overlapping duplicate.
  • 仓库根目录下的
    skills/
    是内置技能的统一可信源。
  • Agent启动时,捆绑技能会同步到
    config/agent/skills
    中。
  • 同步覆盖取决于
    SKILL.md
    中的
    version
    字段。如果您更新现有内置技能,请递增
    version
    ,否则用户可能仍在使用旧的副本版本。
  • 保持文件夹名称与前置元数据中的
    name
    一致。仅使用小写字母、数字和连字符。
  • 优先扩展现有技能,而非创建重复的重叠技能。

Workflow

工作流

Step 1: Understand the Request

步骤1:理解需求

  • Determine whether the user wants a new skill or a change to an existing one.
  • Extract the target task, likely trigger phrases, needed tools, and whether helper scripts are necessary.
  • If the goal is still ambiguous after reading the request and local context, ask one focused clarification question. Otherwise proceed with a reasonable default.
  • 判断用户是想要新技能还是修改现有技能。
  • 提取目标任务、可能的触发短语、所需工具,以及是否需要辅助脚本。
  • 如果阅读请求和本地上下文后目标仍不明确,提出一个聚焦的澄清问题。否则按合理默认方案推进。

Step 2: Check Existing Skills First

步骤2:先检查现有技能

  • Inspect the repository
    skills/
    directory before creating anything new.
  • If an existing skill already covers most of the workflow, update it instead of adding a near-duplicate.
  • Reuse the repository style: concise YAML frontmatter, trigger-rich description, and procedural body sections.
  • 在创建新技能前,检查仓库的
    skills/
    目录。
  • 如果现有技能已覆盖大部分工作流,更新该技能而非添加近乎重复的技能。
  • 遵循仓库风格:简洁的YAML前置元数据、富含触发场景的描述,以及流程化的主体章节。

Step 3: Choose the Skill ID and Path

步骤3:选择技能ID和路径

  • New built-in skill path:
    skills/<skill-id>/SKILL.md
  • Keep
    <skill-id>
    short, hyphen-case, and under 64 characters.
  • Use a verb-led or domain-led name that makes the trigger obvious, such as
    transfer-failed-retry
    ,
    moviepilot-api
    , or
    create-moviepilot-skill
    .
  • 新内置技能路径:
    skills/<skill-id>/SKILL.md
  • 保持
    <skill-id>
    简短、使用连字符格式,且长度不超过64个字符。
  • 使用动词开头或领域导向的名称,让触发场景一目了然,例如
    transfer-failed-retry
    moviepilot-api
    create-moviepilot-skill

Step 4: Write Frontmatter Correctly

步骤4:正确编写前置元数据

Use this shape:
markdown
---
name: create-moviepilot-skill
version: 1
description: >-
  Explain what the skill does and exactly when to use it.
allowed-tools: list_directory read_file write_file edit_file execute_command
---
Rules:
  • description
    is the primary trigger surface. Put concrete "when to use" scenarios there.
  • Include
    version
    for built-in skills. Increment it whenever you ship a new built-in revision.
  • Add
    allowed-tools
    when the workflow depends on a small, well-defined tool set.
  • Add
    compatibility
    only when environment constraints actually matter.
使用以下格式:
markdown
---
name: create-moviepilot-skill
version: 1
description: >-
  说明该技能的功能以及具体使用场景。
allowed-tools: list_directory read_file write_file edit_file execute_command
---
规则:
  • description
    是主要触发依据。在此处写明具体的“何时使用”场景。
  • 内置技能需包含
    version
    字段。每次发布新的内置修订版本时,递增版本号。
  • 当工作流依赖少量明确定义的工具集时,添加
    allowed-tools
  • 仅当存在实际环境限制时,添加
    compatibility
    字段。

Step 5: Write the Body

步骤5:编写主体内容

The body should contain:
  • A short purpose statement
  • MoviePilot-specific rules or guardrails
  • A step-by-step workflow
  • Concrete examples of matching user requests
  • References to supporting files when they exist
Prefer:
  • Imperative instructions
  • Concrete file paths
  • Examples aligned with actual MoviePilot conventions
Avoid:
  • Generic theory that does not change execution
  • Large duplicated documentation
  • Extra files like
    README.md
    or
    CHANGELOG.md
    inside the skill directory
主体内容应包含:
  • 简短的用途说明
  • MoviePilot专属规则或约束
  • 分步工作流
  • 匹配用户请求的具体示例
  • 存在支持文件时的引用
优先选择:
  • 命令式说明
  • 具体文件路径
  • 符合MoviePilot实际规范的示例
避免:
  • 不影响执行的通用理论
  • 大量重复文档
  • 技能目录内的额外文件,如
    README.md
    CHANGELOG.md

Step 6: Add Supporting Files Only When They Help

步骤6:仅在必要时添加支持文件

  • Add
    scripts/
    only when the same deterministic work would otherwise be rewritten repeatedly.
  • Keep helper files inside the same skill directory.
  • Reference helper paths explicitly from
    SKILL.md
    .
  • If the skill is instructions-only, keep it to a single
    SKILL.md
    .
  • 仅当相同的确定性工作会被重复编写时,添加
    scripts/
    目录。
  • 将辅助文件放在同一技能目录内。
  • SKILL.md
    中明确引用辅助文件路径。
  • 如果技能仅为说明文档,只需保留单个
    SKILL.md
    文件。

Step 7: Implement the Skill

步骤7:实现技能

For a new built-in skill:
  1. Create
    skills/<skill-id>/
  2. Create
    SKILL.md
  3. Add helper scripts only if they are justified
For an existing built-in skill:
  1. Edit
    skills/<skill-id>/SKILL.md
  2. Increment
    version
  3. Update helper files in the same directory if needed
对于新内置技能:
  1. 创建
    skills/<skill-id>/
    目录
  2. 创建
    SKILL.md
    文件
  3. 仅在合理必要时添加辅助脚本
对于现有内置技能:
  1. 编辑
    skills/<skill-id>/SKILL.md
    文件
  2. 递增
    version
    版本号
  3. 如有需要,更新同一目录下的辅助文件

Step 8: Validate Before Finishing

步骤8:完成前验证

  • Re-read the frontmatter and confirm
    name
    matches the directory name.
  • Confirm
    description
    mentions real trigger scenarios.
  • If you changed an existing built-in skill, confirm
    version
    increased.
  • If possible, validate the file can be parsed by the MoviePilot skills loader.
  • Report the final path and note whether the agent needs a restart to sync the latest built-in skill into
    config/agent/skills
    .
  • 重新阅读前置元数据,确认
    name
    与目录名称一致。
  • 确认
    description
    提及真实的触发场景。
  • 如果修改了现有内置技能,确认
    version
    已递增。
  • 如有可能,验证文件可被MoviePilot技能加载器解析。
  • 报告最终路径,并注明Agent是否需要重启才能将最新内置技能同步到
    config/agent/skills
    中。

Minimal Example

最简示例

User request:
给 MoviePilot agent 加一个处理站点 Cookie 更新的内置技能
Expected outcome:
  • Create or update a directory such as
    skills/update-site-cookie/
  • Write
    SKILL.md
    with a trigger-rich
    description
  • Include only the tools needed for that workflow
  • Increment
    version
    when revising an existing built-in skill
用户请求:
给 MoviePilot agent 加一个处理站点 Cookie 更新的内置技能
预期结果:
  • 创建或更新类似
    skills/update-site-cookie/
    的目录
  • 编写
    SKILL.md
    ,包含富含触发场景的
    description
  • 仅包含该工作流所需的工具
  • 修改现有内置技能时递增
    version

Final Checklist

最终检查清单

  • Is the skill under the repository
    skills/
    directory?
  • Does the folder name equal frontmatter
    name
    ?
  • Does
    description
    clearly say when the skill should trigger?
  • Did you avoid duplicating an existing skill unnecessarily?
  • Did you increment
    version
    for built-in skill updates?
  • Did you keep the skill lean and procedural?
  • 技能是否位于仓库
    skills/
    目录下?
  • 文件夹名称是否与前置元数据中的
    name
    一致?
  • description
    是否明确说明技能何时触发?
  • 是否避免了不必要地重复现有技能?
  • 更新内置技能时是否递增了
    version
  • 技能是否简洁且流程化?