apps/desktop/openclaw-runtime/config/extensions/wecom-openclaw-plugin/skills/wecom-preflight/SKILL.md
企业微信插件前置条件检查。在执行任何 wecom_mcp 操作前,通过 shell 命令检查工具权限配置(profile 和白名单),若缺失则自动修复并提示用户重启 Gateway。所有使用 wecom_mcp 的技能都应在首次调用前执行此检查。
npx skillsauth add polaris-dxz/xclaw wecom-preflightInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
本技能确保
wecom_mcp工具已正确获得执行权限。所有使用 wecom_mcp 的技能在首次调用前,必须先执行本检查流程。
当满足以下任一条件时,执行前置检查:
wecom_mcp 工具wecom_mcp 时收到 tool not allowed、not permitted、permission denied 或类似权限错误如果当前会话中已成功调用过
wecom_mcp(任何操作),则无需重复检查。
重要:以下所有步骤均为 shell 命令(在终端中执行),不是 MCP tool 调用。
wecom_mcp在未加入白名单前对 AI Agent 不可见,因此不能用 tool 调用来探测。
在终端执行以下命令,读取当前 tools.profile 配置:
openclaw config get tools.profile
根据返回结果分流:
full → ✅ 检查通过。full 模式无任何工具限制,所有工具(包括 wecom_mcp)直接可用,无需检查 alsoAllow,继续执行用户原始请求coding、messaging、minimal、undefined 或空)→ 进入步骤 1b(检查 alsoAllow)command not found: openclaw、权限错误等)→ 进入步骤 3(环境异常)在终端执行以下命令,读取当前 tools.alsoAllow 配置:
openclaw config get tools.alsoAllow
根据返回结果分流:
wecom_mcp(如 ["wecom_mcp"] 或 ["wecom_mcp", "other_tool"])→ ✅ 白名单已配置,检查通过,继续执行用户原始请求wecom_mcp(如空数组 []、undefined、或列表中没有 wecom_mcp)→ 进入步骤 2(自动修复)在终端执行以下命令,将 wecom_mcp 加入工具白名单:
openclaw config set tools.alsoAllow '["wecom_mcp"]'
注意:如果步骤 1b 返回的列表中已有其他工具(如
["other_tool"]),需要合并后再写入,例如:openclaw config set tools.alsoAllow '["other_tool", "wecom_mcp"]'
根据执行结果分流:
向用户回复(不要自动执行重启):
✅ 已自动将 wecom_mcp 加入工具执行权限白名单(tools.alsoAllow)。
⚠️ 配置变更需要重启 Gateway 后才能生效,请在终端执行以下命令:
openclaw gateway restart
重启完成后请重新发送您的请求。
为什么不自动重启:
openclaw gateway restart会中断当前所有活跃连接(包括本会话), 如果由 AI 自动执行,用户可能无法看到完整的提示信息。交由用户手动重启更可控。
向用户回复以下手动修复指引:
❌ 自动配置失败,请在终端手动执行以下命令:
openclaw config set tools.alsoAllow '["wecom_mcp"]'
openclaw gateway restart
完成后请重新发送您的请求。
如果步骤 1 或 1b 的 openclaw 命令本身执行失败(如 command not found、权限不足等),说明 OpenClaw CLI 未正确安装或不在 PATH 中,直接告知用户:
⚠️ OpenClaw CLI 不可用:<错误信息>
可能原因:
- OpenClaw 未安装或未加入系统 PATH
- OpenClaw 版本过低,不支持 config 子命令
- 当前 shell 环境缺少必要配置
请检查 OpenClaw 安装状态后重试。
参考:https://docs.openclaw.dev/installation
openclaw CLI 在终端中执行,不涉及任何 MCP tool 调用。这样可以避免"tool 未白名单 → tool 不可见 → 无法探测"的死锁问题tools.profile 为 full 时所有工具无限制,无需检查 alsoAllow,可快速跳过tools.alsoAllow 中已包含 wecom_mcp,openclaw config set 命令不会产生副作用tools.alsoAllow 时,需保留列表中已有的其他工具名,仅追加 wecom_mcp| 场景 | 处理方式 |
|------|---------|
| 首次调用 wecom_mcp 前 | 执行 openclaw config get tools.profile 检查 |
| tools.profile 为 full | ✅ 跳过,直接执行原始请求 |
| profile 非 full + alsoAllow 已包含 wecom_mcp | ✅ 跳过,继续执行 |
| profile 非 full + alsoAllow 不包含 → 自动写入成功 | 提示已配置 + 附 openclaw gateway restart 命令让用户重启 |
| profile 非 full + alsoAllow 不包含 → 自动写入失败 | 给出手动修复指引 |
| openclaw CLI 不可用 | 告知用户检查 OpenClaw 安装 |
| 会话中已成功调用过 wecom_mcp | 跳过检查 |
testing
公司财报追踪器。自动追踪科技公司财报发布日期并生成摘要。Keywords: 财报, earnings, financial report.
development
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
testing
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
content-media
内容复用引擎。将长文章/视频自动拆解为适合不同平台的短内容。Keywords: 内容复用, 多平台适配, content repurpose, 内容拆解.