Config Preflight Validator

v1.0.0

OpenClaw 配置预校验工具。在执行 config.patch 或修改 openclaw.json 前进行本地 Schema 验证,提供具体的错误字段描述。

0· 309·2 current·2 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, and the included Python script are consistent: the tool fetches a live schema (via the openclaw CLI), caches it, and runs local validation. The script's use of subprocess to call the 'openclaw' CLI and simple local file I/O is coherent with the stated purpose. Minor note: the SKILL.md examples reference running the script from ~/.openclaw/workspace/.lib but the repo provides scripts/config-preflight-validator.py — a packaging/location mismatch (not a security mismatch).
Instruction Scope
Runtime instructions and the script limit their operations to: calling the 'openclaw gateway config.schema' CLI (optional), reading the specified config file, and reading/writing a schema cache under the user's home (~/.openclaw/...). There are no network calls to external endpoints from the script itself, no access to other parts of the filesystem beyond the explicit cache and user-supplied file path, and no broad, vague instructions that grant the agent discretionary data collection.
Install Mechanism
No install spec (instruction-only) and a single small Python script are provided. This is the lower-risk pattern: nothing is downloaded at install time. The script optionally prefers the jsonschema package for full validation (documented).
Credentials
The skill requests no environment variables or credentials. The script relies on PATH to locate the 'openclaw' CLI and uses the user's home directory for a cache — both are proportional to its purpose. There are no hidden secret accesses.
Persistence & Privilege
The skill does not request persistent or platform-level privileges (always is false). It writes a local schema cache under the user's home directory, which is expected for this functionality and limited in scope. The skill does not change other skills' configs or system-wide settings.
Assessment
This skill appears to do what it says: local schema validation for OpenClaw configs. Before installing or running it, (1) confirm you trust the 'openclaw' CLI that the script may invoke (the script will call it to fetch a schema), (2) note it will create/read a cache at ~/.openclaw/workspace/.lib/openclaw_schema.json, and (3) consider installing the jsonschema package (pip install jsonschema) for stricter validation. Also be aware of the small packaging mismatch: you may need to place the provided script where the SKILL.md examples expect or run it by its explicit path.

Like a lobster shell, security has layers — review code before you run it.

latestvk97f2dexdgj33hc6hyk8tja6ch82a8dr
309downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

🔍 Config Preflight Validator

解决 "Validation issues" 错误信息模糊的问题,在调用网关 API 前给出具体错误字段描述。

🎯 功能特性

  • Schema 同步:自动从 gateway config.schema 获取最新规范。
  • 本地校验:在提交修改前,基于 JSON Schema 验证数据结构。
  • 特定规则检查:针对 plugins.allow 等列表格式、channels 对象格式进行硬编码校验。

🚀 使用方法

校验补丁

python3 ~/.openclaw/workspace/.lib/config-preflight-validator.py --patch '{"plugins": {"allow": ["new-plugin"]}}'

校验完整文件

python3 ~/.openclaw/workspace/.lib/config-preflight-validator.py --file ~/.openclaw/openclaw.json

更新 Schema 缓存

python3 ~/.openclaw/workspace/.lib/config-preflight-validator.py --update-schema

🛠️ 安装要求

  • Python 3.9+
  • 推荐安装 jsonschema (pip install jsonschema)

Comments

Loading comments...