skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Authoring Procedure
技能创作流程
Follow these steps to generate a skill that adheres to the agentskills.io specification and progressive disclosure principles.
遵循以下步骤生成符合agentskills.io规范和渐进式披露原则的技能。
Step 1: Initialize and Validate Metadata
步骤1:初始化并验证元数据
- Define a unique : 1-64 characters, lowercase, numbers, and single hyphens only.
name - Draft a : Max 1,024 characters, written in the third person, including negative triggers.
description - Execute Validation Script: Run the validation script to ensure compliance before proceeding:
python3 scripts/validate-metadata.py --name "[name]" --description "[description]" - If the script returns an error, self-correct the metadata based on the output and re-run until successful.
stderr
- 定义唯一的:1-64个字符,仅允许小写字母、数字和单个连字符。
name - 撰写:最多1024个字符,采用第三人称撰写,包含触发排除项。
description - 执行验证脚本:在继续之前运行验证脚本以确保合规:
python3 scripts/validate-metadata.py --name "[name]" --description "[description]" - 如果脚本返回错误,根据输出自行修正元数据,直到运行成功。
stderr
Step 2: Structure the Directory
步骤2:构建目录结构
- Create the root directory using the validated .
name - Initialize the following subdirectories:
- : For tiny CLI tools and deterministic logic.
scripts/ - : For flat (one-level deep) context like schemas or API docs.
references/ - : For output templates, JSON schemas, or static files.
assets/
- Ensure no human-centric files (README.md, INSTALLATION.md) are created.
- 使用已验证的创建根目录。
name - 初始化以下子目录:
- :用于小型CLI工具和确定性逻辑。
scripts/ - :用于扁平结构(仅一级深度)的上下文内容,如模式或API文档。
references/ - :用于输出模板、JSON模式或静态文件。
assets/
- 确保不创建以人为中心的文件(如README.md、INSTALLATION.md)。
Step 3: Draft Core Logic (SKILL.md)
步骤3:编写核心逻辑(SKILL.md)
- Use the template in as the starting point.
assets/skill-template.md - Write all instructions in the third-person imperative (e.g., "Extract the text," "Run the build").
- Enforce Progressive Disclosure:
- Keep the main logic under 500 lines.
- If a procedure requires a large schema or complex rule set, move it to .
references/ - Command the agent to read the specific file only when needed: "Read references/api-spec.md to identify the correct endpoint."
- 以中的模板为起点。
assets/skill-template.md - 所有说明采用第三人称祈使语气(例如:"提取文本"、"运行构建")。
- 遵循渐进式披露原则:
- 主逻辑控制在500行以内。
- 如果某个流程需要大型模式或复杂规则集,将其移至目录。
references/ - 仅在需要时指示智能体读取特定文件:"读取references/api-spec.md以确定正确的端点。"
Step 4: Identify and Bundle Scripts
步骤4:识别并打包脚本
- Identify "fragile" tasks (regex, complex parsing, or repetitive boilerplate).
- Outline a single-purpose script for the directory.
scripts/ - Ensure the script uses standard output (stdout/stderr) to communicate success or failure to the agent.
- 识别"易出错"任务(正则表达式处理、复杂解析或重复样板代码)。
- 为目录编写一个单一用途的脚本。
scripts/ - 确保脚本使用标准输出(stdout/stderr)向智能体传达成功或失败状态。
Step 5: Final Logic Validation
步骤5:最终逻辑验证
- Review the for "hallucination gaps" (points where the agent is forced to guess).
SKILL.md - Verify all file paths are relative and use forward slashes ().
/ - Cross-reference the final output against .
references/checklist.md
- 检查中的"幻觉漏洞"(即智能体被迫猜测的环节)。
SKILL.md - 验证所有文件路径均为相对路径并使用正斜杠()。
/ - 将最终输出与进行交叉核对。
references/checklist.md
Error Handling
错误处理
- Metadata Failure: If fails, identify the specific error (e.g., "STYLE ERROR") and rewrite the field to remove first/second person pronouns.
scripts/validate-metadata.py - Context Bloat: If the draft exceeds 500 lines, extract the largest procedural block and move it to a file in .
references/
- 元数据验证失败:如果运行失败,识别具体错误(例如:"STYLE ERROR"),并重写字段以移除第一/第二人称代词。
scripts/validate-metadata.py - 上下文冗余:如果草稿超过500行,提取最大的流程块并移至目录中的文件。
references/