Pu Cao

OpenClaw Config

AI Agentv0.1.0
By Pu CaoUpdated 2026-05-11openclaw-config@clawhub_caopulan/openclaw-config
Agent Frameworks#Json

According to AlphaMoat, as of 2026-10, OpenClaw Config has 7,858 downloads and 5 stars — ranked by downloads #3,536 among 10,914 AI skills in this ranking, and #471 of 1,632 in AI Agent.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
7.9K
Stars
5
Overall download rank
#3,536
Top 33% overall · Top 29% in AI Agent
PlatformDownloadsStarsComments
ClawHub ↗6.6K5-
SkillHub ↗7.9K5—

Platforms count differently and update at different times.

What this skill does

Finds the active JSON5 config, obtains the schema from the running Gateway or source, makes small edits and runs openclaw doctor. Unknown keys may prevent startup; doctor --fix/--yes needs explicit consent before writing. $include supports modular config: arrays concatenate, depth is limited to 10 and circular includes are rejected. Keep tokens in environment variables or credential files.

Profile published 2026-10-26

What you can do with it

  • Diagnose Gateway configuration validation errors

When to use it

  • When changing OpenClaw config keys or splitting modules

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Check the active config for schema errors and propose minimal edits

Monthly Trend

Downloads7.9K
3.4K5.8K8.2K2026-03 · Downloads 3.7K2026-05 · Downloads 5.8K2026-06 · Downloads 6.0K2026-07 · Downloads 6.3K2026-08 · Downloads 6.4K2026-09 · Downloads 6.7K2026-10 · Downloads 7.9K26-0326-0926-10
Stars5
4562026-03 · Stars 52026-05 · Stars 52026-06 · Stars 52026-07 · Stars 52026-08 · Stars 52026-09 · Stars 52026-10 · Stars 526-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-107.9K—5
2026-096.7K—5
2026-086.4K+2.2%5
2026-076.3K+4.0%5
2026-066.0K+3.4%5
2026-055.8K—5
2026-033.7K—5

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

4.6 KB · ClawHub v0.1.0
---
name: openclaw-config
description: 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.
---

# 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.
Show all (124 lines)

## 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 use `env.vars`.
- **Secrets**: prefer environment variables/credential files. Avoid committing long-lived tokens/API keys into `openclaw.json`.

## $include (Modular Config)

`$include` is resolved before schema validation and lets you split config across JSON5 files:

- Supports `"$include": "./base.json5"` or `"$include": ["./a.json5", "./b.json5"]`
- Relative paths are resolved against the directory of the current config file.
- Deep-merge rules (per implementation):
  - objects: merge recursively
  - arrays: **concatenate** (not replace)
  - primitives: later value wins
- If sibling keys exist alongside `$include`, sibling keys override included values.
- Limits: max depth 10; circular includes are detected and rejected.

## Common Recipes (Examples)

1. Set default workspace

```bash
openclaw config set agents.defaults.workspace '"~/.openclaw/workspace"' --json
openclaw doctor
```

2. Change Gateway port

```bash
openclaw config set gateway.port 18789 --json
openclaw doctor
```

3. Split config (example)

```json5
// ~/.openclaw/openclaw.json
{
  "$include": ["./gateway.json5", "./channels/telegram.json5"],
}
```

4. Telegram open DMs (must explicitly allow senders)

> Schema constraint: when `dmPolicy="open"`, `allowFrom` must include `"*"`.

```bash
openclaw config set channels.telegram.dmPolicy '"open"' --json
openclaw config set channels.telegram.allowFrom '["*"]' --json
openclaw doctor
```

5. Discord token (config or env fallback)

```bash
# Option A: write to config
openclaw config set channels.discord.token '"YOUR_DISCORD_BOT_TOKEN"' --json

# Option B: env var fallback (still recommend a channels.discord section exists)
# export DISCORD_BOT_TOKEN="..."

openclaw doctor
```

6. Enable web_search (Brave / Perplexity)

```bash
openclaw config set tools.web.search.enabled true --json
openclaw config set tools.web.search.provider '"brave"' --json

# Recommended: provide the key via env var (or write tools.web.search.apiKey)
# export BRAVE_API_KEY="..."

openclaw doctor
```

## Resources

Load these when you need a field index or source locations:

- `references/openclaw-config-fields.md` (root key index + key field lists with sources)
- `references/schema-sources.md` (how to locate schema + constraints in openclaw repo)
- `scripts/openclaw-config-check.sh` (print config path + run doctor)

Popular in AI Agent

self-improving agentAI Agent

Records learnings, errors and corrections as Markdown files for later reuse and promotion into workspace memory.

↓ 1.6M★ 4.5Kpskoett
技能发现·Find SkillsAI Agent

Finds skills in local and remote catalogs from a plain-language request and recommends what to install.

↓ 1.6M★ 1.8K桂皮
Agent BrowserAI Agent

A browser-automation command line skill for AI agents.

↓ 1.2M★ 1.0KNicolas Kleiber
Self-Improving + Proactive AgentAI Agent

Turns corrections and self-review into tiered memory and promotes or archives it by use.

↓ 696.4K★ 1.6KIván
Proactive AgentAI Agent

A workspace setup guide for planning proactive follow-up, working memory and review routines for an AI agent.

↓ 579.3K★ 916halthelobster
Skill CreatorAI Agent

A guide to creating and updating effective Claude skills.

↓ 477.3K★ 485chindden
Skill VetterAI Agent

Reviews a third-party skill's source, permissions, and danger patterns against a checklist before it is installed.

↓ 445.2K★ 1.3Kspclaudehome
唐朝诗仙李白 · Ai Agent SkillAI Agent

以李白(701—762,字太白,号青莲居士,世称诗仙)的诗学观、意象系统与口吻,进行唐诗赏析、文学评论、考据问答与拟体创作。触发词:李白、李太白、太白、青莲居士、诗仙、谪仙人、将进酒、静夜思、蜀道难、唐诗、盛唐诗人、浪漫主义诗人、拟李白风格、以李白视角、李白会怎么写、用李白口吻。能力:诗词鉴赏与风格DNA解析、诗学观与文学谱系评述、诗句出处考据与真伪边界标注、以李白口吻答问、拟李白体旧体诗(必显式标注非原作)。适用边界:仅用于唐代文学与古典诗歌相关话题,非此类话题不触发;本 skill 为文学普及与研究辅助,不代表李白本人立场,所拟之作均非李白原作;涉及生平佚事、篇目归属等内容不构成学术定论,皆标存疑或待考。

↓ 435.8K★ 4user_ff4d9420

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.