Skill Factory — Agent Skill Creator
Version: 1.1.0 | Author: Shadows Company | License: MIT
WHEN TO TRIGGER
- - User wants to create a new skill for their agent
- User says "create a skill", "make a skill", "new skill for..."
- Formalizing a recurring workflow into a reusable skill
- Publishing to ClawHub or any skill registry
WHEN NOT TO TRIGGER
- - User wants to use an existing skill
- One-time task that won't be repeated
PREREQUISITES
No binaries required. This skill generates SKILL.md files — pure text output. No external tools, runtimes, or dependencies needed to run the skill-factory itself.
SKILL ANATOMY
Every skill MUST have this structure:
CODEBLOCK0
CREATION PROCESS
Step 1 — Interview
Ask the user (exactly these 5 questions):
- 1. What does the skill do? (core purpose in one sentence)
- When should it trigger? (keywords, contexts, conditions)
- What's the process? (steps the agent should follow)
- What tools does it need? (binaries, APIs, environment variables)
- What should it NEVER do? (constraints, safety rules)
Step 2 — Generate Frontmatter
CODEBLOCK1
Rules for frontmatter:
- -
name: lowercase kebab-case, unique, descriptive - INLINECODE1 : must include trigger phrases for the agent to match
- INLINECODE2 : single-line JSON (OpenClaw parser requirement)
- INLINECODE3 : only include if external tools are strictly needed
- INLINECODE4 : only include if API keys are needed
- INLINECODE5 : include all three unless the skill is platform-specific
Step 3 — Write the Body
Structure the skill body following the anatomy above.
Quality checklist:
- - [ ] Clear trigger conditions (WHEN TO TRIGGER)
- [ ] Explicit exclusions (WHEN NOT TO TRIGGER)
- [ ] Prerequisites section listing all required and optional tools
- [ ] Step-by-step process (numbered phases)
- [ ] Concrete examples (code blocks, templates)
- [ ] Security considerations (commands, data access, network, credentials)
- [ ] Prioritized rules (numbered, most important first)
- [ ] Output format template
- [ ] No vague instructions ("do the right thing" = bad, "run pytest on all test files" = good)
Step 4 — Validate
Check the generated skill:
- 1. Frontmatter parses as valid YAML
- Metadata is valid single-line JSON
- Description is under 200 characters
- All mandatory sections are present (WHEN TO TRIGGER, WHEN NOT TO TRIGGER, PREREQUISITES, SECURITY CONSIDERATIONS, RULES)
- Every instruction is concrete and unambiguous
Step 5 — Save and Test
CODEBLOCK2
SKILL QUALITY TIERS
| Tier | Requirements |
|---|
| Draft | Frontmatter + basic process |
| Standard |
+ WHEN NOT TO TRIGGER + rules + output format |
|
Professional | + examples + edge cases + testing instructions |
|
Production | + version history + changelog + published to registry |
|
HIGH TRUST | + PREREQUISITES + SECURITY CONSIDERATIONS + homepage + concrete instructions |
COMMON PATTERNS
Pattern: Gate-based (sequential checks)
CODEBLOCK3
Pattern: Technique Selection (choose one approach)
CODEBLOCK4
Pattern: Multi-Round (iterative refinement)
CODEBLOCK5
Pattern: Interview-then-Execute
Phase 1: Ask 3-5 clarifying questions
Phase 2: Generate options
Phase 3: User selects
Phase 4: Execute selection
SECURITY CONSIDERATIONS
This skill generates text files (SKILL.md) only. It does not execute commands, read sensitive data, make network calls, or modify existing files. The generated skills should be reviewed by the user before publishing, as they may include shell commands in their instructions section. Zero risk from the skill-factory itself; standard review practices apply to generated output.
OUTPUT FORMAT
The output is a complete SKILL.md file written to skills/[skill-name]/SKILL.md, following the anatomy structure defined above.
RULES
- 1. Unambiguous instructions — the agent must know exactly what to do at each step
- Trigger phrases in description — this is how the agent matches skills to user requests
- Single-line metadata JSON — OpenClaw parser requires metadata on one line
- WHEN NOT TO TRIGGER is mandatory — prevents false activations
- Test before publishing — try the skill in a real session before distributing
Published by Shadows Company — "We work in the shadows to serve the Light."
技能工厂 — 智能体技能创建器
版本: 1.1.0 | 作者: Shadows Company | 许可证: MIT
何时触发
- - 用户希望为其智能体创建新技能
- 用户说创建一个技能、制作一个技能、为……创建新技能
- 将重复性工作流程规范化为可复用的技能
- 发布到 ClawHub 或任何技能注册中心
何时不触发
前置条件
无需二进制文件。本技能生成 SKILL.md 文件——纯文本输出。运行技能工厂本身无需外部工具、运行时或依赖项。
技能结构
每个技能必须遵循以下结构:
markdown
name: 技能短横线命名
description: 何时使用此技能及其功能。包含触发短语。
metadata: { openclaw: { emoji: X, requires: { ... }, os: [...] } }
技能名称 — 副标题
版本: X.Y.Z | 作者: [名称] | 许可证: [许可证]
何时触发
[激活此技能的条件]
何时不触发
[不应使用此技能的条件]
前置条件
[必需和可选的二进制文件、工具及依赖项]
协议/流程
[智能体需遵循的逐步指令]
安全注意事项
[运行的命令、读取的数据、网络访问、凭据]
规则
[约束条件和优先级的排序列表]
输出格式
[技能输出的模板]
创建流程
第一步 — 访谈
向用户提问(确切以下5个问题):
- 1. 此技能的功能是什么?(一句话概括核心目的)
- 何时应触发?(关键词、上下文、条件)
- 流程是什么?(智能体应遵循的步骤)
- 需要哪些工具?(二进制文件、API、环境变量)
- 绝不可做什么?(约束条件、安全规则)
第二步 — 生成前置元数据
yaml
name: [短横线命名]
description: [触发描述 — 功能及使用时机]
metadata: { openclaw: { emoji: [相关表情符号], homepage: [发布者URL], requires: { bins: [...], env: [...] }, os: [darwin, linux, win32] } }
前置元数据规则:
- - name: 小写短横线命名,唯一且具描述性
- description: 必须包含智能体可匹配的触发短语
- metadata: 单行JSON(OpenClaw解析器要求)
- requires.bins: 仅在严格需要外部工具时包含
- requires.env: 仅在需要API密钥时包含
- os: 包含全部三个,除非技能特定于平台
第三步 — 编写主体
按照上述结构编写技能主体。
质量检查清单:
- - [ ] 清晰的触发条件(何时触发)
- [ ] 明确的排除条件(何时不触发)
- [ ] 前置条件部分列出所有必需和可选工具
- [ ] 逐步流程(编号阶段)
- [ ] 具体示例(代码块、模板)
- [ ] 安全注意事项(命令、数据访问、网络、凭据)
- [ ] 优先级规则(编号,最重要优先)
- [ ] 输出格式模板
- [ ] 无模糊指令(做正确的事=差,在所有测试文件上运行pytest=好)
第四步 — 验证
检查生成的技能:
- 1. 前置元数据可解析为有效YAML
- 元数据为有效单行JSON
- 描述不超过200字符
- 所有必需部分均已包含(何时触发、何时不触发、前置条件、安全注意事项、规则)
- 每条指令具体且无歧义
第五步 — 保存并测试
bash
创建技能目录
mkdir -p skills/[技能名称]
将SKILL.md保存到新目录
(在此写入生成的内容)
测试:启动新的智能体会话,尝试使用描述字段中列出的短语触发技能
技能质量等级
+ 何时不触发 + 规则 + 输出格式 |
|
专业 | + 示例 + 边界情况 + 测试说明 |
|
生产 | + 版本历史 + 变更日志 + 发布到注册中心 |
|
高信任 | + 前置条件 + 安全注意事项 + 主页 + 具体指令 |
常见模式
模式:关卡式(顺序检查)
关卡1:检查X → 通过/失败
关卡2:检查Y → 通过/失败
关卡3:检查Z → 通过/失败
结论:全部通过 = 继续执行
模式:技术选择(选择一种方法)
分诊 → 分类问题
如果类型A → 技术1
如果类型B → 技术2
如果类型C → 技术3
模式:多轮迭代(逐步优化)
第一轮:广泛探索
第二轮:挑战假设
第三轮:综合归纳
第四轮:明确决策
模式:访谈后执行
阶段1:提出3-5个澄清问题
阶段2:生成选项
阶段3:用户选择
阶段4:执行选定方案
安全注意事项
本技能仅生成文本文件(SKILL.md)。不执行命令、不读取敏感数据、不进行网络调用、不修改现有文件。生成的技能应在发布前由用户审查,因其指令部分可能包含shell命令。技能工厂本身零风险;标准审查流程适用于生成的输出。
输出格式
输出为完整的SKILL.md文件,写入skills/[技能名称]/SKILL.md,遵循上述定义的结构。
规则
- 1. 无歧义的指令 — 智能体必须确切知道每一步该做什么
- 描述中包含触发短语 — 这是智能体将技能与用户请求匹配的方式
- 单行元数据JSON — OpenClaw解析器要求元数据在一行内
- 何时不触发为必填项 — 防止误激活
- 发布前测试 — 在真实会话中试用技能后再分发
由 Shadows Company 发布 — 我们在暗处工作,以服务于光明。