Install
openclaw skills install @thcjp/skill-creator-freeopenclaw skills install @thcjp/skill-creator-free创建有效AI Skill的基础指南,覆盖Core Principles与SKILL.md结构设计.
输入: 用户提供skill创建需求,包括具体的concrete examples(skill应支持的功能描述与触发场景)、预期触发关键词或短语、skill名称建议、所需的bundled resources类型((请参考skill目录中的脚本文件))、skill的复杂度与自由度偏好(High/Medium/Low freedom).
输出: SKILL.md结构设计指导(含frontmatter中 name 与 description 字段的编写规范、body内容组织建议)、Progressive Disclosure三级加载系统设计建议(Level 1 Metadata约100 words / Level 2 SKILL.md body <5k words / Level 3 Bundled resources按需加载)、Bundled Resources基础组织方案((请参考skill目录中的脚本文件))、Core Principles三大原则应用建议。免费版不含 init_skill.py/package_skill.py 脚本集成与完整规范(付费版专享).
| 依赖项 | 类型 | 是否必需 | 获取方式 |
|---|---|---|---|
| LLM API | API | 必需 | 由Agent内置LLM提供 |
提供skill创建的三大核心原则指导:
提供SKILL.md的标准结构与编写规范:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)
name和description字段。这是Claude读取以判断何时使用skill的唯一依据,必须清晰全面地描述skill是什么以及何时使用。description是primary triggering mechanism,应包含skill做什么与具体触发场景.提供三级加载系统的设计原则:
保持SKILL.md body在essentials以内且<500 lines,接近限制时拆分内容。重要准则:references保持一级深度;长reference文件(>100 lines)顶部包含table of contents.
提供三类bundled resources的基础说明:
scripts/):Executable code用于需要deterministic reliability或反复重写的任务references/):按需加载的文档与参考材料,大文件(>10k words)在SKILL.md中包含grep search patternsassets/):用于输出而非加载入context的文件(templates、icons、fonts等)详细的输入输出格式请参考下方章节说明。
结果验证: 任务完成后,查看输出确认状态。成功时返回摘要和数据;失败时根据错误信息排查,参考恢复章节获取修复步骤.
需求: 用户频繁请求"帮我旋转这个PDF"
Step 1 - Understand:
- 功能: PDF旋转
- 触发: "rotate this PDF"、"rotate PDF"
Step 2 - Plan:
- 分析: 旋转PDF每次都需重写相同代码
- 资源: (请参考skill目录中的脚本文件)
Step 3 - 编写 SKILL.md:
frontmatter:
name: pdf-editor
description: "PDF manipulation toolkit. Use when user needs to rotate, split, merge PDFs..."
body:
- 旋转PDF的使用说明
- 引用 (请参考skill目录中的脚本文件)
Step 4 - Progressive Disclosure 检查:
- SKILL.md <500 lines ✓
- description含触发信息 ✓
| 错误场景 | 原因 | 处理方式 |
|---|---|---|
| frontmatter格式错误 | YAML缩进或字段缺失 | 确保name和description字段存在且格式正确,description不为空 |
| skill未触发 | description缺少触发信息 | 在description中补充"when to use"信息与具体触发场景 |
| context window溢出 | SKILL.md过长或未使用Progressive Disclosure | 将detailed info移至references/,保持SKILL.md <5k words |
A: 免费版提供基础Core Principles、SKILL.md结构与Progressive Disclosure设计指导。不含完整Bundled Resources规范、Skill Creation Process(init_skill.py/package_skill.py脚本集成)、三种Progressive Disclosure Patterns详解与不应包含内容指南.
A: description是skill的primary triggering mechanism,必须包含skill做什么与具体触发场景(when to use)。不应在body中放"When to Use"sections,因为body仅在触发后加载.
A: Level 1是Metadata(name + description),始终在context(约100 words);Level 2是SKILL.md body,skill触发时加载(<5k words);Level 3是Bundled resources,Claude按需加载(unlimited,因scripts可执行不读入context).
{
"success": true,
"data": {
"result": "AI技能创建指南(免费版)处理结果",
"execution_time": "0.5s",
"metadata": {
"version": "1.0",
"processor": "skill-creator"
}
},
"execution_log": [
"解析输入参数",
"执行核心处理",
"格式化输出结果"
],
"error": null
}