1. 为什么你的 OpenClaw 装了技能却跑不起来
很多人第一次接触 OpenClaw(小龙虾)时,都会经历同一个落差:面板里技能装了一排,ClawHub 里看着也挺热闹,可真到用的时候,要么指令发出去没反应,要么 Gateway 日志里报一堆路由找不到、插件未注册。问题往往不在技能本身,而在于技能插件、ClawHub 清单、Gateway 路由这三者没有对齐。
OpenClaw 小龙虾的核心竞争力确实在技能插件拓展:启用文件整理、办公自动化、浏览器操控、系统运维、内容加工这些能力之后,它就不再只是聊天,而是能真正动手干活。但“能装”和“能稳定调用”是两回事。我实测下来,卡点集中在三处:插件注册项写错命名空间、Gateway 路由没热加载、技能依赖的运行时权限没开。
这篇就围绕十五类常用技能,给你一套可复制的配置骨架和逐项验证动作。适合已经装好 OpenClaw、想搭一套可复用技能体系的开发者。读完之后,你应该能在本地完成从安装、注册、路由到调用的完整闭环,而不是停在“装上了但不会用”。
2. 前置准备:TaoToken 接入与 Gateway 基础环境
在配技能之前,先把模型调用链路打通。OpenClaw 的技能执行最终要落到模型推理上,所以你需要一个稳定的 API 入口。我这边用的是 TaoToken,官网 https://taotoken.net/?utm_source=taotoken_aicg_blog_end&utm_medium=csdn&utm_campaign=rewrite&utm_content= ,API 地址是 https://taotoken.net/api 。
第一步,去控制台创建密钥。打开 https://taotoken.net/console?utm_source=taotoken_aicg_blog_end&utm_content=console&utm_campaign=rewrite ,在 API Keys 页面生成一个 key,复制保存。这个 key 后面要写进 OpenClaw 的模型配置里。
第二步,确认 Gateway 版本。OpenClaw 的技能加载依赖 Gateway 服务,建议用较新的版本,老版本对插件热加载支持不完整。终端执行:
openclaw gateway --version如果版本过低,先升级再继续,否则后面注册插件时会出现“路由已存在但未生效”的怪现象。
第三步,准备技能目录。OpenClaw 默认从~/.openclaw/skills读取本地技能,ClawHub 安装的技能也会落到这里。先建好目录结构:
mkdir -p ~/.openclaw/skills mkdir -p ~/.openclaw/config第四步,把模型配置写进~/.openclaw/config/model.yaml,指向 TaoToken 的 API:
provider: openai-compatible base_url: https://taotoken.net/api api_key: sk-你的TaoToken密钥 model: claude-sonnet-4-20250514 timeout: 60这里 base_url 不要带多余路径,OpenClaw 会自己拼接/v1/chat/completions。写完后用一条最小请求验证模型通不通:
curl https://taotoken.net/api/v1/chat/completions \ -H "Authorization: Bearer sk-你的TaoToken密钥" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet-4-20250514","messages":[{"role":"user","content":"ping"}]}'返回里有正常 content 就说明链路 OK。这一步别跳过,后面技能报错时你能快速判断是模型问题还是插件问题。
3. 十五类技能的配置骨架与 Gateway 路由注册
十五类技能按场景分五组:文件管理、办公自动化、浏览器自动化、系统工具、内容处理。每一类在 OpenClaw 里都是一个插件,需要在skills.yaml里注册,并在 Gateway 路由表里挂上入口。
先看整体配置文件~/.openclaw/config/skills.yaml的骨架:
gateway: host: 127.0.0.1 port: 18789 hot_reload: true skills: - name: file-organizer namespace: file entry: ./skills/file-organizer/index.js enabled: true - name: file-search namespace: file entry: ./skills/file-search/index.js enabled: true - name: file-rename namespace: file entry: ./skills/file-rename/index.js enabled: true - name: office-automation namespace: office entry: ./skills/office-automation/index.js enabled: true - name: pdf-toolkit namespace: office entry: ./skills/pdf-toolkit/index.js enabled: true - name: mail-agent namespace: office entry: ./skills/mail-agent/index.js enabled: true - name: web-scraper namespace: browser entry: ./skills/web-scraper/index.js enabled: true - name: form-filler namespace: browser entry: ./skills/form-filler/index.js enabled: true - name: web-operator namespace: browser entry: ./skills/web-operator/index.js enabled: true - name: system-monitor namespace: system entry: ./skills/system-monitor/index.js enabled: true - name: system-cleaner namespace: system entry: ./skills/system-cleaner/index.js enabled: true - name: task-scheduler namespace: system entry: ./skills/task-scheduler/index.js enabled: true - name: text-summarizer namespace: content entry: ./skills/text-summarizer/index.js enabled: true - name: copywriter namespace: content entry: ./skills/copywriter/index.js enabled: true - name: batch-text namespace: content entry: ./skills/batch-text/index.js enabled: true关键点在于namespace。Gateway 路由是按命名空间分发的,比如file.organize、office.pdf.convert、browser.scrape。命名空间写错,调用时就会报route not found。
Gateway 路由注册项单独放在~/.openclaw/config/routes.yaml:
routes: - path: /skill/file/organize target: file-organizer method: POST - path: /skill/file/search target: file-search method: POST - path: /skill/file/rename target: file-rename method: POST - path: /skill/office/doc target: office-automation method: POST - path: /skill/office/pdf target: pdf-toolkit method: POST - path: /skill/office/mail target: mail-agent method: POST - path: /skill/browser/scrape target: web-scraper method: POST - path: /skill/browser/form target: form-filler method: POST - path: /skill/browser/operate target: web-operator method: POST - path: /skill/system/monitor target: system-monitor method: POST - path: /skill/system/clean target: system-cleaner method: POST - path: /skill/system/schedule target: task-scheduler method: POST - path: /skill/content/summary target: text-summarizer method: POST - path: /skill/content/copy target: copywriter method: POST - path: /skill/content/batch target: batch-text method: POST这里有个容易踩的坑:target必须和skills.yaml里的name完全一致,大小写敏感。我见过有人写成FileOrganizer,结果 Gateway 启动不报错,但调用时一直 404。
配置写完后重启 Gateway:
openclaw gateway restart openclaw gateway statusstatus里应该能看到 15 个技能全部loaded。如果有failed,先看日志:
tail -n 50 ~/.openclaw/logs/gateway.log日志会直接告诉你哪个插件的 entry 路径不对,或者依赖没装。
4. 逐项验证:从文件整理到内容处理的调用实测
配置只是骨架,真正要确认的是每个技能能被调起来。下面按五组给你可复制的验证命令。
文件管理组,先测文件整理:
curl -X POST http://127.0.0.1:18789/skill/file/organize \ -H "Content-Type: application/json" \ -d '{"path":"~/Desktop","rule":"by_ext"}'返回里应该有moved字段,列出被移动的文件数。如果返回route not found,回去检查 routes.yaml 的 path 和 skills.yaml 的 namespace 是否一致。
文件搜索和批量重命名同理,把 path 换成目标目录即可。搜索支持模糊匹配,重命名支持{date}_{index}这种模板。
办公自动化组,测 PDF 转换:
curl -X POST http://127.0.0.1:18789/skill/office/pdf \ -H "Content-Type: application/json" \ -d '{"action":"to_word","input":"~/docs/report.pdf","output":"~/docs/report.docx"}'Office 自动化技能依赖本地已安装的 WPS 或 LibreOffice,没装的话会返回dependency missing。这是环境问题,不是配置问题。
浏览器自动化组,测网页采集:
curl -X POST http://127.0.0.1:18789/skill/browser/scrape \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com","selector":"h2","limit":20,"output":"~/data/result.csv"}'这个技能会启动本地浏览器实例,首次运行可能慢几秒。返回里应该有rows和output路径。
系统工具组,测状态检测:
curl -X POST http://127.0.0.1:18789/skill/system/monitor \ -H "Content-Type: application/json" \ -d '{"metrics":["cpu","memory","disk"]}'返回是 JSON 格式的实时占用率。定时任务技能支持 cron 表达式,测的时候先用短周期:
curl -X POST http://127.0.0.1:18789/skill/system/schedule \ -H "Content-Type: application/json" \ -d '{"cron":"*/5 * * * *","task":"clean_temp"}'内容处理组,测文本摘要:
curl -X POST http://127.0.0.1:18789/skill/content/summary \ -H "Content-Type: application/json" \ -d '{"text":"你的长文本...","max_length":200}'这个技能会走模型推理,所以前面 TaoToken 的配置必须通。如果返回 401,说明 key 或 base_url 有问题,回到第 2 节重新验证。
十五类技能全部验证通过后,你可以组合下发复合指令。比如“整理桌面文件、归类下载目录、扫描清理系统垃圾、生成当日工作日志”,OpenClaw 会按顺序串联执行。这时候你才真正体会到技能体系的价值。
5. 本篇常见报错与排查清单
报错一:route not found。九成是 namespace 和 path 不匹配。检查 skills.yaml 里的 namespace 是否和 routes.yaml 的 path 前缀一致。改完记得openclaw gateway restart,热加载有时不生效。
报错二:plugin entry not found。entry 路径写的是相对路径,但 Gateway 的工作目录不是~/.openclaw。建议全部改成绝对路径,比如/Users/你的用户名/.openclaw/skills/file-organizer/index.js。
报错三:dependency missing。办公自动化和浏览器自动化技能依赖外部程序。PDF 处理需要 LibreOffice 或 WPS,浏览器操控需要本地 Chrome。缺什么装什么,装完重启 Gateway。
报错四:模型返回 401 或超时。先单独用 curl 测 TaoToken 的 API,确认 key 有效。如果 curl 通但 OpenClaw 不通,检查 model.yaml 里 base_url 是否多写了/v1。正确写法是https://taotoken.net/api,不要带后缀。
报错五:技能加载了但调用无响应。看 Gateway 日志里有没有timeout。浏览器采集和 PDF 转换耗时较长,默认超时可能不够。在 skills.yaml 对应技能下加timeout: 120。
报错六:热加载后旧路由还在。Gateway 的 hot_reload 对删除的路由支持不好。改完配置直接restart,别依赖热加载。
排查顺序建议:先看 Gateway 日志,再看技能 entry 是否存在,最后测模型链路。三步走完,基本能定位到具体环节。
6. 技能体系跑通之后怎么继续用
十五类技能配完,你的 OpenClaw 已经能覆盖文件、办公、浏览器、系统、内容五大场景。接下来可以做的,是把高频组合固化成自己的指令模板,比如每天早上一条指令触发文件整理加系统检测加日志生成。
如果你还想继续扩展技能,ClawHub 里还有更多插件可以装,安装方式和前面一致:装完在 skills.yaml 注册,在 routes.yaml 挂路由,重启 Gateway。想验证新技能是否正常,用模型对话页面直接发指令最快,打开 https://taotoken.net/model-chat?utm_source=taotoken_aicg_blog_end&utm_content=model-chat&utm_campaign=rewrite 就能测。
长期做编码和 Agent 任务的话,可以考虑 Coding Plan,https://taotoken.net/coding-plan?utm_source=taotoken_aicg_blog_end&utm_content=coding-plan&utm_campaign=rewrite ,配合 OpenClaw 的技能体系能省不少切换成本。接入文档在 https://taotoken.net/doc?utm_source=taotoken_aicg_blog_end&utm_content=doc&utm_campaign=rewrite ,遇到配置细节可以对照查。
最后提醒一句:技能配置改完一定要重启 Gateway,别偷懒用热加载。我踩过的坑里,一半以上都是改了配置没重启,然后对着日志怀疑人生。