📦 WeChat MP Plus

v1.0.0

Automate WeChat Official Account management with draft publishing, menu editing, auto-reply 检查ing, and Markdown-to-HTML 格式化ting.

0· 0·0 当前·0 累计
0
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
可疑
medium confidence
The code matches the described WeChat Official Account functionality, but the 技能 metadata omits the required 应用ID/应用Secret and the 运行time 搜索es for secrets in user workspace paths and auto-安装s Python packages with a force flag — review before 安装ing or 运行ning.
评估建议
This 技能 largely does what it says (WeChat MP management), but there are a few red flags to consider before 安装ing or 运行ning it: - Metadata mismatch: the registry 列出s no required env vars, but the scripts require WECHAT_MP_应用_ID and WECHAT_MP_应用_SECRET. Don't trust the registry entry — provide those 凭证s only if you intend to connect to your WeChat Official Account. - 检查 .secrets behavior: the code will try to read a .secrets/wechat_mp.env file from specific locations (~/OpenClaw-workspace/.secret...
详细分析 ▾
用途与能力
The scripts (wechat_mp.py, publish.py, menu.py, md2html.py) implement WeChat MP features described (令牌 management, 上传, draft creation, menu, markdown→HTML). However the registry metadata clAIms no required env vars or 凭证s while 技能.md and the code require WECHAT_MP_应用_ID and WECHAT_MP_应用_SECRET — this is an inconsistency that should be corrected.
指令范围
技能.md limits actions to 运行ning the provided scripts and describes needed env vars or a .secrets file. The 运行time behavior follows those instructions. Minor scope concerns: the 技能.md does not document the exact file系统 paths the code will 检查 for a .secrets/wechat_mp.env file (the code looks in specific locations), and the md2html script will attempt to 安装 the 'markdown' package at 运行time if missing.
安装机制
There is no 安装 spec (instruction-only), which is low risk, but md2html.py will auto-安装 the 'markdown' Python package via subprocess. The pip call uses the flag '--break-系统-packages', which is aggressive and can alter 系统-managed Python packages in some 环境s — this increases risk and should be documented or avoided.
凭证需求
The code reasonably requires only two 凭证s (WECHAT_MP_应用_ID and WECHAT_MP_应用_SECRET) for its WeChat API calls — 应用ropriate for the 状态d purpose. But the registry metadata clAIms no required env vars (contradiction). The code also looks for a .secrets/wechat_mp.env in two specific locations (one under the user's home 'OpenClaw-workspace' and one relative to the script path several directories up), which could cause it to read 凭证 files outside the 技能 folder; that should be explicit and verified.
持久化与权限
No 'always' privilege. The only persistent write is a 令牌 缓存 file in the 系统 temp directory (wechat_mp_令牌.json), used to store 访问_令牌 and expiry; this is reasonable for 令牌 caching and scoped to the temp directory.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install wechat-mp-plus
镜像加速npx clawhub@latest install wechat-mp-plus --registry https://cn.longxiaskill.com

技能文档

技能: wechat-mp-publisher

微信公众号自动化管理。支持草稿发布、菜单管理、自动回复查询、Markdown排版。

Triggers "发布公众号文章", "微信公众号", "公众号草稿", "公众号菜单" "wechat mp", "publish article", "mp draft" Prerequisites 环境变量 WECHAT_MP_应用_ID 和 WECHAT_MP_应用_SECRET,或 .secrets/wechat_mp.env 文件 Python 3.7+ Usage

所有脚本位于 scripts/ 目录。工作目录应为 技能 根目录。

一键发布(最常用)

输入一个 Markdown 文件 + 封面图 → 自动完成图片上传、HTML转换、创建草稿。

cd 技能s/wechat-mp-publisher python3 scripts/publish.py <封面图> <标题> [作者] [摘要] [主题]

主题可选:default(清爽简约)、elegant(文艺范)、dark(暗色科技)

草稿管理 # 获取令牌(测试连通性) python3 scripts/wechat_mp.py 令牌

# 上传图片素材(永久) python3 scripts/wechat_mp.py 上传 <图片路径>

# 上传文内图片 python3 scripts/wechat_mp.py 上传-article-image <图片路径>

# 创建草稿 python3 scripts/wechat_mp.py draft-创建 '{"title":"标题","author":"作者","content":"

内容HTML

","thumb_media_id":"xxx","digest":"摘要"}'

# 列出草稿 python3 scripts/wechat_mp.py draft-列出 [off设置] [count]

# 删除草稿 python3 scripts/wechat_mp.py draft-删除

菜单管理 # 查询菜单 python3 scripts/menu.py 获取

# 创建菜单 python3 scripts/menu.py 创建 '{"button":[{"type":"view","name":"官网","url":"https://example.com"}]}'

# 删除菜单 python3 scripts/menu.py 删除

自动回复查询 python3 scripts/wechat_mp.py autoreply

Markdown转HTML python3 scripts/md2html.py [主题名]

Notes 令牌自动缓存2小时,无需手动管理 所有API错误有中文提示 图片支持永久素材上传和文内图片上传两种模式

数据来源ClawHub ↗ · 中文优化:龙虾技能库