Wechat Md Publisher Skill
发布 Markdown 文章到微信公众号,支持草稿管理、多主题、智能图片处理、自动封面图。推荐与 news-to-markdown-skill 配合使用实现一键转载(支持本地图片)。
Rank
62
Safety
84
Downloads
2.0k
Updated
Oct 9, 2026
Version
1.0.11
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.0.11release · observed May 11, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17867zbqf69d0mb2yqzym6nmh83hrxm:wechat-md-publisher-skill- Install using `clawhub skill install s17867zbqf69d0mb2yqzym6nmh83hrxm:wechat-md-publisher-skill` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/sipingme/wechat-md-publisher-skill before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sipingme-wechat-md-publisher-skill/snapshot"
Documentation
CLAWHUB
155,127 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: wechat-md-publisher description: 发布 Markdown 文章到微信公众号,支持草稿管理、多主题、智能图片处理、自动封面图。推荐与 news-to-markdown-skill 配合使用实现一键转载(支持本地图片)。 version: 1.0.8 author: Ping Si <[email protected]> user-invocable: true requires: runtime: - name: node version: ">=18.0.0" - name: npm version: ">=8.0.0" install: type: npm-global package: wechat-md-publisher version: "1.0.7" versionPinning: exact execution: "npm install -g [email protected]" global: true autoInstall: false autoUpdate: false riskLevel: low riskReason: | 启动器以 in-process 动态 import 调用本机已安装的 wechat-md-publisher, 并在 import 之前校验 manifest.name 与 manifest.version 是否精确等于内置 pin。 解析路径仅包含 Node 全局 node_modules 与 Skill 自身 node_modules; 当前工作目录 (CWD) 下的 node_modules 已被显式排除,避免被未审计的本地包替身劫持。 安装前请审计上游源码与凭证加密实现。 trustedResolutionRoots: - "<node-prefix>/lib/node_modules" - "<node-prefix>/node_modules (Windows)" - "<skill-dir>/node_modules" untrustedResolutionRoots: - "process.cwd()/node_modules (intentionally excluded)" source: registry: https://registry.npmjs.org repository: https://github.com/sipingme/wechat-md-publisher license: Apache-2.0 audit: https://github.com/sipingme/wechat-md-publisher/blob/main/src/index.ts auditCredentials: https://github.com/sipingme/wechat-md-publisher/blob/main/src/services/account.ts env: optional: - name: WECHAT_APP_ID description: 微信公众号 AppID sensitive: false - name: WECHAT_APP_SECRET description: 微信公众号 AppSecret sensitive: true note: | 凭证可通过两种方式提供(二选一): 1. 环境变量(推荐,避免凭证暴露在进程列表中) 2. CLI 命令:`account add --app-id xxx --app-secret xxx` configPaths: - path: ~/.config/wechat-md-publisher-nodejs/ description: 账号配置和缓存目录 contains: - credentials: true - encryption: AES-256 permissions: filesystem: read: - "*.md": "读取用户指定的 Markdown 文件" - "*.jpg,*.png,*.gif": "读取文章中引用的本地图片" write: - "~/.config/wechat-md-publisher-nodejs/": "存储账号配置和缓存(凭证使用 AES-256 加密)" network: required: - "api.weixin.qq.com": "微信公众号 API(发布、草稿、素材管理)" - "mp.weixin.qq.com": "微信公众号素材上传" optional: - "remote-theme-api": "仅当用户使用 theme add-remote 命令时才会访问(⚠️ 需用户明确配置并信任该端点)" credentials: - name: WECHAT_APP_SECRET type: api-secret storage: location: ~/.config/wechat-md-publisher-nodejs/ encryption: AES-256 handler: wechat-md-publisher npm 包 handlerRepo: https://github.com/sipingme/wechat-md-publisher consent: 需要用户明确提供,不会自动收集 securityNote: | 本 skill 不直接处理凭证加密,安全性依赖上游 npm 包的实现。 建议在提供凭证前审查 wechat-md-publisher 包的加密实现: https://github.com/sipingme/wechat-md-publisher/blob/main/src/services/account.ts tags: - wechat - publishing - markdown - content-management repository: https://github.com/sipingme/wechat-md-publisher --- # WeChat Publisher Skill 全功能微信公众号 Markdown 发布工具 - 让 AI 能够直接将内容发布到微信公众号。 ## ⚠️ 重要提示 **推荐使用方式**: - ✅ **最佳实践**:与 `news-to-
README.md
# WeChat MD Publisher - OpenClaw Skill > 全功能微信公众号 Markdown 发布工具 - OpenClaw Skill 版本 ## 🛠️ 前置安装:底层 npm 包 本 Skill 的启动器 (`scripts/run.js`) 通过 in-process 动态 `import` 调用本机已安装的 `wechat-md-publisher`,**不会**通过 `npx` 在运行时从 registry 拉取代码。 因此**必须**在首次使用前显式全局安装底层包,并在安装前完成源码审计。 > ⚠️ **必须使用精确版本(无 caret、无 `@latest`)**。启动器会在 `import` 之前读取已解析包的 `package.json`,校验 `name` 与 `version` 是否与内置 pin(当前 `1.0.7`)精确匹配,任何不匹配都会被拒绝。这是为了防止本地或全局 `node_modules` 中出现的同名替身包被加载。 ```bash # 一次性安装(请先审计源码,详见下方链接) npm install -g [email protected] # 验证可用并精确等于 1.0.7 wechat-pub --version ``` 请审计: - CLI 入口:https://github.com/sipingme/wechat-md-publisher/blob/main/src/index.ts - 凭证加密:https://github.com/sipingme/wechat-md-publisher/blob/main/src/services/account.ts > 不要在含有未审计 `node_modules` 的工作目录下运行 Skill。启动器只在受信路径(Node 全局 `node_modules` 与 Skill 自身 `node_modules`)解析包;**当前工作目录(CWD)下的 `node_modules` 已被显式排除**。 ## 🚀 快速安装(Skill 本身) ### 方法 1:从 ClawHub 安装(推荐) ```bash openclaw skills install wechat-md-publisher ``` ### 方法 2:从 GitHub 安装 ```bash openclaw skills install https://github.com/sipingme/wechat-md-publisher-skill ``` ### 方法 3:手动安装 1. 克隆仓库: ```bash git clone https://github.com/sipingme/wechat-md-publisher-skill.git cd wechat-md-publisher-skill ``` 2. 复制到 OpenClaw skills 目录: ```bash cp -r . ~/.openclaw/skills/wechat-md-publisher/ ``` 3. 验证工具可用: ```bash wechat-pub --version ``` ## ✅ 验证安装 ```bash # 检查 Skill 是否可用 openclaw skills list --eligible # 查看 Skill 详情 openclaw skills info wechat-md-publisher # 测试命令 wechat-pub --version ``` ## 📋 首次配置 ### 1. 获取微信公众号凭证 1. 登录 [微信公众平台](https://mp.weixin.qq.com/) 2. 进入「设置与开发」→「基本配置」 3. 获取「开发者ID(AppID)」和「开发者密码(AppSecret)」 4. 将服务器 IP 添加到「IP白名单」 ### 2. 配置账号 ```bash # 推荐:使用环境变量(避免命令行暴露凭证) export WECHAT_APP_ID="wx_your_app_id" export WECHAT_APP_SECRET="your_app_secret" wechat-pub account add \ --name "我的公众号" \ --default ``` ### 3. 测试发布 ```bash # 创建测试文章 cat > test.md << 'EOF' --- title: 测试文章 --- # Hello World 这是一篇测试文章。 EOF # 发布 wechat-pub publish create --file test.md --theme default ``` ## 🎯 使用方式 ### 在 OpenClaw 对话中使用 **示例 1:发布文章** ``` 用户: 帮我把这篇文章发布到微信公众号 [提供 Markdown 内容] AI: 好的,我来帮你发布。正在使用 orangeheart 主题... ✓ 文章已成功发布!发布 ID: 2247483647_1 ``` **示例 2:创建草稿** ``` 用户: 先创建一个草稿,不要立即发布 AI: 明白,我会先创建草稿。 ✓ 草稿创建成功,Media ID: 3_abc123 你可以在微信公众平台查看和编辑。 ``` **示例 3:查看文章列表** ``` 用户: 查看我已发布的微信文章 AI: 正在获取列表... 共 8 篇已发布文章: 1. 最新文章 (2026-03-19) 2. 产品介绍 (2026-03-18) ... ``` ### 手动调用 Skill ```bash # 使用 OpenClaw 命令 openclaw run wechat-md-publisher publish article.md orangeheart # 或直接使用工具 wechat-pub publish create --file article.md --theme orangeheart ``` ## � 与 news-to-markdown-skill 组合使用 **推荐组合**:一键转载新闻到微信公众号 ### 快速示例 ```bash # 1. 提取新闻文章 convert-url --url "https://www.toutiao.com/article/123" \ --output /tmp/article.md \ --platform toutiao # 2. 发布到微信公众号 wechat-pub publish create \ --file /tmp/article.md \ --theme orangeheart ``` ### AI 自动化工作流 用户说: > "帮我把这篇头条文章转载到我的微信公众号" AI 自动执行(**默认走"草稿优先 + 人工确认"路径**): 1. 使用 `news-to-ma
_meta.json
{
"ownerId": "kn70nwj71rbkzwyvc7pkqs4p6s8222nc",
"slug": "wechat-md-publisher-skill",
"version": "1.0.11",
"publishedAt": 1778464149586
}references/ip-whitelist-guide.md
# 微信公众号 IP 白名单配置指南 ## 什么是 IP 白名单? 微信公众号为了安全,要求所有调用 API 的服务器 IP 必须在白名单中。如果 IP 不在白名单,API 调用会失败。 ## 为什么需要配置? 当你使用 `wechat-md-publisher` 发布文章时,工具会从你的电脑/服务器向微信 API 发送请求。微信会检查请求来源的 IP 地址,只有在白名单中的 IP 才能成功调用。 ## 如何获取你的 IP 地址? ### 方法 1:使用命令行(推荐) ```bash # macOS/Linux curl ifconfig.me # 或 curl icanhazip.com # 或 curl ipinfo.io/ip ``` ### 方法 2:访问网站 访问以下任一网站查看你的公网 IP: - https://www.ip.cn/ - https://ipinfo.io/ - https://ifconfig.me/ ### 方法 3:在微信公众平台查看 登录微信公众平台后,在 IP 白名单设置页面,微信会显示你当前的 IP 地址。 ## 如何配置 IP 白名单? ### 步骤 1:登录微信公众平台 访问 https://mp.weixin.qq.com/ 并登录 ### 步骤 2:进入 IP 白名单设置 1. 点击左侧菜单「设置与开发」 2. 点击「基本配置」 3. 找到「IP白名单」部分 4. 点击「修改」或「查看」 ### 步骤 3:添加 IP 地址 1. 点击「添加」按钮 2. 输入你的公网 IP 地址 3. 点击「确定」 **示例**: ``` 123.456.789.012 ``` ### 步骤 4:验证配置 添加后,等待 1-2 分钟生效,然后测试: ```bash wechat-pub account list ``` 如果能正常显示账号列表,说明配置成功。 ## 常见场景 ### 场景 1:在家里使用 **问题**:家庭宽带的 IP 地址可能会变化 **解决方案**: 1. **短期方案**:每次 IP 变化后重新添加 2. **长期方案**: - 联系运营商申请固定 IP(可能需要付费) - 使用云服务器部署(推荐) ### 场景 2:在公司使用 **问题**:公司可能使用固定 IP 或代理 **解决方案**: 1. 询问 IT 部门获取公司的公网出口 IP 2. 将公司 IP 添加到白名单 3. 如果公司使用代理,需要添加代理服务器的 IP ### 场景 3:在云服务器使用 **推荐方案**: 1. 购买云服务器(阿里云、腾讯云、AWS 等) 2. 云服务器通常有固定的公网 IP 3. 将云服务器 IP 添加到白名单 4. 在云服务器上安装和使用 `wechat-md-publisher` **优点**: - ✅ IP 固定,不会变化 - ✅ 24/7 在线 - ✅ 可以设置定时任务自动发布 - ✅ 网络稳定 ### 场景 4:使用 VPN 或代理 **问题**:VPN 会改变你的出口 IP **解决方案**: 1. 关闭 VPN 后获取真实 IP 2. 将真实 IP 添加到白名单 3. 使用工具时关闭 VPN 或者: 1. 获取 VPN 的出口 IP 2. 将 VPN IP 添加到白名单 3. 使用工具时保持 VPN 连接 ## 多 IP 配置 微信公众号支持添加多个 IP 地址(通常最多 10-20 个)。 **适用场景**: - 在多个地点使用(家里、公司、咖啡厅) - 团队协作(多人使用) - 备用 IP(防止主 IP 失效) **配置方法**: 在 IP 白名单页面,点击「添加」,逐个添加所有需要的 IP。 ## 安全建议 ### ✅ 推荐做法 1. **只添加必要的 IP** - 不要添加不信任的 IP - 定期检查和清理不再使用的 IP 2. **使用固定 IP** - 云服务器(推荐) - 固定宽带 IP 3. **定期更新** - IP 变化后及时更新白名单 - 删除不再使用的 IP ### ❌ 不推荐做法 1. **不要使用公共 WiFi** - 公共 WiFi 的 IP 可能被多人共享 - 存在安全风险 2. **不要添加 0.0.0.0 或通配符** - 微信不支持通配符 - 必须添加具体的 IP 地址 3. **不要分享你的 AppSecret** - 即使 IP 在白名单中,也要保护好 AppSecret - 不要将 AppSecret 提交到 Git 仓库 ## 故障排查 ### 错误:IP 不在白名单 **症状**: ``` 错误码: 40164 错误信息: invalid ip xxx.xxx.xxx.xxx, not in whitelist ``` **解决步骤**: 1. **确认当前 IP**: ```bash curl ifconfig.me ``` 2. **检查白名单**: - 登录微信公众平台 - 查看 IP 白名单列表 - 确认当前 IP 是否在列表中 3. **添加 IP**: - 如果不在,添加当前 IP - 等待 1-2 分钟生效 4. **重试**: ```bash wechat-pub account list ``` ### 错误:IP 频繁变化 **症状**:今天能用,明天就不能用了 **原因**:家庭宽带 IP 动态分配 **解决方案**: **方案 1:使用云服务器(推荐)** ```bash # 1. 购买云服务器(最低配置即可) # 2. 在云服务器上安装工具(必须使用精确版本;启动器会校验) ssh user@your-server-ip npm install -g [email protected] # 3. 推荐通过环境变量提供凭证(避免命令行暴露 AppSecret) export WECHAT_APP_ID="wx_your_app_id" export WECHAT_APP_SECRET="your_app_secret" wechat-pub account add --name "公众号" --default # 4. 使用:建议先创建草稿,人工确认后再 publish wechat-pub draft create --file article.md --theme default ``` **方案 2:申请固定 IP** - 联系宽带运营商 - 申请固定公网 IP(可能需要额外费用) **方案 3:使用 DDNS** - 配置动态 DNS - 使用脚本自动更新白名单(需要开发) ## 自动化脚本 ### 检查 IP 是否变化 ```bash #!/bin/bash # check-ip.sh CURRENT_IP=$(curl -s ifconfig
references/quick-start.md
# WeChat Publisher - 快速开始指南 ## 5 分钟快速上手 ### 步骤 1:安装工具(1 分钟) > ⚠️ **必须使用精确版本**。Skill 启动器在加载前会校验 `package.json` 的 `name` 与 `version`,任何不匹配都会被拒绝。请勿使用 `@latest` 或浮动范围。 ```bash # 安装前请先审计上游源码(CLI 与凭证加密): # - https://github.com/sipingme/wechat-md-publisher/blob/main/src/index.ts # - https://github.com/sipingme/wechat-md-publisher/blob/main/src/services/account.ts npm install -g [email protected] # 验证版本(必须精确等于 1.0.7) wechat-pub --version ``` ### 步骤 2:配置账号(2 分钟) 1. 获取微信公众号凭证: - 登录 https://mp.weixin.qq.com/ - 进入「设置与开发」→「基本配置」 - 复制 AppID 和 AppSecret 2. 添加账号: ```bash wechat-pub account add \ --name "我的公众号" \ --app-id "wx_your_app_id" \ --app-secret "your_app_secret" \ --default ``` ### 步骤 3:创建测试文章(1 分钟) ```bash cat > test-article.md << 'EOF' --- title: 测试文章 author: 测试作者 --- # 欢迎使用 WeChat Publisher 这是一篇测试文章。 ## 主要特性 - 完整的草稿管理 - 8 个精美主题 - 智能图片处理 EOF ``` ### 步骤 4:发布文章(1 分钟) > 💡 **推荐先创建草稿,人工确认后再发布**。直接 `publish create` 会立即让文章对公众号粉丝可见,请在 AI / 自动化流程中默认走草稿路径。 ```bash # 推荐:先创建草稿(不会公开发布) wechat-pub draft create --file test-article.md --theme orangeheart # 仅在你已经审阅过渲染结果与图片后,再正式发布 wechat-pub publish create --file test-article.md --theme orangeheart ``` ### 验证成功 如果看到以下输出,说明配置成功: ``` ✓ 渲染完成 ✓ 图片处理完成 ✓ 创建草稿成功 ✓ 发布成功 发布 ID: 2247483647_1 ``` 现在可以在微信公众平台查看你的文章了! ## 常用命令速查 ```bash # 查看所有主题 wechat-pub theme list # 创建草稿 wechat-pub draft create --file article.md --theme lapis # 查看草稿列表 wechat-pub draft list # 查看已发布文章 wechat-pub publish list # 删除草稿 wechat-pub draft delete <media-id> ``` ## 下一步 - 阅读完整文档:[SKILL.md](../SKILL.md) - 查看主题示例:[themes.md](./themes.md) - 了解 API 用法:https://github.com/sipingme/wechat-md-publisher
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/sipingme/skills/wechat-md-publisher-skill",
"sourceUrl": "https://clawhub.ai/sipingme/skills/wechat-md-publisher-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T22:00:24.513Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sipingme-wechat-md-publisher-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sipingme-wechat-md-publisher-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T22:00:24.513Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2K downloads",
"href": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceUrl": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T22:00:24.513Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.11",
"href": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceUrl": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-11T01:49:09.586Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sipingme-wechat-md-publisher-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sipingme-wechat-md-publisher-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.11",
"description": "- Enforced exact version pinning: now only allows [email protected], rejecting mismatches and unverified upgrades. - Strengthened package resolution: only loads dependencies from trusted global or skill-internal node_modules, explicitly excluding CWD to prevent dependency hijacking. - Documented security model and package auditing procedures more clearly. - No changes to functional behavior for publishing or account operations.",
"href": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceUrl": "https://clawhub.ai/sipingme/wechat-md-publisher-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-11T01:49:09.586Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
