← 返回 Skills 市场
59
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install wechat-mp-skills
功能描述
微信公众号文章发布工具。支持交互式选择模板、自动上传本地图片、保存到草稿箱。 当用户要求"发布公众号"、"保存到公众号"、"创建公众号文章"、"上传文章到公众号"时触发。
使用说明 (SKILL.md)
微信公众号文章发布工具
你是"微信公众号自动发布助手"。当用户要求发布文章到公众号时,按照以下流程执行:
可用模板(16种)
- 橙心
- 墨黑
- 姹紫
- 嫩青
- 绿意
- 红绯
- WeChat-Format
- 科技蓝
- 兰青
- 山吹
- 前端之巅
- 极客黑
- 简(默认)
- 蔷薇紫
- 萌绿
- 全栈蓝
执行流程
1. 询问模板
首先展示所有模板,让用户选择:
🎨 请选择排版主题:
1. 橙心
2. 墨黑
3. 姹紫
...
请输入序号或直接回车使用默认'简'主题:
2. 询问文章来源
用户选择模板后,询问文章来源:
📝 请提供文章内容,可选择:
1. 本地 Markdown 文件(提供文件路径)
2. 直接输入文章内容
3. 主题 AI 生成(给定主题)
3. 处理图片
- 如果文章中有本地图片,自动上传到公众号并替换为 HTML img 标签
- 图片存储基础目录在 config.json 中配置(base_dir)
4. 保存到草稿箱
完成格式化和图片处理后,保存到公众号草稿箱
配置要求
在 skills/wechat-mp-skills/config.json 中配置:
{
"app_id": "你的公众号AppID",
"app_secret": "你的公众号AppSecret",
"base_dir": "/path/to/your/articles"
}
使用示例
用户说:"帮我发布文章到公众号"
→ 展示模板选择 → 用户选择"简" → 询问文章来源 → 用户提供文件 → 自动上传图片 → 保存到草稿箱
注意事项
- 模板选择是必须的,展示所有 16 种模板
- 图片会自动上传并转换为 HTML img 标签
- 草稿箱 API 需要服务号或开通了相关权限的订阅号
开源信息
本项目采用 MIT 许可证开源。
- 项目地址: https://github.com/your-username/wechat-mp-skills
- 许可证: MIT License
- 贡献指南: 欢迎提交 Issue 和 Pull Request
安装依赖
pip install -r requirements.txt
配置环境变量
推荐使用环境变量管理敏感信息:
# 复制环境变量模板
cp .env.example .env
# 编辑 .env 文件
WECHAT_APP_ID=你的AppID
WECHAT_APP_SECRET=你的AppSecret
安全建议
- 定期在微信公众平台重置 AppSecret
- 使用环境变量管理敏感凭证
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install wechat-mp-skills - 安装完成后,直接呼叫该 Skill 的名称或使用
/wechat-mp-skills触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 新增详细操作说明:现在文档说明了完整的执行流程、可用的16种模板、图片自动上传、草稿箱保存规则等。
- 新增项目配置信息与示例,包括config.json格式、环境变量配置、安全建议。
- 明确模板选择和图片处理要求,规范用户交互步骤。
- 补充开源项目信息及贡献指南。
v0.1.1
Initial release with core features for WeChat Official Account article publishing:
- Added interactive template selection (16 templates supported).
- Enabled image handling: automatic upload and HTML <img> substitution.
- Implemented multiple article source options (Markdown, direct input, AI generation).
- Included security scripts and credential encryption (see ENCRYPTION.md).
- Saved published articles to WeChat draft box.
- Provided detailed configuration, usage, and security documentation.
v0.1.0
wechat-mp-publish 1.1.0 introduces an interactive workflow for publishing WeChat Official Account articles with template selection, image handling, and draft saving.
- Users can choose from 16 built-in article templates before publishing.
- Supports multiple content sources: local Markdown, direct input, or AI-generated text.
- Automatically uploads local images in the article to WeChat and replaces them with HTML image links.
- Article is saved to the WeChat Official Account draft box after formatting.
- Configuration is managed via config.json and environment variables for credentials and base directory.
- Improved guidance and best practices for setup, security, and open source contribution provided in documentation.
元数据
常见问题
Wechat Mp Publish 是什么?
微信公众号文章发布工具。支持交互式选择模板、自动上传本地图片、保存到草稿箱。 当用户要求"发布公众号"、"保存到公众号"、"创建公众号文章"、"上传文章到公众号"时触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 59 次。
如何安装 Wechat Mp Publish?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install wechat-mp-skills」即可一键安装,无需额外配置。
Wechat Mp Publish 是免费的吗?
是的,Wechat Mp Publish 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Wechat Mp Publish 支持哪些平台?
Wechat Mp Publish 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, win32)。
谁开发了 Wechat Mp Publish?
由 afeng(@rookiebug1216)开发并维护,当前版本 v1.0.1。
推荐 Skills