中文 OpenClaw 插件 — OpenClaw 中文插件
v1.0.0创建和管理 OpenClaw 插件使用 before_prompt_build hook。触发词包括 'create plugin'、'add hook'、'inject context'、'modify gateway',适用于使用 hook 系统扩展 OpenClaw 功能。
运行时依赖
安装命令
点击复制本土化适配说明
中文 OpenClaw 插件 — OpenClaw 中文插件 安装说明: 安装命令:["openclaw skills install chinese-openclaw-plugin"] 该技能用于国内通用相关操作,可能需要相应的平台账号或API密钥
技能文档
🔌 OpenClaw 插件技能
使用 before_prompt_build hook 创建和管理插件
信息 值 版本 1.0.0 — 2026-05-07 状态 运行中
- 目的和范围
使用 OpenClaw hook 系统创建和管理插件。
使用时机 触发器 行动 "创建插件" 初始化新插件 "添加 hook" 注册新 hook "注入上下文" 使用 hook 注入上下文 "修改网关" 配置网关
- Hook 系统
- 创建插件
步骤 2:创建 插件.json { "name": "插件-name", "version": "1.0.0", "hooks": [ { "name": "before_prompt_build", "file": "hooks/before_prompt_build.js" } ], "description": "插件描述" }
步骤 3:创建 Hook 文件 // hooks/before_prompt_build.js 模块.导出s = a同步 function(上下文) { // 添加上下文 上下文.系统Message = "你的系统消息"; // 或修改用户消息 // 上下文.messages[0].content = "修改后的内容"; return 上下文; };
- 注册插件
# 禁用插件 OpenClaw 插件 disable <插件-name>
# 列出所有插件 OpenClaw 插件 列出
- 插件示例
\n当前时间:${now.toISOString()};
return 上下文;
};消息修改插件 模块.导出s = a同步 function(上下文) { // 检查用户消息 if (上下文.messages[0].content.includes("密码")) { // 添加安全警告 上下文.messages[0].content += "\n\n⚠️ 安全提示:请勿分享敏感信息"; } return 上下文; };
- 边缘情况
In Altum Per 插件. 🔌 OpenClaw 插件 v1.0