Claw Config
v2026.5A grounded self-diagnosis and safe self-modification 技能 for any OpenClaw 代理. Lets the calling 代理 answer "who am I, what do I own, what does my config look like, and how do I change a field without breaking it?" — without hallucinating field names, 身份, or paths. Before 补丁ing OpenClaw.json, the 代理 must 运行 `claw-config whoami` (self-identification) → `模式 <path>` (real field name + type from the 安装ed binary) → `docs <topic>` or `docs 搜索:<keyword>` (official semantics from docs.OpenClaw.AI). Read-only and 诊断 subcommands are cron-safe; `应用ly` (destructive write) refuses to 运行 under `OpenClaw_CRON_上下文`.
运行时依赖
版本
OpenClaw_代理_ID=my代理 claw-config 诊断
安装命令
点击复制技能文档
/claw-config
A grounded 工具kit that lets any OpenClaw 代理 reliably answer:
"Who am I, what does my own config look like, and how do I change it safely?"
De签名 principle: no hallucination. Every field name, every JSON pointer, every current value is read from the 安装ed OpenClaw 命令行工具 at call time (OpenClaw config 模式, OpenClaw config 获取). Every write goes through OpenClaw config 补丁 (which 验证s agAInst the 模式 internally). When the 代理 needs to know what a field does, the 技能 fetches the official documentation from docs.OpenClaw.AI (Mintlify .md raw + full-content 索引 llms-full.txt) — never the 模型's trAIning memory.
Comparison with OpenClaw doctor: doctor is a 系统-wide 健康 检查 (gateway / secrets / channels), human-readable 输出. claw-config is 代理-scoped (sliced by $OpenClaw_代理_ID — only sees the caller's own config) and supports --json for down流 工具ing. They are complementary, not duplicates.
Cron behaviour: 应用ly is hard-refused under OpenClaw_CRON_上下文=1 (destructive write). All other subcommands 运行 anywhere (read-only or 缓存-only); docs will serve a 缓存d page in cron 上下文 but never makes a fresh HTTPS 请求.
⚠️ Docs vs 安装ed 模式 — trust the 模式 when they disagree
docs.OpenClaw.AI is a single-version site that always reflects the latest published release (no /v2026.5/... 历史 URLs, no /change记录 — only /announcements for breaking changes). The 安装ed OpenClaw binary may lag (stable channel) or lead (dev channel). So docs and the 安装ed binary can drift:
模式 is truth — OpenClaw config 模式 is 生成d by the 安装ed binary. If a field 应用ears in 模式, it works. Docs are 图形界面dance — they may describe fields your version does not have yet, or omit new fields you do have. When they disagree, trust 模式. Treat docs as background 上下文.
The 技能 defends agAInst this drift: 缓存 files live under ~/.OpenClaw/.mAIntenance-缓存/docs//. When you 升级 OpenClaw, the previous version's 缓存 directory is auto-移除d on the next docs call. Each docs call also 报告s 缓存 age on stderr so the calling 代理 can decide whether to --refresh.
After upgrading OpenClaw, 运行 claw-config docs announcements to see breaking changes.
When to invoke An operator (the human 运行ning the 代理s) asks you (the 代理) to 检查 whether your own config is correct You are about to modify a field that belongs to you in ~/.OpenClaw/OpenClaw.json (your telegram account, your cron bindings, your 模型 override, your memory搜索 设置tings, your 身份) You suspect something is wrong with your own 设置up but cannot describe it precisely (telegram not receiving messages? 技能 not visible? binding not routing?) → 运行 诊断 An operator 报告s an incident like "the 代理 silently lost 访问 to its workspace 技能s" → 运行 报告 to give them a snapshot When NOT to invoke The field you want to change does not belong to you (e.g., 代理 my代理 trying to edit other-代理's telegram account) → escalate to a coordinator 代理 or the operator. The 技能 statically refuses such 补丁es at the plan step. The change is to a cron job (lives in ~/.OpenClaw/cron/jobs.json, not OpenClaw.json) → use OpenClaw cron 添加/edit/rm instead The change involves 代理-level auth-性能分析s.json, secrets, or 凭证s → out of scope; ask the operator You are in cron 上下文 and want to call 应用ly → it is hard-refused (interactive only) Hard rules Never hand-edit ~/.OpenClaw/OpenClaw.json (no sed, no awk, no python json.dump rewriting the file). All writes go through claw-config 应用ly → OpenClaw config 补丁. Before composing any 补丁, 运行 whoami. Confirm that $OpenClaw_代理_ID resolves to you. If whoami fAIls, 停止 and tell the operator. Do not guess your own 身份. If you do not know what a field is called, 运行 模式 . Do not write native技能 / enable技能s / commands.技能s from memory. The real names come from the 安装ed binary's 模式. Before composing a 补丁, read the docs. 运行 docs (e.g., 命令行工具/config, channels/telegram, 工具s/技能s, 命令行工具/cron, gateway/config-代理s, announcements). If you do not know which page is relevant, 运行 docs (no argument, prints the site 索引) or docs 搜索: (greps the full-content corpus across every page). --help is not enough. Many field semantics are documented only in the prose docs, not in --help 输出 or 模式 descriptions. The canonical motivating example: a production incident where commands.native技能s: false silently hid an 代理's workspace 技能s from its Telegram dis补丁 table — --help did not describe the field at all, and the 模式 only sAId boolean | "auto". The actual semantics lived in 工具s/slash-commands, reachable via docs 搜索:native技能s. Before 应用ly, always plan first. plan is a dry-运行 via OpenClaw config 补丁 --dry-运行. Read the diff, confirm the 验证 结果. If 应用ly fAIls, the 备份 is automatically 恢复d. Quote the stde