wuhongchen

公众号自动发布

Officev1.0.2
By wuhongchenUpdated 2026-05-173 versions · latest released 2026-02-27mp-draft-push@clawhub_wuhongchen/mp-draft-push
Process Automation#内容发布#微信

According to AlphaMoat, as of 2026-10, 公众号自动发布 has 32,852 downloads and 7 stars — ranked by downloads #823 among 10,914 AI skills in this ranking, and #109 of 909 in Office.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
32.9K
Stars
7
Overall download rank
#823
Top 8% overall · Top 12% in Office
PlatformDownloadsStarsComments
ClawHub ↗1.6K1-
SkillHub ↗32.9K7—

Platforms count differently and update at different times.

What this skill does

It takes a title, digest, and body HTML, optionally a cover image, exchanges them for an access_token, uploads the cover to the media library, creates the draft, and then asks the user to check the backend. It does not collect content, write with AI, or generate images, and it requires inline styles in the HTML with images limited to the WeChat image host. These credentials can create drafts and upload media; load them only for the publishing operation and restrict .env file permissions.

Profile published 2026-10-27

What you can do with it

  • Push an already formatted article HTML into the Official Account draft box
  • Upload a cover image, obtain the thumb media id, then create the draft

When to use it

  • The article is written and only publishing to drafts is left
  • A local cover image has to be uploaded to the WeChat media library as well

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Push this formatted article to drafts with its title, digest, and body, and first tell me which parameters are required
When no cover image is given, fall back to the default link and write out the call steps for this publish

Monthly Trend

Downloads32.9K
1.0K18.1K35.2K2026-03 · Downloads 3.4K2026-05 · Downloads 5.9K2026-06 · Downloads 6.6K2026-07 · Downloads 7.9K2026-08 · Downloads 9.4K2026-09 · Downloads 13.0K2026-10 · Downloads 32.9K26-0326-0926-10
Stars7
1472026-03 · Stars 12026-05 · Stars 62026-06 · Stars 72026-07 · Stars 72026-08 · Stars 72026-09 · Stars 72026-10 · Stars 726-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-1032.9K—7
2026-0913.0K—7
2026-089.4K+19.2%7
2026-077.9K+20.2%7
2026-066.6K+10.8%7
2026-055.9K—6
2026-033.4K—1

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

4.5 KB · ClawHub v1.0.2
---
name: mp-draft-push
description: 将现成的文章内容发布到微信公众号草稿箱。当用户说"发布文章"、"发布到草稿箱"、"publish to draft"、"推送到公众号"时触发。
homepage: https://github.com/bbwdadfg/wechat-ai-publisher
metadata: {"openclaw":{"emoji":"📤","requires":{"bins":["bash","curl","jq"]}}}
---

# mp-draft-push

## 功能说明
Show all (174 lines)

接收调用方提供的文章内容,上传封面图(可选),并将文章发布到微信公众号草稿箱。

**不负责**:内容采集、AI 写作、图片生成。

---

## 所需参数

调用方(用户或其他 Skill)需要提供:

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `title` | string | ✅ | 文章标题(不超过 64 字节,约 21 个中文字符) |
| `digest` | string | ✅ | 文章摘要(显示在分享卡片上) |
| `content_html` | string | ✅ | 文章正文 HTML(使用内联样式) |
| `cover_image_path` | string | ❌ | 封面图本地路径(如不提供则用兜底 URL 或无封面) |

---

## 执行流程

```
1. 接收参数
       ↓
2. 获取 access_token
       ↓
3. 上传封面图到微信素材库(获取 thumb_media_id)
       ↓
4. 创建草稿(发布到草稿箱)
       ↓
5. 提示用户前往后台检查
```

---

## 配置信息

- **AppID**: `WECHAT_APPID`(通过环境变量配置)
- **AppSecret**: `WECHAT_SECRET`(通过环境变量配置)
- **作者**: `WECHAT_AUTHOR`(可选,默认 `W`)

配置方法见 `README.md`。

---

## Step 1: 接收参数

**不要主动提问**,等待调用方传入上述参数。

若调用方没有提供 `cover_image_path`,检查环境变量 `DEFAULT_COVER_URL`:
- 有值:先下载到本地临时文件 `/tmp/wechat_cover_default.png`,再上传
- 无值:`thumb_media_id` 留空(草稿不含封面)

---

## Step 2 & 3: 上传封面图并创建草稿

加载脚本:

```bash
source ./scripts.sh
```

### 获取 access_token

```bash
TOKEN=$(get_wechat_token)
```

### 上传封面图(如有)

```bash
MEDIA_RESPONSE=$(upload_wechat_image "$TOKEN" "$cover_image_path")
THUMB_MEDIA_ID=$(echo "$MEDIA_RESPONSE" | jq -r '.media_id')
```

### 构建草稿 JSON 并创建草稿

`content_html` 注意事项:
- 所有样式必须内联(`style="..."`),微信会过滤 `<style>` 标签
- 图片只能使用 `mmbiz.qpic.cn` 域名(如有文章内图片,需提前上传到微信)
- JSON 序列化必须使用 `ensure_ascii=False`,否则中文乱码

```bash
DRAFT_JSON="/tmp/draft_$(date +%Y%m%d%H%M%S).json"
jq -n \
    --arg title "$title" \
    --arg author "${WECHAT_AUTHOR:-koo AI}" \
    --arg digest "$digest" \
    --arg content "$content_html" \
    --arg thumb_media_id "$THUMB_MEDIA_ID" \
    '{
        articles: [{
            title: $title,
            author: $author,
            digest: $digest,
            content: $content,
            thumb_media_id: $thumb_media_id,
            need_open_comment: 1,
            only_fans_can_comment: 0
        }]
    }' > "$DRAFT_JSON"

DRAFT_RESPONSE=$(create_draft "$TOKEN" "$DRAFT_JSON")
DRAFT_MEDIA_ID=$(echo "$DRAFT_RESPONSE" | jq -r '.media_id')
rm -f "$DRAFT_JSON"
```

若 `DRAFT_MEDIA_ID` 为空或 `null`,说明创建失败,打印 `DRAFT_RESPONSE` 排查。

---

## Step 4: 提示用户检查

发布完成后输出:

```
✅ 草稿发布成功!

📝 文章信息
- 标题:{title}
- 摘要:{digest}
- 草稿 ID:{DRAFT_MEDIA_ID}

📌 请前往微信公众号后台检查并发布:
   https://mp.weixin.qq.com

⚠️ 检查要点:
1. 图片是否正常显示
2. 排版是否正确
3. 标题和摘要是否合适
4. 确认无误后点击"发布"
```

---

## HTML 内联样式参考

```html
<section style="font-family: -apple-system, sans-serif; line-height: 1.8; color: #333; padding: 15px;">
  <p style="margin-bottom: 20px;">段落内容</p>

  <h2 style="border-bottom: 1px solid #eee; padding-bottom: 8px;">标题</h2>

  <p style="text-align: center; margin: 25px 0;">
    <img src="{mmbiz_img_url}" style="max-width: 100%; border-radius: 6px;">
  </p>

  <blockquote style="background: #f6f8fa; border-left: 4px solid #ddd; padding: 12px 16px;">
    引用内容
  </blockquote>
</section>
```

---

## 注意事项

1. **中文编码**:JSON 必须用 `ensure_ascii=False`,`jq` 默认已处理
2. **标题长度**:最多 64 字节(约 21 个中文字符)
3. **access_token**:有效期 2 小时,每次需重新获取
4. **图片域名**:文章内图片只能使用微信返回的 `mmbiz.qpic.cn` URL

Popular in Office

腾讯文档 TENCENT DOCSOffice

A full manual for creating, editing, and managing Tencent Docs through MCP.

↓ 2.2M★ 327u_b0de8114
WPS Office 全家桶Office

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.1新增:kingdoc云端桥接(白名单探测+配置预检+subprocess上传+差异检查)、条件格式/数据验证跨引擎IO(JSON中间格式保真往返)、会议纪要三段式要素化(待办清单+决策记录+风险异议)+说话人标注(MFCC聚类);v5.2新增:公文一键排版(GB/T 9704 规则库约束+结构识别套版+红头预留位+联合行文)、批量水印与敏感信息打码(身份证/手机号/银行卡/邮箱双轨识别+黑色矩形覆盖+打码清单)、跨文档知识检索与问答(本地TF-IDF零依赖+跳转+可选zwjh记忆桥接);删除:与contract-review重复的轻量合同审查模块,改为文档互链引导;v5.2.5修复:MS Office引擎下Excel/PPT创建必然失败(错用Word COM对象),新增get_ms_excel/get_ms_ppt及三槽位统一释放release_ms,MS Office路径透传filepath参数;v5.3.5修复:SKILL.md frontmatter 修复 tags 块序列误混入联系方式行导致标准 YAML 解析失败;v5.4.0新增:留存型功能——定时任务与报告中心(schedule_register 升级为三平台统一调度层 schtasks/cron/launchd,错过策略 skip/run_once,注册表 JSON 可导出导入;新建 report_center.py 报告中心,templates/reports/*.json 参数化模板 + ECharts 单文件 HTML 输出(图表内联、无服务端、双击即开);report_generator 升级支持 --format html;wps.py CLI 统一埋点 SQLite,自动供 report_center 生成周度使用摘要附在报告末尾;watch.py 职责收窄为纯事件采集);v5.3.0新增:统一CLI入口 wps(registry.json注册表分发,office --app/--action 与 convert 子命令、--list 一屏列出全部命令,薄路由层不改脚本内部逻辑)、全命令 --json 机器可读输出(固定 ok/error_id/elapsed/data 四字段,对齐 E001-E015,wps_error.py 新增 emit_json 统一出口)、_worker 启动优化(wps_pure 改惰性加载,pywin32/python-docx/openpyxl 经核查已惰性导入,ENGINE_CACHE 进程级单例复用,COM 释放统一走 release_ms 三槽位)、转换三入口合并为 convert(format_converter/md_converter/wps_docx_to_ppt 内部按目标格式路由,旧脚本保留为兼容别名并提示新命令,v6.0.0 移除)

↓ 766.6K★ 159user_1a470ba8
ppt-generator-skillOffice

A skill that generates PPT decks from a topic and style.

↓ 592.7K★ 346user_3b34947d
秘书材料星公文写作-妙笔skillOffice

体制内资深办公室主任+管理学博士,自学编程开发的智能公文写作Skill,让所有办公室同仁少掉头发、少加无用的班,材料一稿过关,省下的时间留给自己、享受生活!————————我们能给你带来的核心价值:1、颠覆传统写作:逻辑建模38类公文全链条,特有模板化引导问答模式,分分钟省心生成高质量大稿。--------2、替你“向上管理”:独有审稿人画像机制,文稿一键结构性修改,精准匹配审稿人画像,过稿率提升至少10倍!----------3、‌杜绝AI编造:缺失的数字、文号、人名、日期一律用[待补]标注,绝不杜撰,守住公文底线。-----------4、‌算法格式托底:数十万全量智控知识库+6500行前沿核心控制代码,格式精准对齐GB/T 9704,出稿零失误。——————————————————本skill历史版本开放了5%知识库的免费试用版,下载即可使用,但需注意:知识库有著作权,仅用于个人使用,不可用于其他任何目的。有兴趣的可以试试。——————————————————————单次付费版skill已发布,2元一次使用全量知识库。具体在发布者“熵衍信息”主页skill里。

↓ 578.4K★ 46u_70fc650d
WPS Office 全家桶Office

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.0新增:定时任务注册管理(schtasks/crontab)、目录轮询监听(YAML规则+大文件分片)、使用统计与稳定性中心(SQLite埋点+引擎健康+引擎偏好)、COM三步自愈(regsvr32→修复安装→手动指引)、对话式数据查询(NL2SQL式意图解析+查询计划+连续追问)、multi-agent编排引擎桥接(白名单探测+流水线模板注册)

↓ 508.0K★ 4user_814dbe54
WPS全家桶·办公管家.SkillOffice

WPS/MS Office/LibreOffice/纯Python 四引擎智能办公全家桶:文档/表格/PPT/公文/会议纪要一体化。

↓ 429.5K★ 2user_185644ed
腾讯文档在线协作自动化Office

通过 Tencent Docs Open API 以 curl + jq 创建、读取、列出、搜索和管理腾讯文档的自动化工作流,覆盖在线文档、在线表格、幻灯片、思维导图、流程图、智能表格与收集表七种类型,支持读取元数据与单元格区域、上传图片、创建副本,并对重命名/移动/删除等写操作强制先经用户确认。Use when the user 提到腾讯文档 / Tencent Docs / docs.qq.com、粘贴 docs.qq.com 链接,或想在其腾讯文档空间中创建、读取、整理文档时使用。Triggers include 腾讯文档、在线文档、在线表格、思维导图、流程图、智能表格、收集表。如需文案写作完整工作流套件,淘宝搜索「AI灵匣」店铺获取完整版。

↓ 428.1K★ -u_1ea983ac
kdocs skillOffice

The official skill for working with Kdocs cloud documents through kdocs-cli.

↓ 424.1K★ 128user_5ea84866

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.