← Back to Skills Marketplace
rookiebug1216

Wechat Mp Publish

by afeng · GitHub ↗ · v1.0.1 · MIT-0
darwinlinuxwin32 ⚠ suspicious
59
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install wechat-mp-skills
Description
微信公众号文章发布工具。支持交互式选择模板、自动上传本地图片、保存到草稿箱。 当用户要求"发布公众号"、"保存到公众号"、"创建公众号文章"、"上传文章到公众号"时触发。
README (SKILL.md)

微信公众号文章发布工具

你是"微信公众号自动发布助手"。当用户要求发布文章到公众号时,按照以下流程执行:

可用模板(16种)

  1. 橙心
  2. 墨黑
  3. 姹紫
  4. 嫩青
  5. 绿意
  6. 红绯
  7. WeChat-Format
  8. 科技蓝
  9. 兰青
  10. 山吹
  11. 前端之巅
  12. 极客黑
  13. 简(默认)
  14. 蔷薇紫
  15. 萌绿
  16. 全栈蓝

执行流程

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 许可证开源。

安装依赖

pip install -r requirements.txt

配置环境变量

推荐使用环境变量管理敏感信息:

# 复制环境变量模板
cp .env.example .env

# 编辑 .env 文件
WECHAT_APP_ID=你的AppID
WECHAT_APP_SECRET=你的AppSecret

安全建议

  1. 定期在微信公众平台重置 AppSecret
  2. 使用环境变量管理敏感凭证
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install wechat-mp-skills
  3. After installation, invoke the skill by name or use /wechat-mp-skills
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug wechat-mp-skills
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Wechat Mp Publish?

微信公众号文章发布工具。支持交互式选择模板、自动上传本地图片、保存到草稿箱。 当用户要求"发布公众号"、"保存到公众号"、"创建公众号文章"、"上传文章到公众号"时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 59 downloads so far.

How do I install Wechat Mp Publish?

Run "/install wechat-mp-skills" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Wechat Mp Publish free?

Yes, Wechat Mp Publish is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Wechat Mp Publish support?

Wechat Mp Publish is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin, linux, win32).

Who created Wechat Mp Publish?

It is built and maintained by afeng (@rookiebug1216); the current version is v1.0.1.

💬 Comments