← 返回
开发者工具 中文

OpenClaw Config Field Validator

Validate OpenClaw configuration fields against the official Zod schema. Use when reading or writing openclaw.json to check if configuration fields exist and...
根据官方 Zod schema 验证 OpenClaw 配置字段。在读取或写入 openclaw.json 时用于检查配置字段是否存在以及...
redcontritio
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 809
下载
💾 7
安装
1
版本
#config#latest#openclaw#schema#validation

概述

Config Field Validator

Validate OpenClaw configuration fields against the official Zod schema.

When to Use This Skill

  • Before editing configurations - Verify a field exists before adding it
  • Debugging config errors - Check if invalid fields are causing issues
  • Migrating configs - Validate fields after version upgrades
  • Reviewing configs - Ensure all fields are schema-compliant

How It Works

This skill automatically manages schema synchronization:

  1. Check Version - Detects local OpenClaw version
  2. Sync Schema - Downloads matching schema from GitHub if needed
  3. Generate Fields - Parses Zod schema to extract field definitions
  4. Validate - Uses generated schema to validate configuration

Quick Start

# Validate a single field (auto-syncs schema if needed)
python3 scripts/validate_field.py agents.defaults.model.primary

# Validate entire config file
python3 scripts/validate_config.py /path/to/openclaw.json

# Force schema re-sync
python3 scripts/sync_schema.py --force

# Check current schema status
python3 scripts/sync_schema.py --status

Field Path Format

Field paths use dot notation:

agents.defaults.model.primary              → agents.defaults.model.primary
channels.telegram.botToken                 → channels.telegram.botToken
tools.web.search.provider                  → tools.web.search.provider

Workflow

For Users

Simply use validation commands - schema sync is automatic:

# This will auto-sync schema if version mismatch detected
python3 scripts/validate_field.py agents.defaults.timeoutSeconds

For Schema Management

# Check schema status
python3 scripts/sync_schema.py --status
# Output: Schema version: 2.1.0 (matches OpenClaw)

# Force re-sync (if needed)
python3 scripts/sync_schema.py --force

# Generate fresh field reference
python3 scripts/generate_fields.py

Schema Storage

Schema is cached locally at:

~/.config/openclaw/skills/config-field/
├── schema/              # Downloaded TypeScript schema files
├── cache/               # Parsed schema cache
└── schema-fields.md     # Generated field reference

Reference

Complete Field Reference

references/schema-fields.md - Auto-generated from official Zod schema

Scripts

ScriptPurpose
-----------------
validate_field.py Validate single field
validate_config.py Validate entire config
field_info.py Get field details
sync_schema.pyManage schema sync
generate_fields.pyRegenerate field docs

Common Fields

Agent Configuration

  • agents.defaults.model.primary - Default model ID
  • agents.defaults.workspace - Workspace path
  • agents.defaults.timeoutSeconds - Request timeout
  • agents.defaults.sandbox.mode - Sandbox mode

Channel Configuration

  • channels.telegram.botToken - Telegram bot token
  • channels.discord.token - Discord bot token
  • channels.slack.botToken - Slack bot token

Tools

  • tools.web.search.enabled - Enable web search
  • tools.web.search.provider - Search provider
  • tools.exec.security - Execution security mode

Troubleshooting

Schema Out of Date

If you see warnings about unknown fields that should exist:

# Force schema refresh
python3 scripts/sync_schema.py --force

Validation Errors

# Check field info for correct usage
python3 scripts/field_info.py agents.defaults.model

# Verify config syntax
python3 scripts/validate_config.py ~/.config/openclaw/openclaw.json

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 18:32 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,949
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,650
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,445