skill-editor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkills Editor Skill
技能编辑器Skill
Description
说明
This skill enables the agent to create and maintain "Agent Skills" - modular capabilities that extend the agent's functionality. It ensures that all skills follow the standardized directory structure and file format required by the deepagents environment.
此技能允许Agent创建和维护「Agent Skills」——用于扩展Agent功能的模块化能力。它确保所有技能都符合deepagents环境要求的标准化目录结构和文件格式。
When to Use
使用场景
- When the user asks to "create a skill" or "add a capability".
- When the user wants to package a specific workflow (e.g., "teach the agent how to handle PDF invoices").
- When modifying existing skills to add new resources or update instructions.
- 当用户要求「创建技能」或「添加功能」时。
- 当用户想要打包特定工作流时(例如:「教Agent如何处理PDF发票」)。
- 修改现有技能以添加新资源或更新说明时。
Skill Structure Rules
技能结构规则
Every skill must reside in its own directory and contain a file.
SKILL.md每个技能必须位于独立目录中,且包含一个文件。
SKILL.md1. Directory Structure
1. 目录结构
Create a new directory for the skill (e.g., ).
Inside, the is mandatory. Other files are optional but recommended for complex tasks to keep the context window light (Progressive Disclosure).
pdf-processing/SKILL.mdtext
skill-name/
├── SKILL.md # (Required) Main instructions and metadata
├── REFERENCE.md # (Optional) Detailed API docs or reference material
├── FORMS.md # (Optional) Specialized guides
└── scripts/ # (Optional) Executable scripts
└── utility.py为技能创建一个新目录(例如:)。
目录内必须包含文件,其他文件为可选,但对于复杂任务建议添加,以减少上下文窗口的负担(渐进式披露)。
pdf-processing/SKILL.mdtext
skill-name/
├── SKILL.md # (Required) Main instructions and metadata
├── REFERENCE.md # (Optional) Detailed API docs or reference material
├── FORMS.md # (Optional) Specialized guides
└── scripts/ # (Optional) Executable scripts
└── utility.py2. SKILL.md Format
2. SKILL.md 格式
The file must start with YAML frontmatter, followed by markdown instructions.
SKILL.mdFrontmatter Requirements:
- : Max 64 chars, lowercase letters, numbers, and hyphens only. No reserved words ("anthropic", "claude").
name - : Max 1024 chars. Must explain what the skill does and when to use it.
description
Content Sections:
# [Skill Name]- : Step-by-step guidance.
## Instructions - : Concrete usage examples.
## Examples
SKILL.mdInstructions - How to Create a Skill
前置元数据要求
MUST use the and tools to track progress of the execution of the below steps:
todowritetodoread- :最多64个字符,仅允许小写字母、数字和连字符。不得使用保留词("anthropic"、"claude")。
name - :最多1024个字符。必须说明该技能的功能以及使用场景。
description
Step 1: Check for Similar Online Skills
内容板块
Before creating or editing a skill, MUST run a quick web-search (use the tool) to find any existing, similar skills online (for example, Anthropic's official skills at https://github.com/anthropics/skills/tree/main/skills or community-maintained lists). If similar skills are found:
webfetch- If the license and terms allow reuse, prefer adapting them as a template and include a clear reference/link in the new skill's SKILL.md ("Based on: <url>").
- If the license requires attribution or imposes conditions, include the original LICENSE.txt (or a pointer) in the new skill directory and follow the license terms. If the license is incompatible with your intended use, notify the user and request guidance before importing.
# [Skill Name]- :分步指导。
## Instructions - :具体使用示例。
## Examples
Step 2: Check for Existing Skills
操作说明 - 如何创建技能
Before creating a new skill and not using an online skill as a template, search for existing or similar local skills and reuse their structure, examples, and patterns as a starting point.
必须使用和工具跟踪以下步骤的执行进度:
todowritetodoreadStep 3: Create the Directory
步骤1:查找同类在线技能
Create a directory under with a kebab-case name matching the skill's purpose.
.opencode/skills/在创建或编辑技能之前,必须运行快速网络搜索(使用工具)以查找任何已有的同类在线技能(例如,Anthropic官方技能库:https://github.com/anthropics/skills/tree/main/skills 或社区维护的列表)。如果找到同类技能:
webfetch- 如果许可证和条款允许复用,优先将其作为模板进行改编,并在新技能的中明确添加引用/链接(格式:"基于:<链接地址>")。
SKILL.md - 如果许可证要求署名或有其他条件,需在新技能目录中包含原始LICENSE.txt文件(或指向该文件的链接),并遵守许可证条款。如果许可证与你的预期使用场景不兼容,需通知用户并在导入前请求指导。
Step 4: Create SKILL.md
步骤2:检查现有技能
Write the file with the required frontmatter and sections.
SKILL.mdTemplate:
markdown
---
name: my-new-skill
description: Brief description of what this skill does and when to use it.
---在创建新技能且不使用在线技能作为模板之前,先搜索本地已有的同类技能,并以它们的结构、示例和模式作为起点进行复用。
My New Skill
步骤3:创建目录
Instructions
—
[Clear, step-by-step guidance for the agent to follow]
在目录下创建一个短横线命名法(kebab-case)的目录,名称需与技能用途匹配。
.opencode/skills/Examples
步骤4:创建SKILL.md文件
[Concrete examples of using this skill]
undefined编写包含必填前置元数据和板块的文件。
SKILL.md模板:
markdown
---
name: my-new-skill
description: Brief description of what this skill does and when to use it.
---Step 5: Add Supporting Files (Optional)
My New Skill
—
Instructions
If the skill requires large reference texts or scripts, create separate files (e.g., , ) and reference them in . The agent will read these only when needed.
scripts/main.pydocs/api.mdSKILL.md[Clear, step-by-step guidance for the agent to follow]
Step 6: Update dependencies (Optional)
Examples
Add any required dependencies to the project's file using so the project's virtual environment is updated.
requirements.txtuv pip install <package>[Concrete examples of using this skill]
undefinedStep 7: Highlight necessary environment variables (Optional)
步骤5:添加支持文件(可选)
If a skill's scripts require environment variables (API keys, tokens, credentials), list them clearly in the SKILL.md section with the expected variable names (e.g., , ). When creating a new skill, surface these required env vars to the user and advise adding them to the project's .env file or system environment before running the scripts.
CredentialsGITHUB_ACCESS_TOKENYOUTUBE_API_KEY如果技能需要大量参考文本或脚本,可创建单独文件(例如:、)并在中引用它们。Agent仅在需要时才会读取这些文件。
scripts/main.pydocs/api.mdSKILL.mdBest Practices
步骤6:更新依赖项(可选)
- Progressive Disclosure: Don't put everything in . Use it as an entry point that links to other files.
SKILL.md - Deterministic Code: Prefer Python scripts for complex logic or data processing over natural language instructions.
- Concise Scripts: When creating script files, keep them concise—clear purpose, small functions, minimal external dependencies, and avoid unnecessary complexity.
- Clear Triggers: Ensure the clearly states when the skill should be used so the router can pick it up correctly.
description - Confirm changes: Confirm changes with the user before executing any steps.
使用命令将所需依赖项添加到项目的文件中,以便更新项目的虚拟环境。
uv pip install <package>requirements.txt—
步骤7:标注必要的环境变量(可选)
—
如果技能的脚本需要环境变量(API密钥、令牌、凭证),需在的「Credentials」板块中清晰列出预期的变量名称(例如:、)。创建新技能时,需向用户说明这些必填环境变量,并建议在运行脚本前将其添加到项目的.env文件或系统环境中。
SKILL.mdGITHUB_ACCESS_TOKENYOUTUBE_API_KEY—
最佳实践
—
- 渐进式披露:不要将所有内容都放在中。将其作为入口点,链接到其他文件。
SKILL.md - 确定性代码:对于复杂逻辑或数据处理,优先使用Python脚本而非自然语言说明。
- 简洁脚本:创建脚本文件时,保持简洁——明确的用途、小巧的函数、最少的外部依赖,避免不必要的复杂性。
- 清晰触发条件:确保中明确说明技能的使用场景,以便路由模块能正确识别。
description - 确认变更:在执行任何步骤前,需与用户确认变更内容。