{
  "schemaVersion": "1.0",
  "item": {
    "slug": "safe-config-workflow-zh-cn",
    "name": "Safe Config Workflow",
    "source": "tencent",
    "type": "skill",
    "category": "安全合规",
    "sourceUrl": "https://clawhub.ai/nicoxia/safe-config-workflow-zh-cn",
    "canonicalUrl": "https://clawhub.ai/nicoxia/safe-config-workflow-zh-cn",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/safe-config-workflow-zh-cn",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=safe-config-workflow-zh-cn",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "TEST-GUIDE.md",
      "package.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/safe-config-workflow-zh-cn"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/safe-config-workflow-zh-cn",
    "agentPageUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent",
    "manifestUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "用途",
        "body": "安全修改 OpenClaw 配置文件，自动执行检查、修复、验证、学习反馈流程。"
      },
      {
        "title": "触发条件",
        "body": "当用户要求：\n\n修改配置\n更改 Gateway 设置\n调整渠道配置\n修改模型/会话/认证配置\n任何涉及 ~/.openclaw/openclaw.json 的操作"
      },
      {
        "title": "核心原则",
        "body": "先查文档 — https://docs.openclaw.ai/zh-CN\n先参考 config-validator — 修改前查阅 schema 和有效值\n先确认 — 向用户确认修改内容和影响\n不猜测 — 没文档依据就不做\n要学习 — doctor --fix 后记录教训\n要过滤 — doctor 输出由 AI 过滤，用户只看关键信息"
      },
      {
        "title": "反馈策略（两种结合）",
        "body": "问题类型处理方式示例小问题（拼写错误、格式问题）自己学习 + 记录不麻烦用户，记录到 MEMORY.md重要配置（影响功能、渠道、认证）反馈用户 + 学习让用户知情，避免再次犯错反复出现的错误反馈 + 记录 + 总结形成知识库，永久避免"
      },
      {
        "title": "标准流程（99% 情况）",
        "body": "# 步骤 0: 查阅 config-validator（修改前参考）\n# 确认字段存在和有效值\n# 查看配置示例\n\n# 步骤 1: 修改配置（先向用户确认）\n# 确认模板：\n# 📋 配置修改确认\n# 修改内容：XXX\n# 原因：XXX\n# 影响：XXX\n# 风险：低/中/高\n# 文档依据：https://docs.openclaw.ai/zh-CN/XXX\n# 是否继续？是/否\n\n# 步骤 2: 检查 + 自动修复\nopenclaw doctor --fix\n# AI 内部过滤关键信息：\n# openclaw doctor --fix 2>&1 | grep -E \"Doctor changes|Normalized|Config overwrite|Backup|Invalid\"\n\n# 步骤 3: 对比备份（必须执行！）\ndiff ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak\n# AI 解读 diff，向用户说明修改内容\n\n# 步骤 4: 记录教训（重要！）\n# 把学到的正确配置值记录到 MEMORY.md\n\n# 步骤 5: 等待热重载\nsleep 3\n# 3 秒是合理的：热重载是进程内重启（SIGUSR1），官方设计为快速应用\n\n# 步骤 6: 验证 Gateway 状态\nopenclaw gateway status\n# 确认 Gateway 正常运行"
      },
      {
        "title": "排障流程（如果 Gateway 启动失败）",
        "body": "# Gateway 失败 ≠ 机器人瘫痪！\n# 诊断命令仍然可用，因为它们是检查文件系统，不依赖 Gateway RPC\n\n# 步骤 1: 查看日志，了解失败原因\nopenclaw logs --follow\n# 查看错误信息，例如：\n#   - Config validation failed: XXX\n#   - Port 18789 already in use\n#   - Invalid token format\n\n# 步骤 2: 根据日志手动修复配置\nnano ~/.openclaw/openclaw.json\n# 针对性修复发现的问题\n\n# 步骤 3: 再次尝试启动\nopenclaw gateway restart\n\n# 步骤 4: 再次验证\nopenclaw gateway status"
      },
      {
        "title": "修改前确认",
        "body": "📋 配置修改确认\n\n修改内容：XXX\n原因：XXX\n影响：XXX\n风险：低/中/高\n文档依据：https://docs.openclaw.ai/zh-CN/XXX\n\n是否继续？是/否"
      },
      {
        "title": "doctor --fix 后反馈",
        "body": "AI 向用户反馈的格式（必须遵守）：\n\n✅ 配置检查完成\n\n【修复内容】\n- 字段：channels.telegram.streaming\n- 原值：\"invalid_test_value\"（无效）\n- 新值：\"off\"（有效）\n\n【备份位置】\n~/.openclaw/openclaw.json.bak\n\n【其他警告】（与配置无关，可选处理）\n- Node 版本警告：系统 Node 16.5.0，建议升级到 22+\n- 会话记录缺失：1/2 sessions 缺少 transcript\n\n小问题（不麻烦用户）：\n\n✅ 配置检查完成\n\ndoctor 输出：无问题 / 修复了 XXX（小问题，已自动修复）\n\n已记录到：MEMORY.md\n\n重要配置（反馈用户）：\n\n✅ 配置检查完成\n\n【修复内容】\n- 字段：XXX\n- 原值：\"XXX\"（无效）\n- 新值：\"XXX\"（有效）\n\n【学到的知识】\n- 正确值：XXX\n- 含义：XXX\n- 文档：https://docs.openclaw.ai/zh-CN/XXX\n\n⚠️ 注意：XXX（影响说明）\n\n已记录到：MEMORY.md"
      },
      {
        "title": "验证结果",
        "body": "✅ Gateway 状态正常\n\nRuntime: running\nRPC probe: ok"
      },
      {
        "title": "失败排障",
        "body": "❌ Gateway 启动失败\n\n错误日志：\nXXX（从 logs --follow 获取）\n\n已手动修复：XXX\n正在重启 Gateway...\n\n✅ Gateway 已恢复正常"
      },
      {
        "title": "AI 职责：过滤并总结关键信息",
        "body": "AI 应该执行的过滤（内部处理，用户不需要看）：\n\nopenclaw doctor --fix 2>&1 | grep -E \"Doctor changes|Normalized|Config overwrite|Backup|Invalid\"\n\nAI 向用户反馈时明确分类：\n\n修复项 — Doctor changes、Normalized、Config overwrite\n警告项 — Node 版本、会话记录、Skills 状态等\n\nAI 必须执行的操作：\n\n过滤 doctor 输出，提取关键修复信息\n对比备份文件，解读 diff\n向用户反馈修复内容（字段、原值、新值）\n记录教训到 MEMORY.md\n等待 3 秒后验证 Gateway 状态"
      },
      {
        "title": "安全规则",
        "body": "修改前必须查文档 — https://docs.openclaw.ai/zh-CN\n修改前必须向用户确认 — 即使是你要求的\n绝不猜测字段值 — 没文档依据就不做\n修复后必须学习 — 记录到 MEMORY.md\nGateway 失败仍可排障 — 诊断命令不依赖 Gateway\n输出必须过滤 — 用户只看关键信息，杂项由 AI 处理"
      },
      {
        "title": "已知局限",
        "body": "局限说明应对方案doctor 检测不出端口无效端口号格式正确但值无效时手动验证关键配置Gateway 有保护机制无效配置时自动回滚默认值修复后验证配置已生效Gateway 重启输出不清晰只显示\"missing tool result\"查看 logs --follow 确认"
      },
      {
        "title": "相关文档",
        "body": "官方配置文档：https://docs.openclaw.ai/zh-CN/gateway/configuration\n官方 doctor 文档：https://docs.openclaw.ai/zh-CN/cli/doctor\n官方 Gateway 手册：https://docs.openclaw.ai/zh-CN/gateway/index.md\n官方故障排除：https://docs.openclaw.ai/zh-CN/gateway/troubleshooting\n官方 FAQ：https://docs.openclaw.ai/zh-CN/help/faq.md"
      },
      {
        "title": "版本历史",
        "body": "v1.0 (2026-02-26) — 初始版本，包含完整流程和反馈策略\nv1.1 (2026-02-26) — 更新测试验证后的流程，添加输出过滤规则和已知局限"
      }
    ],
    "body": "安全配置流程 (Safe Config Workflow)\n用途\n\n安全修改 OpenClaw 配置文件，自动执行检查、修复、验证、学习反馈流程。\n\n触发条件\n\n当用户要求：\n\n修改配置\n更改 Gateway 设置\n调整渠道配置\n修改模型/会话/认证配置\n任何涉及 ~/.openclaw/openclaw.json 的操作\n核心原则\n先查文档 — https://docs.openclaw.ai/zh-CN\n先参考 config-validator — 修改前查阅 schema 和有效值\n先确认 — 向用户确认修改内容和影响\n不猜测 — 没文档依据就不做\n要学习 — doctor --fix 后记录教训\n要过滤 — doctor 输出由 AI 过滤，用户只看关键信息\n反馈策略（两种结合）\n问题类型\t处理方式\t示例\n小问题（拼写错误、格式问题）\t自己学习 + 记录\t不麻烦用户，记录到 MEMORY.md\n重要配置（影响功能、渠道、认证）\t反馈用户 + 学习\t让用户知情，避免再次犯错\n反复出现的错误\t反馈 + 记录 + 总结\t形成知识库，永久避免\n执行流程\n标准流程（99% 情况）\n# 步骤 0: 查阅 config-validator（修改前参考）\n# 确认字段存在和有效值\n# 查看配置示例\n\n# 步骤 1: 修改配置（先向用户确认）\n# 确认模板：\n# 📋 配置修改确认\n# 修改内容：XXX\n# 原因：XXX\n# 影响：XXX\n# 风险：低/中/高\n# 文档依据：https://docs.openclaw.ai/zh-CN/XXX\n# 是否继续？是/否\n\n# 步骤 2: 检查 + 自动修复\nopenclaw doctor --fix\n# AI 内部过滤关键信息：\n# openclaw doctor --fix 2>&1 | grep -E \"Doctor changes|Normalized|Config overwrite|Backup|Invalid\"\n\n# 步骤 3: 对比备份（必须执行！）\ndiff ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak\n# AI 解读 diff，向用户说明修改内容\n\n# 步骤 4: 记录教训（重要！）\n# 把学到的正确配置值记录到 MEMORY.md\n\n# 步骤 5: 等待热重载\nsleep 3\n# 3 秒是合理的：热重载是进程内重启（SIGUSR1），官方设计为快速应用\n\n# 步骤 6: 验证 Gateway 状态\nopenclaw gateway status\n# 确认 Gateway 正常运行\n\n排障流程（如果 Gateway 启动失败）\n# Gateway 失败 ≠ 机器人瘫痪！\n# 诊断命令仍然可用，因为它们是检查文件系统，不依赖 Gateway RPC\n\n# 步骤 1: 查看日志，了解失败原因\nopenclaw logs --follow\n# 查看错误信息，例如：\n#   - Config validation failed: XXX\n#   - Port 18789 already in use\n#   - Invalid token format\n\n# 步骤 2: 根据日志手动修复配置\nnano ~/.openclaw/openclaw.json\n# 针对性修复发现的问题\n\n# 步骤 3: 再次尝试启动\nopenclaw gateway restart\n\n# 步骤 4: 再次验证\nopenclaw gateway status\n\n输出格式\n修改前确认\n📋 配置修改确认\n\n修改内容：XXX\n原因：XXX\n影响：XXX\n风险：低/中/高\n文档依据：https://docs.openclaw.ai/zh-CN/XXX\n\n是否继续？是/否\n\ndoctor --fix 后反馈\n\nAI 向用户反馈的格式（必须遵守）：\n\n✅ 配置检查完成\n\n【修复内容】\n- 字段：channels.telegram.streaming\n- 原值：\"invalid_test_value\"（无效）\n- 新值：\"off\"（有效）\n\n【备份位置】\n~/.openclaw/openclaw.json.bak\n\n【其他警告】（与配置无关，可选处理）\n- Node 版本警告：系统 Node 16.5.0，建议升级到 22+\n- 会话记录缺失：1/2 sessions 缺少 transcript\n\n\n小问题（不麻烦用户）：\n\n✅ 配置检查完成\n\ndoctor 输出：无问题 / 修复了 XXX（小问题，已自动修复）\n\n已记录到：MEMORY.md\n\n\n重要配置（反馈用户）：\n\n✅ 配置检查完成\n\n【修复内容】\n- 字段：XXX\n- 原值：\"XXX\"（无效）\n- 新值：\"XXX\"（有效）\n\n【学到的知识】\n- 正确值：XXX\n- 含义：XXX\n- 文档：https://docs.openclaw.ai/zh-CN/XXX\n\n⚠️ 注意：XXX（影响说明）\n\n已记录到：MEMORY.md\n\n验证结果\n✅ Gateway 状态正常\n\nRuntime: running\nRPC probe: ok\n\n失败排障\n❌ Gateway 启动失败\n\n错误日志：\nXXX（从 logs --follow 获取）\n\n已手动修复：XXX\n正在重启 Gateway...\n\n✅ Gateway 已恢复正常\n\ndoctor --fix 输出解读规则（AI 必须遵守）\nAI 职责：过滤并总结关键信息\n\nAI 应该执行的过滤（内部处理，用户不需要看）：\n\nopenclaw doctor --fix 2>&1 | grep -E \"Doctor changes|Normalized|Config overwrite|Backup|Invalid\"\n\n\nAI 向用户反馈时明确分类：\n\n修复项 — Doctor changes、Normalized、Config overwrite\n警告项 — Node 版本、会话记录、Skills 状态等\n\nAI 必须执行的操作：\n\n过滤 doctor 输出，提取关键修复信息\n对比备份文件，解读 diff\n向用户反馈修复内容（字段、原值、新值）\n记录教训到 MEMORY.md\n等待 3 秒后验证 Gateway 状态\n安全规则\n修改前必须查文档 — https://docs.openclaw.ai/zh-CN\n修改前必须向用户确认 — 即使是你要求的\n绝不猜测字段值 — 没文档依据就不做\n修复后必须学习 — 记录到 MEMORY.md\nGateway 失败仍可排障 — 诊断命令不依赖 Gateway\n输出必须过滤 — 用户只看关键信息，杂项由 AI 处理\n已知局限\n局限\t说明\t应对方案\ndoctor 检测不出端口无效\t端口号格式正确但值无效时\t手动验证关键配置\nGateway 有保护机制\t无效配置时自动回滚默认值\t修复后验证配置已生效\nGateway 重启输出不清晰\t只显示\"missing tool result\"\t查看 logs --follow 确认\n相关文档\n官方配置文档：https://docs.openclaw.ai/zh-CN/gateway/configuration\n官方 doctor 文档：https://docs.openclaw.ai/zh-CN/cli/doctor\n官方 Gateway 手册：https://docs.openclaw.ai/zh-CN/gateway/index.md\n官方故障排除：https://docs.openclaw.ai/zh-CN/gateway/troubleshooting\n官方 FAQ：https://docs.openclaw.ai/zh-CN/help/faq.md\n版本历史\nv1.0 (2026-02-26) — 初始版本，包含完整流程和反馈策略\nv1.1 (2026-02-26) — 更新测试验证后的流程，添加输出过滤规则和已知局限"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/nicoxia/safe-config-workflow-zh-cn",
    "publisherUrl": "https://clawhub.ai/nicoxia/safe-config-workflow-zh-cn",
    "owner": "nicoxia",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn",
    "downloadUrl": "https://openagent3.xyz/downloads/safe-config-workflow-zh-cn",
    "agentUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent",
    "manifestUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/safe-config-workflow-zh-cn/agent.md"
  }
}