Clawdbot ToolsDocumentedScanned
config-guardian
Validate and safeguard OpenClaw config updates (openclaw.json or openclaw config.
Share:
Installation
npx clawhub@latest install config-guardianView the full skill documentation and source below.
Documentation
Config Guardian
Overview
Use this workflow whenever editing~/.openclaw/openclaw.json or running openclaw config set/apply. It prevents invalid config, creates backups, validates against schema, and enables rollback.
Workflow (use every time)
- Confirm the requested change and scope.
- Check for sensitive keys (tokens, credentials).
- Run
scripts/backup_config.sh to create a timestamped snapshot.
- Run
scripts/validate_config.sh.- If validation fails, stop and report.
- Prefer
openclaw config set for small changes.- For complex edits, edit the file directly and keep diffs minimal.
- Run
scripts/validate_config.sh again.- If it fails, restore from backup with
scripts/restore_config.sh.
- If change requires restart, ask for approval first.
- Use
openclaw gateway restart.
Guardrails
- Never restart or apply config without explicit user approval.
- Never remove keys or reorder blocks unless requested.
- Always keep a backup before edits.
- If unsure about schema: run
openclaw doctor --non-interactiveand stop on errors.
Scripts
scripts/backup_config.sh— create timestamped backupscripts/validate_config.sh— validate config via OpenClaw doctorscripts/diff_config.sh— diff current config vs backupscripts/restore_config.sh— restore backup
Validation
- Use
openclaw doctor --non-interactivefor schema validation - This checks against the actual schema that the gateway uses
- Warns about unknown keys, invalid types, and security issues