SuperAPI AI 工具集

baoyu-post-to-wechat

通用与其它

查看项目

更新于 10-16 11:23

技能介绍

用途:将内容发布到微信公众号(服务号/订阅号草稿箱),支持两种发布路径:API 方式与 Chrome 浏览器方式。

主要能力:

  • 图文发布(最多 9 张图片),脚本为 scripts/wechat-browser.ts。
  • 文章发布:浏览器方式 scripts/wechat-article.ts,API 方式 scripts/wechat-api.ts。
  • Markdown 转换为微信公众号可用 HTML 并处理图片占位,脚本为 scripts/md-to-wechat.ts。
  • 环境与权限检查 scripts/check-permissions.ts。
  • 输入类型支持 HTML、Markdown、纯文本;纯文本会保存为 Markdown 再处理。
  • 支持主题(default、grace、simple、modern)与颜色预设,可通过 CLI、frontmatter、EXTEND.md 配置。
  • API 方式支持评论开关 need_open_comment、only_fans_can_comment,以及封面图回退 imgs/cover.png。

使用方式:

  • 环境检查:npx -y bun ${SKILL_DIR}/scripts/check-permissions.ts
  • 图文:npx -y bun ${SKILL_DIR}/scripts/wechat-browser.ts --markdown article.md --images ./images/
  • 文章 API:npx -y bun ${SKILL_DIR}/scripts/wechat-api.ts <file> --theme <theme>
  • 文章浏览器:npx -y bun ${SKILL_DIR}/scripts/wechat-article.ts --markdown <markdown_file> --theme <theme>
  • 配置优先级:CLI 参数、frontmatter、EXTEND.md、技能默认值。
  • API 凭据写入 .baoyu-skills/.env,键为 WECHAT_APP_ID、WECHAT_APP_SECRET。

适用场景:需要将文章或图文内容批量/快速发布到微信公众号草稿箱的自动化流程。

限制:API 方式需公众号 API 凭据、速度快;浏览器方式需 Chrome 与首次登录会话、速度较慢;图文方式不支持纯文本、HTML 输入、主题与评论控制;文章 API 需要封面图,缺失时停止发布。当前无法确定具体平台与收费信息,资料未提供。