Learn-skills.dev gov_openclaw_json
Controlled OpenClaw platform config change with backup, validation, and rollback.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/adamchanadam/openclaw-workspace-governance/gov_openclaw_json" ~/.claude/skills/neversight-learn-skills-dev-gov-openclaw-json && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/data/skills-md/adamchanadam/openclaw-workspace-governance/gov_openclaw_json" ~/.openclaw/skills/neversight-learn-skills-dev-gov-openclaw-json && rm -rf "$T"
manifest:
data/skills-md/adamchanadam/openclaw-workspace-governance/gov_openclaw_json/SKILL.mdsource content
/gov_openclaw_json
Purpose
Handle OpenClaw platform control-plane changes safely. Default target is
~/.openclaw/openclaw.json.
Common governance profile:
- Ensure
keeps existing trusted ids and includesplugins.allow
.openclaw-workspace-governance - Manage governance runtime policy for unknown future commands:
plugins.entries[].config.runtimeGatePolicy.allowShellPrefixesplugins.entries[].config.runtimeGatePolicy.allowShellRegexplugins.entries[].config.runtimeGatePolicy.denyShellPrefixesplugins.entries[].config.runtimeGatePolicy.denyShellRegex
Allowed scope (hard)
~/.openclaw/openclaw.json
only when plugin install/enable/disable/uninstall requires it~/.openclaw/extensions/
Not in scope (hard)
- Brain Docs (
,USER.md
,IDENTITY.md
,TOOLS.md
,SOUL.md
,MEMORY.md
,HEARTBEAT.md
)memory/*.md - Normal workspace coding/docs files under
<workspace-root> - If request is non-platform file change, re-route to normal Mode C lifecycle (
)PLAN -> READ -> CHANGE -> QC -> PERSIST - For conservative Brain Docs behavior hardening, route to
(single entry; preview by default, then approved apply if needed).gov_brain_audit
Required workflow (hard)
- Classify request as Mode C governance change.
- Output
first (no writes before PLAN + READ).PLAN GATE - Pre-modification config reference check (before any change):
a. Search local workspace for OpenClaw documentation:
- check
directory for relevant OpenClaw skill docs or config referencesskills/ - check for any local
plugin docs, release notes, or official reference materials b. If local docs do not contain the needed config reference for the requested change:openclaw-doc - read official docs:
https://docs.openclaw.ai/ - check official releases for version-sensitive info:
https://github.com/openclaw/openclaw/releases - check official repo for config structure reference:
c. If web fetch tool is not available (not configured or restricted in this OpenClaw instance), log the limitation and proceed with local-only verification + operator confirmation of intended config values. d. If verification cannot be completed (no local docs and no web fetch), report uncertainty and required next check; do not infer config structure or valid values. e. Includehttps://github.com/openclaw/openclaw/
in output: which source was used (local docs / official web / operator-confirmed / unverified).CONFIG_REF_SOURCE
- check
- Read governance files + target platform file before changing.
- Create workspace-local backup first:
archive/_platform_backup_<ts>/...
- Confirm expected old value exists before patching.
- Apply minimal patch only to approved keys/sections.
- For
alignment:plugins.allow- if
is missing/non-array, create it as arrayplugins.allow - append
only if missingopenclaw-workspace-governance - preserve existing ids and order; do not drop unrelated trusted ids
- if
- For
alignment:runtimeGatePolicy- keep existing rules unless operator explicitly removes them
- add only requested allow/deny prefixes/regex entries
- do not widen scope beyond operator intent
- For
- Validate result:
- preferred:
openclaw config check - fallback: read-back evidence of changed keys/sections
- preferred:
- If validation fails: rollback from backup and stop.
- Persist evidence:
- run report in
_runs/ - update
_control/WORKSPACE_INDEX.md - include before/after excerpts + backup path
Input contract
If request does not provide enough detail, ask for missing fields before any patch:
- target path/key path
- expected old value
- new value
- whether restart is allowed if required Exception:
- If operator intent is clearly "align plugin allowlist for governance setup/upgrade", use built-in profile above without forcing extra prompts.
- If operator intent is clearly "unblock a governance false block for official/new custom command", use built-in runtimeGatePolicy profile above without forcing extra prompts.
Output contract
Always report:
- workspace root
(exact paths)FILES_READ
(exact paths)TARGET_FILES_TO_CHANGE
(one of:CONFIG_REF_SOURCE
/local docs
/official web
/operator-confirmed
)unverified- target platform path
- backup path
- changed key paths
- validation result
- rollback result (if triggered)
:NEXT STEP (Operator)- if PASS and change touched
:plugins.allow
(fallback:/gov_setup check
)/skill gov_setup check - if PASS and change touched
:runtimeGatePolicy
, then retry original commandopenclaw gateway restart - if PASS and no allowlist change:
(fallback:/gov_audit
)/skill gov_audit - if FAIL/BLOCKED: one unblock action + retry command
- if PASS and change touched
- Use branded output format (match
style):formatCommandOutput
- First line:
🐾 OpenClaw Governance · /gov_openclaw_json
dividers between sections─────────────────────────────────- Status line:
/✅ STATUS
/⚠️ STATUS
(emoji prefix, then status value on next line)❌ STATUS - Bullet items:
prefix (not•
)- - Next step:
prefix on action text👉 - Commands: indented with 2 spaces (no
label)COMMAND TO COPY
Fallback
- If slash command is unavailable or name-collided, use:
/skill gov_openclaw_json