OpenClaw Config Field Validator
by @redcontritio
Validate OpenClaw configuration fields against the official Zod schema. Use when reading or writing openclaw.json to check if configuration fields exist and...
clawhub install config-fieldπ About This Skill
name: config-field description: Validate OpenClaw configuration fields against the official Zod schema. Use when reading or writing openclaw.json to check if configuration fields exist and are valid. Covers agents, channels, tools, logging, session configuration with 136+ field definitions.
Config Field Validator
Validate OpenClaw configuration fields against the official Zod schema.
When to Use This Skill
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.primaryValidate entire config file
python3 scripts/validate_config.py /path/to/openclaw.jsonForce schema re-sync
python3 scripts/sync_schema.py --forceCheck 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 --forceGenerate 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 schemaScripts
| Script | Purpose |
|--------|---------|
| validate_field.py | Validate single field |
| validate_config.py | Validate entire config |
| field_info.py | Get field details |
| sync_schema.py | Manage schema sync |
| generate_fields.py | Regenerate field docs |
Common Fields
Agent Configuration
agents.defaults.model.primary - Default model IDagents.defaults.workspace - Workspace pathagents.defaults.timeoutSeconds - Request timeoutagents.defaults.sandbox.mode - Sandbox modeChannel Configuration
channels.telegram.botToken - Telegram bot tokenchannels.discord.token - Discord bot tokenchannels.slack.botToken - Slack bot tokenTools
tools.web.search.enabled - Enable web searchtools.web.search.provider - Search providertools.exec.security - Execution security modeTroubleshooting
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.modelVerify config syntax
python3 scripts/validate_config.py ~/.config/openclaw/openclaw.json
π‘ Examples
# Validate a single field (auto-syncs schema if needed)
python3 scripts/validate_field.py agents.defaults.model.primaryValidate entire config file
python3 scripts/validate_config.py /path/to/openclaw.jsonForce schema re-sync
python3 scripts/sync_schema.py --forceCheck current schema status
python3 scripts/sync_schema.py --status
π Tips & Best Practices
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.modelVerify config syntax
python3 scripts/validate_config.py ~/.config/openclaw/openclaw.json