← 返回 Skills 市场
redcontritio

OpenClaw Config Field Validator

作者 RedContritio · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
491
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install config-field
功能描述
Validate OpenClaw configuration fields against the official Zod schema. Use when reading or writing openclaw.json to check if configuration fields exist and...
使用说明 (SKILL.md)

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

Script Purpose
validate_field.py \x3Cpath> Validate single field
validate_config.py \x3Cfile> Validate entire config
field_info.py \x3Cpath> 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 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
安全使用建议
This skill appears to do what it claims: validate OpenClaw configuration fields using a local schema. A few things to consider before installing or running it: - SKILL.md suggests the schema may be downloaded from GitHub, but the provided sync_schema.py currently only copies the built-in schema to the user's cache; it does not contact GitHub. If you expect automatic remote sync, that feature is not implemented here. - There is a small implementation bug: scripts/validate_field.py calls a nonexistent load_schema_fields() function (should use load_schema_json()), which can prevent single-field validation from working until fixed. validate_config.py and other modules use the correct loader. - The scripts run a local subprocess (openclaw --version) and may read package.json from common node_modules locations to determine the installed OpenClaw version — this is reasonable for version detection but will fail if OpenClaw isn't installed or the paths differ. - The skill writes cache files under ~/.config/openclaw/skills/config-field/ (schema.json, version.json); review those files if you are concerned about on-disk artifacts. - No credentials, network endpoints, or suspicious behavior were found in the code. Still, as a best practice: inspect the scripts locally, run them in a contained environment (or with a non-production config) the first time, and fix or patch the minor validate_field.py bug if you need single-field validation to work reliably.
功能分析
Type: OpenClaw Skill Name: config-field Version: 1.0.0 The OpenClaw Config Field Validator skill is designed to validate OpenClaw configuration fields against a Zod schema. The Python scripts primarily handle local file operations for schema caching (`~/.config/openclaw/skills/config-field/`), parsing JSON configuration files, and executing `openclaw --version` via `subprocess.run` to determine the local OpenClaw version. While `SKILL.md` mentions downloading schemas from GitHub, the `sync_schema.py` implementation currently only copies a built-in `schema.json` file, which is a safer behavior than implied. There is no evidence of data exfiltration, unauthorized remote command execution from untrusted input, persistence mechanisms, or prompt injection attempts against the agent to perform malicious actions. All operations are aligned with the stated purpose of configuration validation.
能力评估
Purpose & Capability
Name/description match the included Python scripts and built-in schema: scripts validate single fields or whole openclaw.json files and generate a field reference from a Zod-derived schema. Required artifacts (schema.json, scripts) are present and appropriate for the stated purpose.
Instruction Scope
SKILL.md claims automatic schema sync that can 'download matching schema from GitHub if needed', and examples show a curl-based install flow. In the actual scripts, schema synchronization currently copies the built-in schema to the user's cache and does not perform network downloads. The scripts read local OpenClaw version info (via an openclaw --version subprocess call and optional package.json paths) and read/write only under the user's config directory (~/.config/openclaw/skills/config-field). No instructions or code attempt to read unrelated system secrets or transmit data externally.
Install Mechanism
There is no install spec; this is instruction + bundled code. All code is local Python scripts and a built-in schema.json. No downloads-from-remote URLs or extract operations are performed by the provided scripts.
Credentials
The skill requests no environment variables or credentials. It does run a local subprocess 'openclaw --version' and may read package.json from common node_modules paths — both are relevant for determining local OpenClaw version and are proportional to the task. The skill caches data under the user's config directory only.
Persistence & Privilege
The skill stores a cached schema and version JSON under ~/.config/openclaw/skills/config-field/ which is expected for caching. It does not request always:true, does not modify other skills' config, and does not require elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install config-field
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /config-field 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Validate OpenClaw configuration fields against official Zod schema with 136+ field definitions
元数据
Slug config-field
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 491 次。

如何安装 OpenClaw Config Field Validator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install config-field」即可一键安装,无需额外配置。

OpenClaw Config Field Validator 是免费的吗?

是的,OpenClaw Config Field Validator 完全免费(开源免费),可自由下载、安装和使用。

OpenClaw Config Field Validator 支持哪些平台?

OpenClaw Config Field Validator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 OpenClaw Config Field Validator?

由 RedContritio(@redcontritio)开发并维护,当前版本 v1.0.0。

💬 留言讨论