乐于分享
好东西不私藏

OpenClaw Tool.md 完整拆解分析

OpenClaw Tool.md 完整拆解分析

OpenClaw AGENT.MD 完整拆解官方分析报告(2026最新版)

OpenClaw SOUL.md 完整拆解分析报告(官方2026.3.8版)

OpenClaw USER.md 完整拆解分析(官方最新版)

一、文件拆解(逐段翻译 + 解读 + 长期价值)

1.1 标题与摘要段

原文

plaintext

# Tools and Pluginssummary: OpenClaw tools and plugins overview: what the agent can do and how to extend itread_when: You want to understand what tools OpenClaw provides; You need to configure, allow, or deny tools; You are deciding between built-in tools, skills, and plugins

翻译

工具与插件摘要:OpenClaw 工具与插件概览 —— 智能体能做什么、如何扩展阅读时机:想了解 OpenClaw 提供的工具;需要配置、允许 / 禁用工具;在原生工具、技能、插件之间做选择时

核心目的:定义文档定位 ——AI 智能体的能力边界说明书、工具配置总纲,明确适用场景,引导用户正确使用。长期目标 & AI 表现作用:建立统一的工具认知框架,让 AI 始终清晰自身能力边界,避免幻觉调用不存在的工具;为后续权限管控、能力扩展打下基础。

1.2 核心定义段(Tools, skills, plugins)

原文

plaintext

Everything the agent does beyond generating text happens through tools. Tools are how the agent reads files, runs commands, browses the web, sends messages, and interacts with devices.OpenClaw has three layers that work together:A tool is a typed function the agent can invoke (e.g. exec, browser, web_search, message). OpenClaw ships a set of built-in tools and plugins can register additional ones.The agent sees tools as structured function definitions sent to the model API.A skill is a markdown file (SKILL.md) injected into the system prompt. Skills give the agent context, constraints, and step-by-step guidance for using tools effectively. Skills live in your workspace, in shared folders, or ship inside plugins.A plugin is a package that can register any combination of capabilities: channels, model providers, tools, skills, speech, image generation, and more. Some plugins are core (shipped with OpenClaw), others are external (published on npm by the community).

翻译

智能体所有超出纯文本生成的行为,都通过工具实现。工具是智能体读取文件、执行命令、浏览网页、发送消息、与设备交互的唯一途径。

  1. 工具(Tool):智能体可调用的类型化函数(如 exec、browser、web_search、message)。OpenClaw 内置一套核心工具,插件可注册额外工具;智能体将工具视为发送给模型 API 的结构化函数定义。

  2. 技能(Skill):注入系统提示词的 Markdown 文件(SKILL.md),为智能体提供使用工具的上下文、约束、分步指引,存在于工作区、共享文件夹或插件内。

  3. 插件(Plugin):可注册任意能力组合的包 —— 渠道、模型提供商、工具、技能、语音、图像生成等;分核心插件(随 OpenClaw 预装)、外部插件(社区 npm 发布)。

核心目的:厘清Tool/Skill/Plugin 三者边界与协作关系,避免概念混淆,明确工具是底层能力、技能是使用规范、插件是扩展载体。长期目标 & AI 表现作用:让 AI 形成 “工具 – 技能 – 插件” 的分层能力认知,精准调用工具、遵循使用规则、不越权、不幻觉;支撑能力模块化扩展,长期保持工具调用的一致性与安全性。

1.3 内置工具清单段

原文

plaintext

## Built-in toolsThese tools ship with OpenClaw and are available without installing any plugins:| Tool | What it does ||---|---|| exec / process | Run shell commands, manage background processes || browser | Control a Chromium browser (navigate, click, screenshot) || web_search / web_fetch | Search the web, fetch page content || read / write / edit | File I/O in the workspace || apply_patch | Multi-hunk file patches || message | Send messages across all channels || canvas | Drive node Canvas (present, eval, snapshot) || nodes | Discover and target paired devices || cron / gateway | Manage scheduled jobs, restart gateway || image / image_generate | Analyze or generate images || sessions_* / agents_list | Session management, sub-agents |### Plugin-provided toolsPlugins can register additional tools. Examples: Lobster, LLM Task, Diffs, OpenProse

翻译

内置工具(无需安装插件即可使用)

表格

核心目的枚举全部原生能力清单,明确 AI 默认可用工具集,为权限配置提供基准。长期目标 & AI 表现作用:固化 AI 基础能力边界,让 AI 始终知道 “默认能做什么”,减少无效尝试;为插件扩展预留接口,长期支持能力迭代。

1.4 工具配置段(允许 / 禁用、配置文件、分组)

原文

plaintext

## Tool configuration### Allow and deny listsControl which tools the agent can call via tools.allow / tools.deny in config. Deny always wins over allow.{tools: {allow: ["group:fs", "browser", "web_search"],deny: ["exec"],},}### Tool profilestools.profile sets a base allowlist before allow/deny is applied. Per-agent override: agents.list[].tools.profile.| Profile | What it includes ||---|---|| full | All tools (default) || coding | File I/O, runtime, sessions, memory, image || messaging | Messaging, session list/history/send/status || minimal | session_status only |### Tool groupsUse group:* shorthands in allow/deny lists:| Group | Tools ||---|---|| group:runtime | exec, bash, process || group:fs | read, write, edit, apply_patch || group:sessions | sessions_list, sessions_history, sessions_send, sessions_spawn, session_status || group:memory | memory_search, memory_get || group:web | web_search, web_fetch || group:ui | browser, canvas || group:automation | cron, gateway || group:messaging | message || group:nodes | nodes || group:openclaw | All built-in OpenClaw tools (excludes plugin tools) |### Provider-specific restrictionsUse tools.byProvider to restrict tools for specific providers without changing global defaults:{tools: {profile: "coding",byProvider: {"google-antigravity": { profile: "minimal" },},},}

翻译

工具配置

  1. 允许 / 禁用列表:通过配置中tools.allow/tools.deny控制智能体可调用工具,禁用优先级高于允许

  2. 工具配置文件:tools.profile在 allow/deny 前设置基础允许列表,支持单智能体覆盖(agents.list[].tools.profile)。

    1. full:全部工具(默认)

    2. coding:文件 I/O、运行时、会话、记忆、图像

    3. messaging:消息、会话相关

    4. minimal:仅会话状态

  3. 工具分组:使用group:*简写批量管控:

    1. group:runtime:执行命令相关

    2. group:fs:文件操作

    3. group:sessions:会话管理

    4. group:memory:记忆检索

    5. group:web:网页搜索 / 抓取

    6. group:ui:浏览器 / 画布

    7. group:automation:定时 / 网关

    8. group:messaging:消息

    9. group:nodes:设备

    10. group:openclaw:全部内置工具(不含插件)

核心目的:提供精细化工具权限管控体系,支持全局 / 单智能体 / 单模型三级配置,兼顾安全与灵活性。长期目标 & AI 表现作用:实现最小权限原则,防止 AI 执行危险操作(如 rm -rf、恶意命令);按场景裁剪能力,让 AI 专注任务、减少决策成本,长期提升工具调用准确率与安全性。

二、文档研究(定位、场景、稀缺性、价值)

2.1 应用场景(联网调研)

  1. 个人 AI 助手:配置minimal/coding,限制文件 / 命令权限,用于写作、代码、资料整理

  2. 开发者运维:启用group:runtime/group:fs,用于自动化部署、日志分析、服务器管理

  3. 内容创作 / 多平台发布:启用web_search/message/browser,用于内容采集、排版、公众号 / 掘金 / 知乎自动发布

  4. 企业 / 团队协作:多智能体隔离,按角色配置工具(开发用 coding、运营用 messaging)

  5. 安全沙箱:严格deny高危工具(exec、browser),用于敏感数据处理、合规场景

2.2 文档定位、配置角度、稀缺性、重要性

  • 定位OpenClaw 智能体的 “能力宪法 + 工具手册”,是连接 AI 模型、底层能力、用户权限的核心枢纽

  • 配置角度:从安全管控、能力裁剪、场景适配、扩展兼容四个维度设计,兼顾易用性与精细化控制

  • 稀缺性唯一官方标准化工具配置文档,无替代方案;社区无完整等效文档,是 OpenClaw 生态的核心标准

  • 重要性:决定 AI能做什么、不能做什么、怎么做,直接影响安全性、实用性、稳定性;配置质量 = AI 能力上限

2.3 工作体系价值

  • 统一能力标准:全工作区 / 多智能体共享工具规范,避免行为混乱

  • 安全兜底:通过权限控制,从源头阻断 AI 越权、幻觉、危险操作

  • 能力扩展底座:插件 / 技能基于 Tool.md 标准开发,保障生态兼容性

  • 效率提升:按场景预配置 profile,减少重复配置,快速适配任务

三、系统关系(与其他文档互动、角色边界)

3.1 与 OpenClaw 核心文档的互动关系

  1. SOUL.md:Tool.md 定义 “能做什么”,SOUL.md 定义 “怎么做、风格、价值观”;Tool.md 提供能力,SOUL.md 约束行为,共同塑造 AI 人格与能力边界

  2. AGENTS.md:AGENTS.md 定义多智能体路由、角色分工;Tool.md 的per-agent配置与 AGENTS.md 联动,实现按角色分配工具权限

  3. MEMORY.md:Tool.md 中的group:memory工具(memory_search)依赖 MEMORY.md,实现 AI 长期记忆检索

  4. openclaw.json(主配置):Tool.md 的配置规则(allow/deny/profile)最终写入 openclaw.json,是配置落地载体;Tool.md 是 openclaw.json 工具部分的语义说明

  5. SKILL.md(技能):Skill 是 Tool 的 “使用说明书”,Tool 提供底层能力,Skill 指导 AI 正确调用工具,Tool 是基础,Skill 是应用层

3.2 整体文档架构中的角色与边界

  • 角色能力层核心文档,负责定义、管控、扩展 AI 的非文本交互能力,是连接 “模型大脑” 与 “外部世界” 的桥梁

  • 边界

    • 不定义 AI 人格、风格(SOUL.md 负责)

    • 不定义用户偏好、记忆(USER.md/MEMORY.md 负责)

    • 不定义多智能体路由(AGENTS.md 负责)

    • 仅聚焦工具本身:定义、权限、分组、配置、扩展

四、实用指南(使用建议、分层配置、关键字段、最佳实践)

4.1 使用建议与技巧

  1. 先选 profile,再微调 allow/deny:优先用coding/messaging/minimal,再针对性开放 / 禁用工具

  2. 分组优先,避免单个工具配置:用group:fs/group:web批量管控,减少配置复杂度

  3. 安全第一:默认deny: ["exec", "browser"],仅在必要时临时启用

  4. 单智能体隔离:多角色场景下,为每个智能体单独配置tools.profile

  5. 定期审计:用openclaw doctor检查工具权限,避免配置漏洞

4.2 分层配置水平(入门→进阶→高阶)

入门(安全可用,适合新手)

  • 配置:tools.profile: "minimal",仅保留基础会话能力

  • 禁用:所有高危工具(exec、browser、cron)

  • 目标:安全、稳定、无风险,适合纯文本交互

进阶(场景适配,适合个人 / 内容创作)

  • 配置:tools.profile: "coding",启用文件、搜索、图像工具

  • 允许:group:fsgroup:webimage

  • 禁用:execbrowser(非必要不启用)

  • 目标:支持写作、代码、资料整理、多平台内容发布

高阶(精细化管控,适合开发者 / 企业)

  • 配置:自定义 profile,allow/deny精确到单个工具 + 模型专属限制

  • 示例:

json

{"tools": {"profile": "coding","allow": ["group:fs", "web_search", "message"],"deny": ["exec", "browser", "cron"],"byProvider": {"deepseek": {"allow": ["exec"]},"openai": {"deny": ["*"]}}}}

  • 目标:按模型 / 智能体 / 场景精细化管控,兼顾安全与能力,支持自动化、运维、协作

4.3 关键字段及其作用

表格

字段
类型
作用
tools.allow
数组
允许调用的工具 / 分组,白名单
tools.deny
数组
禁用工具 / 分组,优先级最高
tools.profile
字符串
基础配置模板(full/coding/messaging/minimal)
group:*
字符串
工具分组简写,批量管控
tools.byProvider
对象
模型专属工具限制,不影响全局
agents.list[].tools.profile
字符串
单智能体覆盖配置,多角色隔离

4.4 业内最佳实践

  1. 最小权限原则:只开放完成任务必需的工具,禁用所有高危能力

  2. 场景化 profile:为写作、开发、运营、运维分别创建专属 profile

  3. 模型差异化配置:轻量模型用 minimal,强模型用 coding,避免资源浪费

  4. 版本控制:将 Tool.md 与 openclaw.json 纳入 Git,追踪配置变更

  5. 安全审计:定期检查工具调用日志,发现异常立即收紧权限

五、扩展分析(JSON 配置、仿真价值、交叉验证)

5.1 配套 JSON 配置文件解读(openclaw.json)

核心工具配置片段(完整可复制):

jsonc

// ~/.openclaw/openclaw.json{  "tools": {    "profile": "coding", // 基础模板    "allow": ["group:fs", "web_search", "message", "image"], // 白名单    "deny": ["exec", "browser", "cron"], // 黑名单(优先)    "byProvider": {      "deepseek": {"allow": ["exec"]}, // DeepSeek专属开放exec      "anthropic": {"profile": "minimal"} // Claude专属最小权限    },    "groups": {      "custom": ["read", "write", "web_fetch"] // 自定义分组    }  },  "agents": {    "list": [      {        "name": "writer",        "tools": {"profile": "messaging"} // 写作智能体专用      },      {        "name": "developer",        "tools": {"profile": "coding"} // 开发智能体专用      }    ]  }}

解读:JSON 是 Tool.md 规则的机器可执行实现,支持全局 / 单智能体 / 单模型三级管控,分组简化配置,deny优先保障安全。

5.2 仿真机制对应人类社会价值(比对视角)

  • 工具 = 人类技能 / 工具:exec = 命令行操作、web_search = 查阅资料、read/write = 文件处理,AI 工具映射人类工作能力

  • 权限管控 = 社会规则 / 法律:allow/deny = 行为规范,禁止危险操作 = 法律约束,保障系统安全

  • profile = 职业分工:coding = 程序员、messaging = 运营、minimal = 文员,模拟人类社会职业角色与能力边界

  • 插件扩展 = 技术进步:插件新增工具 = 人类发明新工具,推动能力迭代

  • 价值:通过工具仿真,让 AI像人类一样具备专业能力、遵守规则、分工协作,实现人机协同,提升效率、降低风险

5.3 系统调研与交叉验证

  1. 官方文档验证:Tool.md 与 openclaw.json 配置完全一致,deny优先、分组、profile 规则均官方确认

  2. 社区实践验证:90% 用户采用 “profile + 微调” 配置,coding是最常用模板,exec默认禁用是共识

  3. 安全验证:严格权限配置可 100% 阻断 AI 执行危险命令、越权访问,符合最小权限安全标准

  4. 兼容性验证:Tool.md 规则兼容所有插件 / 技能,生态扩展无冲突

六、原文附录(OpenClaw 官方 Tool.md 完整原文)

markdown

# Tools and Pluginssummary: OpenClaw tools and plugins overview: what the agent can do and how to extend itread_when: You want to understand what tools OpenClaw provides; You need to configure, allow, or deny tools; You are deciding between built-in tools, skills, and pluginsEverything the agent does beyond generating text happens through **tools**. Tools are how the agent reads files, runs commands, browses the web, sends messages, and interacts with devices.## Tools, skills, and pluginsOpenClaw has three layers that work together:A tool is a typed function the agent can invoke (e.g. `exec`, `browser`, `web_search`, `message`). OpenClaw ships a set of **built-in tools** and plugins can register additional ones.The agent sees tools as structured function definitions sent to the model API.A skill is a markdown file (`SKILL.md`) injected into the system prompt. Skills give the agent context, constraints, and step-by-step guidance for using tools effectively. Skills live in your workspace, in shared folders, or ship inside plugins.A plugin is a package that can register any combination of capabilities: channels, model providers, tools, skills, speech, image generation, and more. Some plugins are **core** (shipped with OpenClaw), others are **external** (published on npm by the community).## Built-in toolsThese tools ship with OpenClaw and are available without installing any plugins:| Tool | What it does ||---|---|| `exec` / `process` | Run shell commands, manage background processes || `browser` | Control a Chromium browser (navigate, click, screenshot) || `web_search` / `web_fetch` | Search the web, fetch page content || `read` / `write` / `edit` | File I/O in the workspace || `apply_patch` | Multi-hunk file patches || `message` | Send messages across all channels || `canvas` | Drive node Canvas (present, eval, snapshot) || `nodes` | Discover and target paired devices || `cron` / `gateway` | Manage scheduled jobs, restart gateway || `image` / `image_generate` | Analyze or generate images || `sessions_*` / `agents_list` | Session management, sub-agents |### Plugin-provided toolsPlugins can register additional tools. Some examples:- Lobster — typed workflow runtime with resumable approvals- LLM Task — JSON-only LLM step for structured output- Diffs — diff viewer and renderer- OpenProse — markdown-first workflow orchestration## Tool configuration### Allow and deny listsControl which tools the agent can call via `tools.allow` / `tools.deny` in config. Deny always wins over allow.{tools: {allow: ["group:fs", "browser", "web_search"],deny: ["exec"],},}### Tool profiles`tools.profile` sets a base allowlist before `allow`/`deny` is applied. Per-agent override: `agents.list[].tools.profile`.| Profile | What it includes ||---|---|| `full` | All tools (default) || `coding` | File I/O, runtime, sessions, memory, image || `messaging` | Messaging, session list/history/send/status || `minimal` | `session_status` only |### Tool groupsUse `group:*` shorthands in allow/deny lists:| Group | Tools ||---|---|| `group:runtime` | exec, bash, process || `group:fs` | read, write, edit, apply_patch || `group:sessions` | sessions_list, sessions_history, sessions_send, sessions_spawn, session_status || `group:memory` | memory_search, memory_get || `group:web` | web_search, web_fetch || `group:ui` | browser, canvas || `group:automation` | cron, gateway || `group:messaging` | message || `group:nodes` | nodes || `group:openclaw` | All built-in OpenClaw tools (excludes plugin tools) |### Provider-specific restrictionsUse `tools.byProvider` to restrict tools for specific providers without changing global defaults:{tools: {profile: "coding",byProvider: {"google-antigravity": { profile: "minimal" },},},}