2026年,OpenClaw(Clawdbot)的真正强大之处,早已不只是使用现成插件,而是人人都能零代码写出自己的 Skill,让AI完全按照你的工作流执行任务。Skill 本质不是后台插件,而是给AI的一份清晰执行说明书——会写Markdown就能开发,不需要编程基础,不需要懂API,10分钟就能做出可运行、可复用、可分享的技能包。
本文基于2026最新实战,完整覆盖:
• OpenClaw阿里云/本地三平台部署
• 阿里云百炼Coding Plan免费大模型API配置
• Skill从0到1开发完整流程
• SKILL.md标准写法
• 带脚本Skill开发实战
• 调试、排错、发布ClawHub全流程
• 高频问题一站式解决
所有命令可直接复制运行,新手也能快速上手。
一、OpenClaw 全平台部署(2026最新版)
在开发Skill之前,必须先搭建稳定运行环境。以下支持阿里云云端部署、MacOS、Linux、Windows11本地部署。阿里云上OpenClaw极速一键部署最简单,步骤详情 访问阿里云OpenClaw一键部署专题页面 了解。

1.1 阿里云部署 OpenClaw(稳定24小时运行)
sudo apt update && sudo apt upgrade -y
sudo apt install nodejs npm git python3 python3-pip docker.io -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
newgrp docker
npm install -g openclaw@latest
openclaw --version
openclaw init --mode cloud --port 18789 --sandbox enable
openclaw config set gateway.bind 0.0.0.0
openclaw config set gateway.allowIps 127.0.0.1
openclaw gateway start
openclaw config set gateway.autoStart true
开放安全组端口:18789
阿里云用户零基础部署 OpenClaw 喂饭级步骤流程
第一步:打开访问阿里云OpenClaw一键部署专题页面,找到并点击【一键购买并部署】。




第二步:打开选购阿里云轻量应用服务器,配置参考如下:
- 镜像:OpenClaw(Moltbot)镜像(已经购买服务器的用户可以重置系统重新选择镜像)
- 实例:内存必须2GiB及以上。
- 地域:默认美国(弗吉尼亚),目前中国内地域(除香港)的轻量应用服务器,联网搜索功能受限。
- 时长:根据自己的需求及预算选择。



第三步:打开访问阿里云百炼大模型控制台,找到密钥管理,单击创建API-Key。

前往轻量应用服务器控制台,找到安装好OpenClaw的实例,进入「应用详情」放行18789端口、配置百炼API-Key、执行命令,生成访问OpenClaw的Token。
- 端口放通:需要放通对应端口的防火墙,单击一键放通即可。
- 配置百炼API-Key,单击一键配置,输入百炼的API-Key。单击执行命令,写入API-Key。
- 配置OpenClaw:单击执行命令,生成访问OpenClaw的Token。
- 访问控制页面:单击打开网站页面可进入OpenClaw对话页面。
1.2 MacOS 部署
brew install node git python3 docker
open -a Docker
npm install -g openclaw@latest
openclaw init --sandbox enable --workdir ~/.openclaw
openclaw config set gateway.bind loopback
openclaw gateway start
1.3 Linux 部署
sudo apt update
sudo apt install nodejs npm git python3 docker.io -y
sudo systemctl start docker
sudo usermod -aG docker $USER
npm install -g openclaw@latest
openclaw init --sandbox enable
openclaw gateway start
1.4 Windows11 部署(管理员PowerShell)
winget install OpenJS.NodeJS
winget install Git.Git
winget install Python.Python.3.11
npm install -g openclaw@latest
openclaw init --sandbox enable --workdir C:\Users\你的用户名\.openclaw
openclaw config set gateway.bind loopback
openclaw gateway start
二、阿里云百炼 Coding Plan API 免费模型配置(2026)
阿里云百炼提供免费额度,是OpenClaw最稳定、低延迟的模型方案。
2.1 获取API Key
阿里云百炼 → Coding Plan → API管理 → 生成密钥
阿里云百炼Coding Plan API-Key 获取、配置保姆级教程:
创建API-Key,推荐访问订阅阿里云百炼Coding Plan,阿里云百炼Coding Plan每天两场抢购活动,从按tokens计费升级为按次收费,可以进一步节省费用!
- 购买后,在控制台生成API Key。注:这里复制并保存好你的API Key,后面要用。

- 回到轻量应用服务器-控制台,单击服务器卡片中的实例 ID,进入服务器概览页。

- 在服务器概览页面单击应用详情页签,进入服务器详情页面。

- 端口放通在OpenClaw使用步骤区域中,单击端口放通下的执行命令,可开放获取OpenClaw 服务运行端口的防火墙。

- 这里系统会列出我们第一步中创建的阿里云百炼 Coding Plan的API Key,直接选择就可以。

- 获取访问地址单击访问 Web UI 面板下的执行命令,获取 OpenClaw WebUI 的地址。


2.2 写入配置文件
编辑:~/.openclaw/openclaw.json
{
"models": {
"mode": "merge",
"providers": {
"bailian": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
"apiKey": "你的APIKey",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "通义千问3.5 Plus",
"contextWindow": 1000000,
"maxTokens": 65536
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen3.5-plus"
}
}
}
}
2.3 重启生效
openclaw gateway restart
2.4 测试调用
openclaw chat --prompt "测试模型是否正常"
三、Skill 到底是什么?(2026核心理解)
Skill ≠ 插件
Skill = 给AI看的执行说明书
只需要一个文件夹 + 一个 SKILL.md,AI就能按步骤执行任务。
不需要后台服务
不需要安装运行时
不需要写复杂代码
会Markdown就能开发
最小结构:
skills/
└── 你的技能名/
└── SKILL.md
复杂结构(可选):
skills/
└── trend-scout/
├── SKILL.md
├── scripts/
│ └── run.sh
└── references/
└── source.md
默认存放路径:~/.openclaw/workspace/skills/
放入后重启网关即可自动识别,无需注册、无需配置。
四、SKILL.md 标准结构(必须掌握)
一个完整Skill分为三部分:
4.1 frontmatter(必备)
定义技能名称、用途、适用场景、不适用场景。
---
name: daily-brief
description: >
每天早上8点生成上海天气+V2EX热帖简报。
Use when: 用户说“今日简报”,或定时触发。
NOT for: 详细天气预报、新闻深度分析。
---
关键点:必须写 NOT for,否则AI会乱触发。
4.2 When to Run(触发条件)
## When to Run
- 用户说“今日简报”“今天热点”
- 每天早上8点通过cron触发
- 需要快速了解今日热点时
4.3 Workflow(执行流程,核心)
步骤越具体,AI执行越准。
写命令,不写意图。
## Workflow
1. 获取上海天气:
curl "https://wttr.in/Shanghai?format=3"
2. 获取V2EX热门前5条:
curl https://www.v2ex.com/api/topics/hot.json
3. 按指定格式整理
4. 推送给用户
4.4 Output Format(输出格式)
明确格式,AI会严格遵守:
## Output Format
📅 {日期}
🌤 天气:{天气结果}
🔥 V2EX热门:
1. {标题}({节点})
2. {标题}({节点})
五、10分钟开发第一个Skill:daily-brief
实战:每天早上8点推送天气+V2EX热帖
5.1 创建目录
mkdir -p ~/.openclaw/workspace/skills/daily-brief
touch ~/.openclaw/workspace/skills/daily-brief/SKILL.md
5.2 编写 SKILL.md
---
name: daily-brief
description: >
每日早报,上海天气 + V2EX热帖。
Use when: 用户需要简报,或早上8点定时执行。
NOT for: 专业气象预报、长内容新闻。
---
# Daily Brief
## When to Run
- 每天 8:00 AM
- 用户说“今日简报”
## Workflow
1. 执行命令获取天气:
curl "https://wttr.in/Shanghai?format=3"
2. 拉取V2EX热门:
curl https://www.v2ex.com/api/topics/hot.json
3. 提取前5条标题与节点
4. 按格式输出
## Output Format
📅 今日简报
🌤 天气:{
天气}
🔥 V2EX热帖:
1. {
title}({
node})
2. {
title}({
node})
5.3 重启网关生效
openclaw gateway restart
5.4 测试使用
openclaw chat --prompt "使用daily-brief生成今日简报"
5.5 设置每日定时任务
openclaw cron add \
--name "早报" \
--cron "0 8 * * *" \
--tz "Asia/Shanghai" \
--session main \
--message "生成今日简报"
六、进阶:带脚本的 Skill 开发(实战trend-scout)
适合批量抓取、API调用、数据清洗等复杂任务。
6.1 目录结构
trend-scout/
├── SKILL.md
├── scripts/
│ └── scan-trends.sh
└── references/
└── sources.md
6.2 脚本示例 scan-trends.sh
#!/bin/bash
OUTPUT="/tmp/trend"
mkdir -p $OUTPUT
# V2EX
curl -s https://www.v2ex.com/api/topics/hot.json | python3 -c "
import json,sys
d = json.load(sys.stdin)
res = []
for x in d[:10]:
res.append({'t':x.get('title'),'n':x.get('node',{}).get('title')})
print(json.dumps(res,ensure_ascii=False,indent=2))
" > $OUTPUT/v2ex.json
# HN
curl -s https://hacker-news.firebaseio.com/v0/topstories.json | python3 -c "
import json,sys,urllib.request
ids = json.load(sys.stdin)[:10]
res = []
for id in ids:
u = f'https://hacker-news.firebaseio.com/v0/item/{id}.json'
it = json.load(urllib.request.urlopen(u))
if it and it.get('type')=='story':
res.append({'t':it.get('title'),'s':it.get('score')})
print(json.dumps(res,ensure_ascii=False,indent=2))
" > $OUTPUT/hn.json
6.3 赋予执行权限
chmod +x ~/.openclaw/workspace/skills/trend-scout/scripts/scan-trends.sh
6.4 在SKILL.md中调用
## Workflow
1. 读取 references/sources.md 数据源
2. 执行脚本:
scripts/scan-trends.sh
3. 读取 /tmp/trend/*.json
4. 过滤选题
5. 输出结果
七、Skill 调试方法(90%问题都能解决)
7.1 AI不触发Skill
• description写得太模糊
• 没写 NOT for
• 目录结构错误
• 未重启网关
解决:
openclaw gateway restart
7.2 脚本无法运行
• 无执行权限
• 依赖未安装
• 路径错误
修复:
chmod +x 脚本路径
7.3 强制调用指定Skill
openclaw chat --prompt "使用daily-brief技能生成简报"
7.4 查看运行日志
openclaw logs --tail 100
八、发布到 ClawHub 让别人使用
npm install -g clawhub
cd ~/.openclaw/workspace/skills/daily-brief
clawhub init
clawhub login
clawhub publish
发布后别人可一键安装:
npx clawhub install daily-brief
九、Skill 开发最实用技巧
- 流程写命令,不写抽象描述
- 必须写 NOT for
- Output Format 越详细越好
- 大段参考文件放入 references/
- 脚本先手动运行测试再给AI调用
- 不要硬编码API Key、密码
- 使用环境变量存储私密信息
十、阿里云百炼API常见问题
10.1 401 invalid api-key
• API Key错误
• 未开通Coding Plan
• 密钥权限不足
解决:重新生成密钥
10.2 404 not found
baseUrl错误:https://coding.dashscope.aliyuncs.com/v1
10.3 模型不存在
模型ID填写:qwen3.5-plus
10.4 本地可用云端不可用
云端防火墙需放行443端口
十一、OpenClaw部署常见问题
11.1 端口18789无法访问
• 安全组未放行
• gateway.bind未设置0.0.0.0
• 云服务商防火墙拦截
11.2 AI经常失忆
• 未安装memory技能
• 未开启备份
openclaw plugin install memory
11.3 系统不稳定、崩溃
• 未安装skill-commons
openclaw plugin install skill-commons
11.4 无法安装第三方Skill
• 版本过低
npm install -g openclaw@latest
十二、总结
2026年OpenClaw的真正竞争力,在于人人可定制Skill。
Skill不是插件,是AI的执行工作流;
不用代码,不用API,会Markdown就能开发;
10分钟就能做出天气、热帖、选题、自动化、运营、写作类技能。
配合阿里云百炼免费大模型,再加上阿里云/本地稳定部署,你可以打造完全属于自己的AI生产力系统,让AI按你的规则执行任务,真正实现自动化、批量化、智能化。