Agent Skills
› NeverSight/learn-skills.dev
› gov_migrate
gov_migrate
GitHub执行 OpenClaw 工作区治理迁移。自动补全缺失的治理引导文件,严格遵循迁移提示词流程,验证非目标用户文件完整性。处理 Brain Docs 和代码任务的权限路由,并在迁移后建议运行审计命令,确保系统状态合规且安全。
Trigger Scenarios
需要迁移现有 OpenClaw 工作区的治理配置
调用 /gov_migrate 命令
治理引导文件缺失需自动播种并继续迁移
Install
npx skills add NeverSight/learn-skills.dev --skill gov_migrate -g -y
SKILL.md
Frontmatter
{
"name": "gov_migrate",
"metadata": {
"openclaw": {
"emoji": "🛡️"
}
},
"description": "Run workspace governance migration for an already-running OpenClaw workspace.",
"user-invocable": true
}
/gov_migrate
Purpose
Execute the migration workflow defined by:
prompts/governance/WORKSPACE_GOVERNANCE_MIGRATION.md
Hard contract
- If
_control/GOVERNANCE_BOOTSTRAP.md/_control/REGRESSION_CHECK.mdis missing, seed them from canonical payload inprompts/governance/OpenClaw_INIT_BOOTSTRAP_WORKSPACE_GOVERNANCE.md, then continue migration (do not bounce operator back to manual bootstrap path). - Follow the migration prompt exactly (no skipped gates).
2.1 Before execution, validate migration prompt contract at
prompts/governance/WORKSPACE_GOVERNANCE_MIGRATION.md:- Must include anti-precheck clause equivalent to
Do NOT run canonical equality as a pre-change blocker. - Must include required order equivalent to
CHANGE first, then canonical equality at QC. - If either clause is missing, treat workspace prompt as stale and stop with governance remediation:
- primary:
/gov_setup upgradethen/gov_migrate - fallback:
/skill gov_setup upgradethen/skill gov_migrate
- primary:
- Do not run old pre-change canonical precheck flow.
- Must include anti-precheck clause equivalent to
- Preserve non-target user files.
- After migration, instruct operator to run
/gov_audit. - Treat workspace root as runtime-resolved
<workspace-root>; do not hardcode~/.openclaw/workspace. - For OpenClaw system claims (commands/config/plugins/skills/hooks), verify using:
- relevant local skill docs under
skills/ - official docs at
https://docs.openclaw.ai - official releases at
https://github.com/openclaw/openclaw/releasesfor latest/version-sensitive claims - if verification cannot be completed, report uncertainty and required next check; do not infer
- relevant local skill docs under
- For date/time-sensitive claims, verify runtime current time context first (session status).
- If the operator asks to change platform control-plane state (for example
~/.openclaw/openclaw.json), route execution togov_openclaw_jsonand do not patch platform files insidegov_migrate. - Brain Docs routing:
- If the task touches Brain Docs (
USER.md,IDENTITY.md,TOOLS.md,SOUL.md,MEMORY.md,HEARTBEAT.md,memory/*.md), treat read-only asks as Mode B and any write/update as Mode C. - For Brain Docs writes, missing READ evidence is fail-closed.
- For conservative Brain Docs behavior audits/fixes, route to
gov_brain_audit(single entry; preview by default).
- If the task touches Brain Docs (
- Coding-task routing:
- Any request that creates or modifies workspace code/files (for example: build, implement, fix, refactor) is Mode C, even without
/gov_*command wording. - If write intent is uncertain, treat as Mode C (Fail-Closed).
- Canonical self-check behavior:
- If canonical equality check reports mismatch on AUTOGEN core blocks, perform one deterministic repair pass (re-apply canonical AUTOGEN inner content, keep markers unchanged), then re-run equality once before declaring
BLOCKED. - Do not treat pre-change mismatch or historical mismatch run reports as immediate blockers.
- Required sequence: CHANGE first, then canonical equality + optional repair pass at QC.
- Official-flow compatibility SOP (anti-self-lock):
- Treat OpenClaw system operation flows (
openclaw ..., including plugin-added/future commands) and governance lifecycle flows (gov_help,gov_setup quick/check/install/upgrade,gov_migrate,gov_audit,gov_openclaw_json,gov_brain_audit,gov_uninstall quick/check/uninstall) as default ALLOW/ROUTE paths, not generic blocks. - If a hard prerequisite requires block, label it as governance policy gate (not system error) and provide copy-paste unblock commands.
Output requirements
- Include
FILES_READ(exact paths) andTARGET_FILES_TO_CHANGE(exact paths). - If either field is missing, output
BLOCKED (missing read/change evidence)and stop. - Use this output order for UX consistency:
STATUSWHYNEXT STEP (Operator)COMMAND TO COPY
- Always include a final
NEXT STEP (Operator)section. - If migration PASS:
- primary:
/gov_audit - fallback:
/skill gov_audit
- primary:
- If migration FAIL or BLOCKED:
- primary:
fix blocker, then rerun /gov_migrate - fallback:
fix blocker, then rerun /skill gov_migrate
- primary:
Fallback
- If slash command is unavailable or name-collided, use:
/skill gov_migrate
Version History
- e0220ca Current 2026-07-05 23:04


