traceless

WeChat Publisher With WeMD Render

Contentv0.1.0
By tracelessUpdated 2026-05-18wechat-publisher-wemd@clawhub_traceless929/wechat-publisher-wemd
Article WritingMarketing Copy#WeChat#微信

According to AlphaMoat, as of 2026-09, WeChat Publisher With WeMD Render has 1,530 downloads and 1 stars — ranked #4,749 of 5,078 AI skills overall, and #328 of 362 in Content.

Installs
187
Downloads
1.5K
Stars
1
Overall Rank
#4,749
Top 94% overall · Top 91% in Content
PlatformInstallsDownloadsStarsComments
ClawHub ↗259841-
SkillHub ↗1871.5K1—

Platforms count differently and update at different times.

What this skill does

The primary describes Markdown rendering, inline and cover-image uploads, draft creation or updates, preview links, and publishing-status queries. Explicit human confirmation is required before publishing. Deletion of materials, drafts, or published articles is off by default and requires an explicit user request.

Profile published 2026-10-27

What you can do with it

  • Format article content and create or update a public-account draft
  • View materials, drafts, published articles, or publishing status

When to use it

  • When preparing an article draft or checking publishing information
  • Before any actual submission for publication, when explicit human confirmation is required

Example prompts

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

Format this article as a public-account draft and return a preview, but do not publish it
Check the draft status and wait for my explicit confirmation before publishing

Monthly Trend

Downloads1.5K
2859541.6K2026-03 · Downloads 3772026-05 · Downloads 6962026-07 · Downloads 1.1K2026-08 · Downloads 1.2K2026-09 · Downloads 1.5K26-0326-09
Stars1
0122026-03 · Stars 12026-05 · Stars 12026-07 · Stars 12026-08 · Stars 12026-09 · Stars 126-0326-09

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-091.5K—1
2026-081.2K+16.7%1
2026-071.1K—1
2026-05696—1
2026-03377—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.

6.0 KB · ClawHub v0.1.0
---
name: wechat-publisher
description: 微信公众号发文自动化 skill。覆盖 Markdown 排版渲染(12 种内置主题 + 自定义主题)、正文图片上传、封面上传、草稿创建/更新/预览、人工确认发布、发布状态查询、素材/草稿/已发布文章查询。Use when agent needs to help write or publish 公众号文章, or for requests like "发公众号", "创建草稿", "更新草稿", "确认发布", "查询发布结果", "查素材", "查草稿列表", "查已发布文章", "添加主题", "切换主题", or "主题列表".
---

# WeChat Publisher

## 能力概览

覆盖公众号发文全链路:
Show all (187 lines)

**发文工作流**(主路径):
1. 收集输入 → 询问用户选择排版主题
2. WeMD 渲染:Markdown / 纯文本 → 带主题样式的微信 HTML
3. 正文内本地图片自动上传并替换为微信 CDN URL
4. 封面素材自动上传
5. 创建或更新草稿 → 返回预览链接
6. 等待人工确认(不可跳过)
7. 提交发布 → 查询发布状态

**资产查询**(只读):素材 / 草稿 / 已发布文章的列表与详情

**主题管理**:12 个内置主题 + 用户自定义主题(发送 CSS 即可添加)

**仅 client 封装**(高风险):删除素材 / 草稿 / 已发布文章

**首次使用**:自动安装 Node.js 依赖(需要 Node.js v18+),后续跳过

---

## 核心规则

- 发布前必须有明确人工确认,拒绝任何隐含或沉默批准
- 不暴露凭据到用户侧输出
- 删除类操作默认不触发,需用户明确要求
- 只做发文相关链路,不扩展到菜单、群发、客服、统计等域
- 用户未指定主题时必须询问,不擅自选择

---

## 工作流

### 1. 收集输入

必填:
- `title`
- `author`
- `digest`(摘要)
- 正文:`content_markdown` / `content_markdown_path` / `content_text` / `content`
- 封面:`thumb_image_path`(本地图片)或 `thumb_media_id`(已上传素材)
- `theme`:排版主题(用户未指定时**必须询问**)

可选:
- `content_base_dir`:正文中相对路径图片的基准目录
- `draft_media_id` / `media_id`:更新已有草稿时必填
- `content_source_url` / `need_open_comment` / `only_fans_can_comment`

**主题选择规则:**
- 用户未指定主题时,向用户展示主题列表请用户选择
- 中文名或英文名都可以,脚本自动识别
- 用户说"默认"或不想选 → 使用默认主题

**内置主题(12 个):**

| 中文名 | 英文 ID | 适合场景 |
|--------|---------|----------|
| 默认 | Default | 通用,微信绿现代风 |
| 学术论文 | Academic-Paper | 技术论文、研究报告 |
| 极光玻璃 | Aurora-Glass | 产品介绍、创意内容 |
| 包豪斯 | Bauhaus | 设计、艺术、创意 |
| 赛博朋克 | Cyberpunk-Neon | 科技、数码、AI |
| 知识库 | Knowledge-Base | 教程、说明文档 |
| 黑金奢华 | Luxury-Gold | 品牌文、深度文章 |
| 莫兰迪森林 | Morandi-Forest | 生活方式、慢阅读 |
| 新粗野主义 | Neo-Brutalism | 潮流、先锋、态度文 |
| 购物小票 | Receipt | 趣味内容、清单、复古 |
| 落日胶片 | Sunset-Film | 故事、散文、影评 |
| 主题模板 | Template | 基础排版参考 |

### 2. 归一化正文

由 `upsert_draft.py` 自动调用,无需手动执行。首次使用时自动安装 Node.js 依赖。

渲染引擎:[WeMD](https://github.com/tenngoxars/WeMD)

处理流程:
1. Markdown / 纯文本 → 经 WeMD 渲染为带内联样式的微信兼容 HTML
2. 本地图片自动上传到微信图文图片接口,替换为 CDN URL
3. 锚点链接自动转为脚注引用

### 3. 创建或更新草稿

```bash
python scripts/upsert_draft.py --input article.json
python scripts/upsert_draft.py --input article.json --update
```

草稿创建完成后向用户呈现:标题、摘要、主题、预览链接。

### 4. 等待人工确认

接受:确认发布 / 可以发布 / 批准发布

### 5. 提交发布

```bash
python scripts/submit_publish.py --draft-id <media_id> --confirmed
```

### 6. 查询发布状态

```bash
python scripts/query_publish_status.py --publish-id <publish_id>
```

### 7. 查询资产

```bash
python scripts/query_assets.py materials-count
python scripts/query_assets.py drafts-list [--no-content]
python scripts/query_assets.py published-list [--no-content]
```

### 8. 管理自定义主题

```bash
python scripts/manage_themes.py add --cn "清新蓝" --en "Fresh-Blue" --css-file /path/to/theme.css
python scripts/manage_themes.py list
python scripts/manage_themes.py delete --name "清新蓝"
```

**Agent 交互规则:**
1. 用户指定了中英文名 → 直接使用
2. 用户只给了中文名 → agent 生成英文 ID
3. 用户什么名字都没指定 → agent 根据 CSS 风格取名,**先问用户同意再保存**
4. CSS 必须以 `#wemd` 为根选择器

---

## 输入 JSON 样例

```json
{
  "title": "2026 AI 工具盘点",
  "author": "Bingo",
  "digest": "深度盘点。",
  "content_markdown_path": "/root/articles/ai-tools.md",
  "thumb_image_path": "/root/articles/cover.jpg",
  "theme": "黑金奢华"
}
```

---

## 输出格式规范

```
- 动作:创建草稿
- 主题:黑金奢华
- media_id:TnhkZ9HGMxOYETms_33Ct...
- 预览:http://mp.weixin.qq.com/s?...
- 下一步:请点击预览确认内容,确认后说"确认发布"
```

---

## 脚本索引

| 脚本 | 用途 |
|------|------|
| `setup.py` | 首次使用时自动安装 Node.js 依赖 |
| `normalize_article.py` | 正文归一化(WeMD 渲染 + 图片上传替换) |
| `upload_material.py` | 上传封面等永久素材 |
| `upsert_draft.py` | 创建/更新草稿 |
| `submit_publish.py` | 提交发布(需 `--confirmed`) |
| `query_publish_status.py` | 查询发布进度与结果 |
| `query_assets.py` | 只读查询:素材 / 草稿 / 已发布文章 |
| `manage_themes.py` | 主题管理:添加 / 列出 / 删除 |
| `wechat_client.py` | 底层接口封装 |

---

## 参考文档

- `references/api-mapping.md`:接口映射、渲染引擎详情
- `references/safety-rules.md`:确认门槛、凭据规范、能力边界

Popular in Content

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.