created, type, tags, source
OpenClaw Skill 参考
概述
OpenClaw 是一个自托管的 AI 网关,将聊天应用(WhatsApp、Telegram、Discord、Slack、Signal、iMessage 等 20+ 渠道)连接到 AI 编码代理。基于 Node.js 22+,使用 WebSocket 控制平面。
- 配置文件:
~/.openclaw/openclaw.json(JSON5 格式,热重载)
- 默认端口:
18789
- 本地仓库:
C:\Users\yaoji\git\OpenSource\openclaw
- 文档: https://docs.openclaw.ai/
- Claude Code Skill 位置:
~/.claude/skills/openclaw/SKILL.md
Skill 覆盖内容
核心操作
| 模块 |
功能 |
关键命令 |
| Gateway |
启动/停止/重启/状态/服务安装 |
openclaw gateway run/start/stop/restart/status |
| 配置 |
JSON5 配置读写/验证/向导 |
openclaw config get/set/unset/validate |
| Agent |
多 agent 隔离/路由绑定/身份 |
openclaw agents add/bind/unbind/list |
| Session |
会话列表/清理/作用域管理 |
openclaw sessions/cleanup |
通讯渠道
| 模块 |
功能 |
关键命令 |
| Channel |
添加/登录/状态/能力探测 |
openclaw channels add/login/status/capabilities |
| Message |
发送/回复/投票/反应/广播/线程 |
openclaw message send/poll/react/broadcast |
扩展能力
| 模块 |
功能 |
关键命令 |
| Skills |
列出/检查 agent 技能 |
openclaw skills list/info/check |
| Plugins |
安装/启用/更新/卸载 |
openclaw plugins install/enable/update |
| Hooks(内部) |
事件驱动自动化 |
openclaw hooks list/enable/disable |
| Webhooks(外部) |
HTTP 触发 agent |
POST /hooks/wake, POST /hooks/agent |
| Cron |
定时任务 |
openclaw cron add/edit |
API 与集成
- OpenAI 兼容 API:
POST /v1/chat/completions(需开启)
- RPC 调用:
openclaw gateway call <method>
- 25+ 模型提供商: Anthropic、OpenAI、Ollama、OpenRouter、Bedrock 等
关键配置结构
Bootstrap 文件
放在 agent workspace 根目录:
AGENTS.md - 操作指令 + 记忆
SOUL.md - 人格/边界/语气
TOOLS.md - 用户工具说明
BOOTSTRAP.md - 一次性引导(运行后删除)
IDENTITY.md - agent 名称/风格
USER.md - 用户画像
SKILL.md 格式(创建自定义技能)
常见工作流
- 初始化:
npm install -g openclaw@latest && openclaw onboard --install-daemon
- 添加渠道:
openclaw channels add --channel telegram --token TOKEN
- 多 agent:
openclaw agents add work --workspace ~/.openclaw/workspace-work
- API 触发:
curl -X POST http://127.0.0.1:18789/hooks/agent -H 'Authorization: Bearer TOKEN' -d '{"message":"..."}'
- 诊断:
openclaw doctor --fix && openclaw status --deep
Related