Skills Creator
Guide the creation, review, and optimization of OpenClaw skills that trigger reliably and instruct LLMs clearly. Based on analysis of top-performing skills across the ClawHub ecosystem.
Quick Reference
| User wants... | Do this |
|---|
| Create a new skill | → Mode 1: Gather requirements, pick complexity tier, write frontmatter + body |
| Review an existing skill |
→ Mode 2: Run quality checklist, output findings as table |
| Fix poor triggering | → Focus on Description Writing Formula, rewrite with trigger phrases |
| Retrofit / optimize a skill | → Mode 3: Audit → rewrite description → restructure content → re-audit |
| Add external API integration | → Mode 4: Create scripts/ with curl wrapper, declare dependencies |
| Publish to ClawHub | → Verify quality checklist passes, then
clawhub publish |
Important Rules
Rule 1: Always determine complexity tier first
Before writing anything, classify the skill into a tier. This decides file structure, SKILL.md length, and whether supporting directories are needed.
| Tier | When to use | SKILL.md size | Directories |
|---|
| Simple | Pure instructions, no executable code | < 150 lines | None |
| Medium |
Needs scripts or deep reference docs | 100–300 lines |
scripts/ or
references/ |
|
Complex | Multiple workflows + hooks + cross-platform | 200–650 lines | Multiple subdirs |
Rule 2: Description is the highest-leverage field
The description in frontmatter determines whether an LLM activates the skill at all. Spend disproportionate effort here. A mediocre skill with a great description outperforms a great skill with a mediocre description.
Rule 3: Write instructions for an LLM, not documentation for a human
The SKILL.md is injected into an LLM's context. Write actionable directives ("Do X when Y"), not explanatory documentation ("This skill provides..."). The LLM needs to know what to do, not what the skill is.
Rule 4: Use tables for decision logic, not prose
Tables are the LLM's fastest lookup structure. Any conditional logic ("if X then Y") should be a table row, not a paragraph. Reserve prose for context that doesn't fit a table.
Rule 5: The skill must describe itself accurately and be internally consistent
Self-consistency is a quality signal. If the skill teaches "add a Quick Reference table", it must have one. If it references a tool, that tool must exist and its description must accurately reflect what it does. Never claim capabilities the skill doesn't have.
Rule 6: Never auto-execute generated scripts without user confirmation
This skill guides the creation of files including shell scripts. Always present generated scripts to the user for review before executing them. Never run chmod +x or execute a newly created script without explicit user approval. The skill is instructional — the user decides what to run.
Workflow Modes
Mode 1: Create New Skill
Step 1: Gather requirements
Ask the user:
- - What does the skill do? (one sentence)
- What triggers it? (user phrases, situations, events)
- Does it need external tools, APIs, or binaries?
- Does it need environment variables?
Step 2: Determine complexity tier
Use the tier table from Rule 1. When uncertain, start Simple — it's easier to add complexity than remove it.
Step 3: Write frontmatter
CODEBLOCK0
Field rules:
| Field | Required | Format | Rules |
|---|
| INLINECODE5 | Yes | lowercase kebab-case | Must match folder name. No spaces, no uppercase. |
| INLINECODE6 |
Yes | Single string | Follow the Description Writing Formula below. Include 5+ trigger phrases. |
|
version | Yes | semver | Independent from any npm/PyPI package version. |
|
homepage | No | URL | Link to source repo or documentation site. |
|
metadata | No |
Single-line JSON | Parser does not support multiline. Use
clawdbot key (not
openclaw). |
Metadata sub-fields:
| Sub-field | Purpose | Example |
|---|
| INLINECODE12 | Visual identifier on ClawHub | INLINECODE13 |
| INLINECODE14 |
Executables the skill needs |
["node", "npx", "curl"] |
|
requires.env | Environment variables needed |
["TAVILY_API_KEY"] |
|
primaryEnv | Main env var for quick setup hint |
"TAVILY_API_KEY" |
Step 4: Write SKILL.md body
Follow this section order:
- 1. Title + one-paragraph intro — What it does, in action-oriented language
- Quick Reference table —
| User wants... | Do this | — 4–8 rows covering main use cases - Important Rules — Numbered constraints the LLM must follow (3–5 rules)
- Workflow Modes — Discrete scenarios with step-by-step instructions
- Reference sections — Field references, formulas, lookup tables
- Gotchas — Critical pitfalls with one-line fixes
- Further Reading — Links to
references/ and assets/ files
Use the starter template at {baseDir}/assets/skill-template.md as a starting point.
Step 5: Create supporting files (Medium/Complex tiers)
| Directory | When to create | What goes inside |
|---|
| INLINECODE24 | SKILL.md exceeds 200 lines, or has deep-dive content | Detailed guides, examples, troubleshooting |
| INLINECODE25 |
Skill needs executable code (API calls, automation) | Shell/Node scripts using
{baseDir} paths |
|
assets/ | Skill provides templates for users to copy | Starter files, config templates |
|
hooks/ | Skill needs event-driven triggers (rare) | Hook handlers for agent lifecycle events |
Never create _meta.json — ClawHub generates it automatically.
Step 6: Run quality review
Read {baseDir}/references/quality-checklist.md and run through all 24 checks. Fix any failures before considering the skill complete.
Mode 2: Review Existing Skill
- 1. Ask the user to provide their SKILL.md content (or a file path to read)
- Read INLINECODE31
- Evaluate the skill against all 6 categories (24 checks total)
- Present findings as a table:
CODEBLOCK1
- 5. Prioritize fixes by impact: Description > Structure > Security > Style
- Offer to apply fixes directly if the user provides a file path
Mode 3: Retrofit / Optimize Existing Skill
For skills that exist but don't follow best practices:
- 1. Audit: Run the full quality checklist, list all failures
- Rewrite description: Apply the Description Writing Formula — this has the highest impact
- Add Quick Reference: If missing, create a situation → action table from the skill's content
- Convert prose to tables: Find any conditional logic in paragraphs, restructure as table rows
- Add guard clauses: Ensure "When to use" and "When NOT to use" are explicit
- Extract deep content: Move anything beyond 300 lines into INLINECODE32
- Add negative cases: Ensure fallback handling exists (what to do when things fail)
- Re-audit: Run the checklist again to verify all fixes
Mode 4: Add External API Integration
When a skill needs to call an HTTP API (image generation, search, translation, etc.):
Pattern: scripts/ with curl wrapper
Create scripts/call-api.sh:
CODEBLOCK2
Update metadata to declare dependencies
CODEBLOCK3
Reference in SKILL.md
CODEBLOCK4
Note: Replace the placeholder URL, headers, and body with the actual API specification. Declare ALL required environment variables in metadata.clawdbot.requires.env.
Description Writing Formula
Formula:
CODEBLOCK5
Good example:
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails.
Bad example:
A helpful skill for improving agent capabilities and making things better.
Why bad: no trigger phrases, no specific scenarios, vague value proposition. The LLM has no pattern to match against user input.
Trigger phrase checklist — include at least 5 of these patterns:
| Pattern | Example |
|---|
| Imperative verb phrase | "create a skill", "review my skill" |
| Question format |
"how do I make a skill", "what makes a good skill" |
| Topic mention | "discusses skill development", "SKILL.md structure" |
| Tool/platform name | "OpenClaw", "ClawHub", "agent skill" |
| Problem statement | "skill not triggering", "fix my description" |
File Organization Guide
| Path | Purpose | When to create |
|---|
| INLINECODE35 | Core instructions — always present | Always |
| INLINECODE36 |
Deep-dive docs, examples, troubleshooting | SKILL.md > 200 lines or has detailed reference content |
|
scripts/ | Executable code (shell, Node.js) | Skill wraps an API or automates a task |
|
assets/ | Templates, config files for users to copy | Skill generates boilerplate |
|
hooks/ | Event-driven agent lifecycle handlers | Skill needs automatic triggers (rare) |
|
_meta.json |
Never create — auto-generated by ClawHub | Never |
Keep SKILL.md under 300 lines. Extract to references/ beyond that threshold.
Use {baseDir} in SKILL.md to reference files within the skill package — the platform resolves this to the skill's installation path at runtime.
Gotchas
- - Metadata must be single-line JSON — the ClawHub parser does not support multiline.
{"clawdbot":{"emoji":"🔧"}} not formatted JSON. - Never create
_meta.json — ClawHub auto-generates it on publish. Committing one causes conflicts. - Use
{baseDir} for script paths — skills can be installed anywhere. Never hardcode absolute paths. - Avoid VirusTotal-flagged terms — words like "upload", "public URL", "CDN" trigger security scans. Use "prepare", "reference", "compress" instead.
- Pin versions in npx references —
meigen@1.2.5 not meigen@latest. Floating versions are a supply chain risk. - List ALL binaries in
requires.bins — include transitive dependencies (node, npx, not just your script name). - Use
clawdbot key in metadata — not openclaw. This is the established convention (5/6 top skills use it).
Further Reading
- -
{baseDir}/references/best-practices.md — comprehensive design guidelines with worked examples - INLINECODE54 — full 24-point review checklist and retrofit process
- INLINECODE55 — copy-paste starter template for new skills
技能创建器
指导创建、审查和优化能够可靠触发并清晰指示LLM的OpenClaw技能。基于对ClawHub生态系统中顶级技能的分析。
快速参考
| 用户想要... | 执行此操作 |
|---|
| 创建新技能 | → 模式1:收集需求,选择复杂度层级,编写前置元数据 + 主体内容 |
| 审查现有技能 |
→ 模式2:运行质量检查清单,以表格形式输出结果 |
| 修复触发不良问题 | → 专注于描述编写公式,用触发短语重写 |
| 改造/优化技能 | → 模式3:审计 → 重写描述 → 重构内容 → 重新审计 |
| 添加外部API集成 | → 模式4:创建带curl包装器的scripts/目录,声明依赖项 |
| 发布到ClawHub | → 验证质量检查清单通过,然后执行clawhub publish |
重要规则
规则1:始终先确定复杂度层级
在编写任何内容之前,将技能分类到相应层级。这决定了文件结构、SKILL.md长度以及是否需要支持目录。
| 层级 | 使用时机 | SKILL.md大小 | 目录 |
|---|
| 简单 | 纯指令,无可执行代码 | < 150行 | 无 |
| 中等 |
需要脚本或深度参考文档 | 100–300行 | scripts/ 或 references/ |
|
复杂 | 多个工作流 + 钩子 + 跨平台 | 200–650行 | 多个子目录 |
规则2:描述是最具杠杆作用的字段
前置元数据中的description决定了LLM是否会激活该技能。应在此处投入不成比例的努力。一个描述出色的平庸技能,胜过描述平庸的出色技能。
规则3:为LLM编写指令,而非为人类编写文档
SKILL.md会被注入到LLM的上下文中。编写可操作的指令(当Y发生时执行X),而非解释性文档(此技能提供...)。LLM需要知道该做什么,而不是技能是什么。
规则4:使用表格而非散文来表达决策逻辑
表格是LLM最快的查找结构。任何条件逻辑(如果X则Y)都应是表格行,而非段落。散文仅用于不适合表格的上下文。
规则5:技能必须准确描述自身并保持内部一致性
自洽性是一个质量信号。如果技能教导添加快速参考表,则必须包含一个。如果引用了某个工具,该工具必须存在,且其描述必须准确反映其功能。切勿声称技能不具备的能力。
规则6:未经用户确认,切勿自动执行生成的脚本
此技能指导创建包括shell脚本在内的文件。在执行生成的脚本之前,始终将其呈现给用户审查。未经用户明确批准,切勿运行chmod +x或执行新创建的脚本。该技能是指令性的——由用户决定运行什么。
工作流模式
模式1:创建新技能
步骤1:收集需求
询问用户:
- - 该技能做什么?(一句话)
- 什么触发它?(用户短语、情境、事件)
- 是否需要外部工具、API或二进制文件?
- 是否需要环境变量?
步骤2:确定复杂度层级
使用规则1中的层级表。不确定时,从简单开始——增加复杂度比移除复杂度更容易。
步骤3:编写前置元数据
yaml
name: my-skill-name
description: [动作动词] + [价值主张]。当有人请求[触发短语1]、[触发短语2]...或讨论[主题领域]时使用。
version: 1.0.0
homepage: https://github.com/user/repo
metadata: {clawdbot:{emoji:🔧,requires:{bins:[node],env:[MY
APIKEY]},primaryEnv:MY
APIKEY}}
字段规则:
| 字段 | 必需 | 格式 | 规则 |
|---|
| name | 是 | 小写kebab-case | 必须与文件夹名称匹配。无空格,无大写。 |
| description |
是 | 单字符串 | 遵循下面的描述编写公式。包含5个以上触发短语。 |
| version | 是 | semver | 独立于任何npm/PyPI包版本。 |
| homepage | 否 | URL | 链接到源代码仓库或文档站点。 |
| metadata | 否 |
单行JSON | 解析器不支持多行。使用clawdbot键(而非openclaw)。 |
元数据子字段:
| 子字段 | 用途 | 示例 |
|---|
| emoji | ClawHub上的视觉标识符 | 🔍 |
| requires.bins |
技能需要的可执行文件 | [node, npx, curl] |
| requires.env | 所需的环境变量 | [TAVILY
APIKEY] |
| primaryEnv | 用于快速设置提示的主要环境变量 | TAVILY
APIKEY |
步骤4:编写SKILL.md主体
按以下章节顺序:
- 1. 标题 + 一段简介 — 以行动导向的语言说明其功能
- 快速参考表 — | 用户想要... | 执行此操作 | — 4–8行覆盖主要用例
- 重要规则 — LLM必须遵守的编号约束条件(3–5条规则)
- 工作流模式 — 带有逐步说明的离散场景
- 参考章节 — 字段参考、公式、查找表
- 注意事项 — 带有一行修复的关键陷阱
- 延伸阅读 — 指向references/和assets/文件的链接
使用{baseDir}/assets/skill-template.md中的入门模板作为起点。
步骤5:创建支持文件(中等/复杂层级)
| 目录 | 创建时机 | 内容 |
|---|
| references/ | SKILL.md超过200行,或包含深度内容 | 详细指南、示例、故障排除 |
| scripts/ |
技能需要可执行代码(API调用、自动化) | 使用{baseDir}路径的Shell/Node脚本 |
| assets/ | 技能提供供用户复制的模板 | 入门文件、配置模板 |
| hooks/ | 技能需要事件驱动触发器(罕见) | 代理生命周期事件的处理程序 |
切勿创建_meta.json——ClawHub会自动生成。
步骤6:运行质量审查
阅读{baseDir}/references/quality-checklist.md并运行所有24项检查。在认为技能完成之前修复所有失败项。
模式2:审查现有技能
- 1. 要求用户提供其SKILL.md内容(或要读取的文件路径)
- 阅读{baseDir}/references/quality-checklist.md
- 对照所有6个类别(共24项检查)评估技能
- 以表格形式呈现结果:
| 类别 | 状态 | 问题 | 修复 |
|---|
| 前置元数据 | ⚠️ | metadata是多行JSON | 折叠为单行 |
| 描述 |
❌ | 无触发短语 | 使用公式重写 |
| 内容 | ✅ | — | — |
- 5. 按影响优先级排序修复:描述 > 结构 > 安全性 > 风格
- 如果用户提供文件路径,主动提供直接应用修复
模式3:改造/优化现有技能
适用于存在但未遵循最佳实践的技能:
- 1. 审计:运行完整质量检查清单,列出所有失败项
- 重写描述:应用描述编写公式——这具有最高影响
- 添加快速参考:如果缺失,从技能内容创建情境→操作表
- 将散文转换为表格:找到段落中的任何条件逻辑,重构为表格行
- 添加保护子句:确保何时使用和何时不使用明确
- 提取深度内容:将超过300行的内容移入references/
- 添加负面案例:确保存在回退处理(当事情失败时该怎么做)
- 重新审计:再次运行检查清单以验证所有修复
模式4:添加外部API集成
当技能需要调用HTTP API(图像生成、搜索、翻译等)时:
模式:scripts/带curl包装器
创建scripts/call-api.sh:
bash
#!/usr/bin/env bash
用法:{baseDir}/scripts/call-api.sh 提示文本
set -euo pipefail
APIKEY=${APIKEY:?缺少API_KEY环境变量}
response=$(curl -sf -X POST https://api.example.com/v1/generate \
-H Authorization: Bearer ${API_KEY} \
-H Content-Type: application/json \
-d {\