搜索

PythonReactSEOPDF
OpenClaw

openclaw-config

Edit and validate OpenClaw Gateway config (openclaw.json / JSON5). Use when adding/changing config keys (gateway.*, agents.*, models.*, channels.*, tools.*, skills.*, plugins.*, $include) or diagnosing openclaw doctor/config validation errors, to avoid schema mismatches that prevent the Gateway from starting or weaken security policies.

caopulan0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install caopulan/openclaw-config

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

OpenClaw Config

Overview

Safely edit ~/.openclaw/openclaw.json (or the path set by OPENCLAW_CONFIG_PATH) using a schema-first workflow. Validate before and after changes to avoid invalid keys/types that can break startup or change security behavior.

Workflow (Safe Edit)

  1. Identify the active config path
  • Precedence: OPENCLAW_CONFIG_PATH > OPENCLAW_STATE_DIR/openclaw.json > ~/.openclaw/openclaw.json
  • The config file is JSON5 (comments + trailing commas allowed).
  1. Get an authoritative schema (do not guess keys)
  • If the Gateway is running: use openclaw gateway call config.schema --params '{}' to fetch a JSON Schema matching the running version.
  • Otherwise: use openclaw/openclaw source-of-truth, primarily:
    • src/config/zod-schema.ts (OpenClawSchema root keys like gateway/skills/plugins)
    • src/config/zod-schema.*.ts (submodules: channels/providers/models/agents/tools)
    • docs/gateway/configuration.md (repo docs + examples)
  1. Apply changes with the smallest safe surface
  • Prefer small edits: openclaw config get|set|unset (dot path or bracket notation).
  • If the Gateway is online and you want "write + validate + restart" in one step: use RPC config.patch (merge patch) or config.apply (replaces the entire config; use carefully).
  • For complex setups, split config with $include (see below).
  1. Validate strictly
  • Run openclaw doctor, then fix issues using the reported path + message.
  • Do not run openclaw doctor --fix/--yes without explicit user consent (it writes to config/state files).

Guardrails (Avoid Schema Bugs)

  • Most objects are strict (.strict()): unknown keys usually fail validation and the Gateway will refuse to start.
  • channels is .passthrough(): extension channels (matrix/zalo/nostr, etc.) can add custom keys, but most provider configs remain strict.
  • env is .catchall(z.string()): you can put string env vars directly under env, and you can also...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/caopulan/openclaw-config
Version
—
Commit
c22d60c5a1c01f847b8152c6b01f6dd676df0f6f
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# OpenClaw Config

## Overview

Safely edit `~/.openclaw/openclaw.json` (or the path set by `OPENCLAW_CONFIG_PATH`) using a schema-first workflow. Validate before and after changes to avoid invalid keys/types that can break startup or change security behavior.

## Workflow (Safe Edit)

1. **Identify the active config path**

- Precedence: `OPENCLAW_CONFIG_PATH` > `OPENCLAW_STATE_DIR/openclaw.json` > `~/.openclaw/openclaw.json`
- The config file is **JSON5** (comments + trailing commas allowed).

2. **Get an authoritative schema (do not guess keys)**

- If the Gateway is running: use `openclaw gateway call config.schema --params '{}'` to fetch a JSON Schema matching the running version.
- Otherwise: use `openclaw/openclaw` source-of-truth, primarily:
  - `src/config/zod-schema.ts` (`OpenClawSchema` root keys like `gateway`/`skills`/`plugins`)
  - `src/config/zod-schema.*.ts` (submodules: channels/providers/models/agents/tools)
  - `docs/gateway/configuration.md` (repo docs + examples)

3. **Apply changes with the smallest safe surface**

- Prefer small edits: `openclaw config get|set|unset` (dot path or bracket notation).
- If the Gateway is online and you want "write + validate + restart" in one step: use RPC `config.patch` (merge patch) or `config.apply` (replaces the entire config; use carefully).
- For complex setups, split config with `$include` (see below).

4. **Validate strictly**

- Run `openclaw doctor`, then fix issues using the reported `path` + `message`.
- Do not run `openclaw doctor --fix/--yes` without explicit user consent (it writes to config/state files).

## Guardrails (Avoid Schema Bugs)

- **Most objects are strict** (`.strict()`): unknown keys usually fail validation and the Gateway will refuse to start.
- `channels` is `.passthrough()`: extension channels (matrix/zalo/nostr, etc.) can add custom keys, but most provider configs remain strict.
- `env` is `.catchall(z.string())`: you can put string env vars directly under `env`, and you can also...

相关技能

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance