| name | config-guardian |
| description | Validate and safeguard OpenClaw config updates (openclaw.json or openclaw config set/apply). Use this skill whenever changing gateway config, models, channels, agents, tools, sessions, or routing. Enforces backup, schema validation, and safe rollback before restarts. |
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)
-
Preflight
- Confirm the requested change and scope.
- Check for sensitive keys (tokens, credentials).
-
Backup
- Run
scripts/backup_config.sh to create a timestamped snapshot.
-
Validate (before change)
- Run
scripts/validate_config.sh.
- If validation fails, stop and report.
-
Apply change
- Prefer
openclaw config set <path> <value> for small changes.
- For complex edits, edit the file directly and keep diffs minimal.
-
Validate (after change)
- Run
scripts/validate_config.sh again.
- If it fails, restore from backup with
scripts/restore_config.sh.
-
Restart (only with explicit approval)
- If change requires restart, ask for approval first.
- Use
openclaw gateway restart.