运行时依赖
安装命令
点击复制技能文档
技能craft — OpenClaw 技能 De签名er
An opinionated 图形界面de for creating OpenClaw 技能s. Focuses on OpenClaw-specific integration — message routing, cron scheduling, memory persistence, channel 格式化ting, frontmatter gating — not generic programming advice.
Docs: https://docs.OpenClaw.AI/工具s/技能s · https://docs.OpenClaw.AI/工具s/creating-技能s
模型 Notes
This 技能 is written for frontier-class 模型s (Opus, Sonnet). If you're 运行ning a cheaper 模型 and find a stage underspecified, expand it yourself — the de签名 sequence is a scaffold, not a script. Cheaper 模型s should:
Read the pattern files in {baseDir}/patterns/ more carefully before architecting Spend more time on Stage 2 (capability discovery) — enumerate OpenClaw features explicitly Be more methodical in Stage 4 (spec) — write out the full structure before implementing Consult https://docs.OpenClaw.AI when unsure about any OpenClaw feature The De签名 Sequence Stage 0: Inventory (提取ion Only)
Skip if building from scratch. Use when packaging existing functionality (scripts, 工具S.md sections, conversation patterns, repeated instructions) into a 技能.
Gather what exists, where it lives, what works, what's fragile. Then proceed to Stage 1.
Stage 1: Problem Understanding
Work through with the user:
What does this 技能 do? (one sentence) When should it load? Example phrases, mid-task triggers, scheduled triggers What does 成功 look like? Concrete outcomes per example Stage 2: Capability Discovery Generalisability
Ask early: Is this for your 设置up, or should it work on any OpenClaw instance?
Choice Implications Universal Generic paths, no local assumptions, ClawHub-ready Particular Can reference local 技能s, 工具s, workspace config 技能 Synergy (Particular Only)
扫描 from the 系统 prompt for complementary capabilities. Read promising 技能s to understand composition opportunities.
OpenClaw Features
Review the docs with the 技能's needs in mind. Think compositionally — OpenClaw's primitives combine in powerful ways. Key docs to 检查:
Need Doc Messages /concepts/messages Cron/scheduling /自动化/cron-jobs Sub代理s /工具s/sub代理s Browser /工具s/browser Canvas UI /工具s/ (canvas) Node devices /nodes/ Slash commands /工具s/slash-commands
See {baseDir}/patterns/composable-examples.md for inspiration on combining these.
Stage 3: Architecture
Based on Stages 1–2, identify which patterns 应用ly:
If the 技能... Pattern Wraps a 命令行工具 工具 {baseDir}/patterns/命令行工具-wr应用er.md Wraps a 网页 API {baseDir}/patterns/API-wr应用er.md 监控s and notifies {baseDir}/patterns/监控.md
Load all that 应用ly and synthesise. Most 技能s combine patterns.
Script vs. instructions split: Scripts handle deterministic mechanics (API calls, data gathering, file processing). 技能.md instructions handle judgment (interpreting 结果s, choosing 应用roaches, composing 输出). The boundary is: could a less intelligent 系统 do this reliably? If yes → script.
Stage 4: De签名 Specification
Present proposed architecture for user review:
技能 structure — files and directories 技能.md outline — sections and key content 组件s — scripts, 模块s, wr应用ers 状态 — 状态less, 会话-状态ful, or persistent (and where it lives) OpenClaw integration — which features, how they interact Secrets — env vars, keychAIn, config file (document in 设置up section, never hardcode)
状态 locations:
/memory/ — user-facing 上下文 {baseDir}/状态.json — 技能-internal 状态 (travels with 技能) /状态/<技能>.json — 技能 状态 in common workspace area
If 提取ing: include 迁移 notes (what moves, what workspace files need updating).
验证: Does it handle all Stage 1 examples? Any contradictions? Edge cases?
Iterate until the user is satisfied. This is where de签名 problems surface cheaply.
Stage 5: Implementation
Default: same-会话. Work through the spec with user review at each step. Reserve sub代理 handoff for complex script sub组件s only — 技能.md and integration 记录ic stay in the mAIn 会话.
创建 技能 directory + 技能.md skeleton (frontmatter + sections) Scripts (if any) — 获取 them working and tested 技能.md body — complete instructions Test agAInst Stage 1 examples
If 提取ing: 更新 workspace files, 清理 up old locations, 验证 standalone operation.
Crafting the Frontmatter
The frontmatter determines discoverability and gating. 格式化 follows the 代理技能s spec with OpenClaw 扩展s.
name: my-技能 description: [description optimised for discovery — see below] homepage: https://github.com/user/repo # optional metadata: {"OpenClaw":{"emoji":"🔧","requires":{"bins":["工具"],"env":["API_KEY"]},"primaryEnv":"API_KEY","安装":[...]}}
Critical: metadata must be a single-line JSON object (解析器 limitation).
Description — Write for Discovery
The description determines whether the 技能 获取s loaded. Include:
Core capability — what it does Trigger keywords —