Install
openclaw skills install dongrebeccahhh-wechat-mp-toolkit微信公众号完整工具包,包括文章创作、封面生成、自动发布、热点分析等功能。适用于公众号运营者。
openclaw skills install dongrebeccahhh-wechat-mp-toolkit完整的微信公众号运营工具集,覆盖内容创作、封面设计、自动发布全流程。
# 完整工作流(推荐)
node scripts/full-workflow.js
# 仅生成文章
node scripts/create-article.js
# 仅生成封面
node scripts/generate-cover.js
# 仅发布文章
node scripts/publish-article.js
# 指定文章主题
node scripts/create-article.js --topic "AI技术"
# 指定封面风格
node scripts/generate-cover.js --style "minimal"
# 定时发布
node scripts/schedule-publish.js --time "18:00"
编辑 config/wechat-config.json:
{
"appID": "your_app_id",
"appSecret": "your_app_secret",
"apiBase": "https://api.weixin.qq.com"
}
编辑 config/cover-config.json:
{
"style": "minimal-black-white",
"width": 900,
"height": 500,
"format": "png"
}
wechat-mp-toolkit/
├── SKILL.md # 技能说明文档
├── scripts/ # 核心脚本
│ ├── full-workflow.js # 完整工作流
│ ├── create-article.js # 文章创作
│ ├── generate-cover.js # 封面生成
│ ├── publish-article.js # 文章发布
│ ├── hotspot-analyzer.js # 热点分析
│ └── schedule-publish.js # 定时发布
├── config/ # 配置文件
│ ├── wechat-config.json # 微信配置
│ └── cover-config.json # 封面配置
├── templates/ # 文章模板
│ ├── tech-article.md # 科技文章模板
│ ├── news-article.md # 新闻文章模板
│ └── opinion-article.md # 评论文章模板
└── examples/ # 示例文件
├── example-article.md # 示例文章
└── example-cover.png # 示例封面
# 安装Node.js包
npm install axios form-data
# 安装ImageMagick(Ubuntu/Debian)
sudo apt-get install imagemagick
# 安装ImageMagick(CentOS/RHEL)
sudo yum install imagemagick
根据需要组合使用各个独立脚本:
# 只创作文章(不发布)
node scripts/create-article.js --topic "科技" --output article.md
# 只生成封面
node scripts/generate-cover.js --title "文章标题" --output cover.png
# 手动发布已有文章
node scripts/publish-article.js --article article.md --cover cover.png
设置定时任务,自动在指定时间发布:
# 每天早上8点发布
0 8 * * * cd /path/to/wechat-mp-toolkit && node scripts/schedule-publish.js
批量创作和发布多篇文章:
node scripts/batch-publish.js --count 5 --interval 3600
查看发布统计和分析:
node scripts/stats.js --period week
原因:格式不支持或文件过大
解决:
原因:API参数错误或权限不足
解决:
原因:网络问题或源站限制
解决:
欢迎提交问题和改进建议!
MIT License
关键词:微信公众号、内容创作、自动化、封面设计、热点分析
适用场景:公众号运营、内容营销、自动化发布
技能等级:A级 - 生产可用