360 Secure SkillHub
360 安全技能中心

Configure Tools

该 Skill 指导为 OpenClaw 设置全局、单代理或按提供者的工具策略,选择 profile 或 allow/deny,配置 exec 安全与审批,启用插件工具,并给出应用配置和检查清单。

kjvarga
kjvarga
热度 61.14
最近更新 2026-05-11 17:34:06
分类:安全依赖:读写文件 / MCP 服务应用场景:工作流 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add configure-tools
Metadata
name
configure-tools
description
Configure OpenClaw tool policies, exec security, and per-agent tool restrictions. Use when asked to set up tool access for an agent, restrict tools, configure exec security or approvals, set up a tool profile, enable plugin tools, or lock down an agent's capabilities.
verified-against
2026.3.2

Configure Tools

Set up tool policies and security following conventions/tools.md. Read the convention first for profiles, groups, exec security options, and policy layering rules.

Decision Flow

  1. What scope?

    • Global (all agents) → tools.* in openclaw.json
    • Single agent → agents.list[].tools.*
    • Single provider/model → tools.byProvider.* or agents.list[].tools.byProvider.*
  2. Start with a profile or build custom?

    • Agent fits a standard role → use a profile (full, coding, messaging, minimal)
    • Agent needs a specific tool mix → use explicit allow/deny with group:* shorthands
  3. Does exec need configuration?

    • Agent runs shell commands → configure host, security, ask (see convention for options)
    • Agent should not run shell commands → deny group:runtime

Config Syntax

Set a profile

// Global
{ tools: { profile: "coding" } }

// Per-agent
{ agents: { list: [{ id: "<agent-id>", tools: { profile: "messaging" } }] } }

Fine-tune with allow/deny

Use group:* shorthands (listed in conventions/tools.md) over individual tool names. Deny wins over allow.

// Profile + deny specific groups
{ id: "<agent-id>", tools: { profile: "coding", deny: ["group:ui", "group:web"] } }

// Profile + allow extras
{ id: "<agent-id>", tools: { profile: "messaging", allow: ["web_search"] } }

// Explicit allow (no profile)
{ id: "<agent-id>", tools: { allow: ["read", "session_status", "memory_search"] } }

Enable plugin tools

Use alsoAllow (additive, safe) rather than replacing the allowlist:

{ tools: { alsoAllow: ["lobster", "llm-task"] } }

Configure exec security

// Sandboxed (safest)
{ tools: { exec: { host: "sandbox", security: "deny" } } }

// Gateway with approvals (most agents)
{ tools: { exec: { host: "gateway", security: "allowlist", ask: "on-miss" } } }

// Trusted main agent (wide open)
{ tools: { exec: { host: "gateway", security: "full", ask: "off" } } }

Restrict by provider

{ tools: { byProvider: { "google/gemini-2.5-flash": { profile: "coding" } } } }

Apply Changes

Use the gateway tool:

{ "tool": "gateway", "action": "config.patch", "patch": { "tools": { ... } } }

Or edit ~/.openclaw/openclaw.json directly and restart the Gateway.

Post-Configuration Checklist

  • Non-main agents use least-privilege tool access (profile or explicit allow)
  • Exec security configured appropriately (host, security, ask)
  • No interpreter binaries (python3, node, bash) in tools.exec.safeBins
  • Plugin tools explicitly opted in via alsoAllow where needed
  • Provider-specific restrictions set for less capable models if applicable
  • Configuration applied and verified