From agi-super-team
Converts Markdown to WeChat Official Account HTML, inspects metadata and capabilities, generates cover images, and creates drafts. Also supports image posts (小绿书) and removing AI writing traces.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agi-super-team:md2wechatThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use `md2wechat` when the user wants to:
Use md2wechat when the user wants to:
Choose the command family before doing any publish action:
convert / inspect / preview when the user wants a standard WeChat article draft (news), HTML conversion, article metadata, article preview, or a draft that needs --cover.create_image_post when the user says 小绿书, 图文笔记, 图片消息, newspic, 多图帖子, or asks to publish an image-first post rather than an article HTML draft.小绿书 / 图文笔记 requests to convert --draft just because the user also has a Markdown article. A Markdown file can still be the image source for create_image_post -m article.md.convert --draft and create_image_post as different publish targets, not interchangeable command variants.md2wechat is already available on PATH.WECHAT_APPID and WECHAT_SECRET.~/.config/md2wechat/config.yaml.convert defaults to api mode unless the user explicitly asks for --mode ai.~/.config/md2wechat/config.yamlMD2WECHAT_BASE_URLmd2wechat.yaml, md2wechat.yml, or md2wechat.jsonapi.md2wechat_base_url or MD2WECHAT_BASE_URL.Run these before selecting a provider, theme, or prompt:
md2wechat version --jsonmd2wechat capabilities --jsonmd2wechat providers list --jsonmd2wechat themes list --jsonmd2wechat prompts list --jsonmd2wechat prompts list --kind image --jsonmd2wechat prompts list --kind image --archetype cover --jsonInspect a specific resource before using it:
md2wechat providers show openrouter --jsonmd2wechat providers show volcengine --jsonmd2wechat themes show autumn-warm --jsonmd2wechat prompts show cover-default --kind image --jsonmd2wechat prompts show cover-hero --kind image --archetype cover --tag hero --jsonmd2wechat prompts show infographic-victorian-engraving-banner --kind image --archetype infographic --tag victorian --jsonmd2wechat prompts render cover-default --kind image --var article_title='Example' --jsonWhen choosing image presets, prefer the prompt metadata returned by prompts show --json, especially primary_use_case, compatible_use_cases, recommended_aspect_ratios, and default_aspect_ratio.
When choosing an image model, prefer providers show <name> --json and read supported_models before hard-coding --model.
Configuration:
md2wechat config initmd2wechat config show --format jsonmd2wechat config validateConversion:
md2wechat inspect article.mdmd2wechat preview article.mdmd2wechat convert article.md --previewmd2wechat convert article.md -o output.htmlmd2wechat convert article.md --draft --cover cover.jpgmd2wechat convert article.md --mode ai --theme autumn-warm --previewmd2wechat convert article.md --title "新标题" --author "作者名" --digest "摘要"Image handling:
md2wechat upload_image photo.jpgmd2wechat download_and_upload https://example.com/image.jpgmd2wechat generate_image "A cute cat sitting on a windowsill"md2wechat generate_image --preset cover-hero --article article.md --size 2560x1440md2wechat generate_cover --article article.mdmd2wechat generate_infographic --article article.md --preset infographic-comparisonmd2wechat generate_infographic --article article.md --preset infographic-dark-ticket-cn --aspect 21:9md2wechat generate_infographic --article article.md --preset infographic-handdrawn-sketchnoteDrafts and image posts:
md2wechat create_draft draft.jsonmd2wechat test-draft article.html cover.jpgmd2wechat create_image_post --helpmd2wechat create_image_post -t "Weekend Trip" --images photo1.jpg,photo2.jpgmd2wechat create_image_post -t "Travel Diary" -m article.mdecho "Daily check-in" | md2wechat create_image_post -t "Daily" --images pic.jpgmd2wechat create_image_post -t "Test" --images a.jpg,b.jpg --dry-runWriting and humanizing:
md2wechat write --listmd2wechat write --style dan-koemd2wechat write --style dan-koe --input-type fragment article.mdmd2wechat write --style dan-koe --cover-onlymd2wechat write --style dan-koe --covermd2wechat write --style dan-koe --humanize --humanize-intensity aggressivemd2wechat humanize article.mdmd2wechat humanize article.md --intensity aggressivemd2wechat humanize article.md --show-changesmd2wechat humanize article.md -o output.mdFor convert, metadata resolution is:
--title -> frontmatter.title -> first Markdown heading -> 未命名文章--author -> frontmatter.author--digest -> frontmatter.digest -> frontmatter.summary -> frontmatter.descriptionLimits enforced by the CLI:
--title: max 32 characters--author: max 16 characters--digest: max 128 charactersDraft behavior:
--cover or --cover-media-id.--cover is a local image path contract for article drafts. --cover-media-id is for an existing WeChat permanent cover asset. Do not assume a WeChat URL or mmbiz.qpic.cn URL can be reused as thumb_media_id.inspect is the source-of-truth command for resolved metadata, readiness, and checks.preview v1 writes a standalone local HTML preview file. It does not start a workbench, write back to Markdown, upload images, or create drafts.convert --preview is still the convert-path preview flag; it is not the same thing as the standalone preview command.preview --mode ai is degraded confirmation only; it must not be treated as final AI-generated layout.--title / --author / --digest affect draft metadata, not necessarily visible body HTML.--upload or --draft, not during plain convert --preview.convert; image post / 小绿书 / newspic => create_image_post.inspect -> preview -> convert / --draft.小绿书, 图文笔记, 图片消息, newspic, or asks for a multi-image post, prefer create_image_post even when the source content lives in Markdown.generate_cover or generate_infographic over a raw generate_image "prompt" call when a bundled preset fits the task.45004, check digest/summary/description before assuming the body content is too long.When using md2wechat convert --mode ai --theme custom, select the appropriate theme from below based on article content and audience. Provide the full theme specification as the AI prompt for conversion.
| Category | # | Theme Name | Best For |
|---|---|---|---|
| 极简系 | 01 | Swiss Minimal | 设计、建筑、现代艺术 |
| 极简系 | 02 | Nordic Clean | 生活方式、家居、旅行 |
| 极简系 | 03 | Japanese Zen | 哲学、散文、东方美学 |
| 极简系 | 04 | Editorial Print | 深度报道、行业分析 |
| 暖色系 | 05 | Golden Hour | 生活方式、美食、情感 |
| 暖色系 | 06 | Coffee Notes | 创业日记、散文、感悟 |
| 暖色系 | 09 | Rose Quartz | 女性向、美妆、情感 |
| 暖色系 | 20 | Desert Dawn | 旅行、探险、自由生活 |
| 暗色系 | 07 | Elegant Noir | 品牌故事、高端生活方式 |
| 暗色系 | 08 | Deep Ocean | AI、科技、数据分析 |
| 暗色系 | 10 | Cyber Neon | 极客、Web3、未来文化 |
| 暗色系 | 18 | Midnight Blue | 深夜阅读、诗歌、哲学 |
| 文艺系 | 11 | Monet Garden | 文艺、艺术、自然 |
| 文艺系 | 12 | Academic Classic | 学术、知识、历史 |
| 文艺系 | 14 | Ink Wash | 东方文化、书画、禅 |
| 文艺系 | 17 | Forest Mist | 自然、冥想、可持续 |
| 现代系 | 13 | Aurora Gradient | 创意、设计、未来趋势 |
| 现代系 | 15 | Glass Morphism | 产品设计、UX、生活方式 |
| 现代系 | 16 | Brutalist Raw | 街头文化、独立观点 |
| 现代系 | 19 | Summer Mint | 流行文化、社交媒体 |
font-family: 'Helvetica Neue', sans-serif; max-width: 620px; line-height: 1.8; h2 { font-size: 28px; font-weight: 700; border-left: 4px solid #CC0000; padding-left: 16px; }body { background: #FAF7F2; color: #2C3E50; } h2 { color: #2C3E50; border-bottom: 2px solid #E8E0D5; padding-bottom: 8px; } blockquote { background: #FFF; border-radius: 8px; border-left: 3px solid #87CEEB; padding: 16px 20px; }body { background: #F5F0E8; color: #2B2B2B; } h2 { text-align: center; font-size: 24px; letter-spacing: 4px; margin: 48px 0 32px; } p { max-width: 560px; margin: 0 auto 24px; } .accent { color: #C04040; }font-family: Georgia, serif; max-width: 600px; p:first-of-type::first-letter { font-size: 3.5em; float: left; line-height: 0.8; padding-right: 8px; } blockquote { text-align: center; font-style: italic; font-size: 1.2em; }body { background: #FFF8F0; color: #5D4037; } h2 { color: #E67E22; } .highlight-box { background: linear-gradient(135deg, #FFE0B2, #FFCC80); padding: 20px; border-radius: 12px; }body { background: #FBF7F0; color: #3E2723; } h2 { font-family: 'ZCOOL XiaoWei', serif; color: #3E2723; border-bottom: 2px dashed #D7CCC8; } .note { background: #EFEBE4; border-left: 4px solid #A0522D; padding: 12px 16px; }body { background: #FDF5F5; color: #4A3548; } h2 { color: #C4727F; } .card { background: linear-gradient(135deg, #F5E0E5, #EDD5DC); border-radius: 12px; padding: 20px; } blockquote { border-left: 3px solid #C4727F; color: #8B6B7A; }body { background: #FAF0E6; color: #5D4037; } h2 { color: #C67B5C; border-left: 5px solid #C67B5C; padding-left: 16px; } .accent-green { color: #7B8D6F; } hr { border: 2px solid #E8C9A0; }body { background: #0A0A0A; color: #EAEAEA; } h2 { color: #D4AF37; font-family: 'Playfair Display', serif; text-align: center; letter-spacing: 2px; } hr { border-color: #D4AF37; height: 1px; } blockquote { border-left: 2px solid #D4AF37; color: #C9A84C; }body { background: #0A1628; color: #C8D6E5; } h2 { color: #00D4FF; font-family: 'Space Mono', monospace; } code { background: #1A2A4A; color: #00D4FF; padding: 2px 6px; border-radius: 3px; } pre { background: #0D2137; border: 1px solid #00D4FF33; } .data-card { border: 1px solid #00D4FF44; border-radius: 8px; }body { background: #0D0D0D; color: #E0E0E0; } h2 { color: #00FF41; text-shadow: 0 0 10px #00FF4188, 0 0 20px #00FF4144; font-family: 'Share Tech Mono', monospace; } a { color: #FF00FF; } blockquote { border-left: 3px solid #00FF41; box-shadow: 0 0 10px #00FF4122; }body { background: #0C1929; color: #B8C9E0; } h2 { color: #E8D5B7; font-family: 'Spectral', serif; text-align: center; } p { font-family: 'EB Garamond', serif; } .poem { text-align: center; font-style: italic; color: #7B9EC4; }body { background: #F5F2EB; color: #4A6B5D; } h2 { font-family: 'Dancing Script', cursive; color: #9B7CB6; font-size: 32px; } .impression-box { background: linear-gradient(135deg, #E8C4A044, #C4D7E044, #E8B4B844); border-radius: 16px; }body { background: #F9F6F0; color: #1B3A2D; } h2 { color: #B8943E; font-family: 'Playfair Display SC', serif; text-align: center; border-top: 1px solid #B8943E; border-bottom: 1px solid #B8943E; padding: 12px 0; } p::first-letter { color: #B8943E; }body { background: #F7F3EC; color: #1A1A1A; } h2 { font-family: 'ZCOOL XiaoWei', serif; color: #C04040; font-size: 28px; text-align: center; } blockquote { font-family: 'KaiTi', serif; writing-mode: vertical-rl; float: right; color: #666; } .seal { color: #C04040; }body { background: #F2F7F2; color: #2D4A3E; } h2 { color: #4A7C59; font-weight: 300; } .card { background: #FFF; border-radius: 16px; box-shadow: 0 2px 16px rgba(45,74,62,0.06); } blockquote { border-left: 3px solid #7B9D6E; background: #F2F7F2; }body { background: #1A1A2E; color: #E8E8F0; } h2 { background: linear-gradient(135deg, #6C63FF, #00F5A0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .glass-card { background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); border: 1px solid rgba(108,99,255,0.3); border-radius: 12px; }body { background: #F2F2F7; color: #2C2C2E; } .glass { background: rgba(255,255,255,0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 16px; border: 1px solid rgba(0,0,0,0.08); } h2 { color: #007AFF; }body { background: #FFF; color: #000; } h2 { font-family: 'Anton', sans-serif; font-size: 36px; border: 4px solid #000; display: inline-block; padding: 8px 16px; } .brutal-box { border: 3px solid #000; padding: 20px; box-shadow: 6px 6px 0 #000; } a { color: #FF4500; text-decoration: underline; }body { background: #F0FFF4; color: #2D3436; } h2 { color: #00B894; font-family: 'Quicksand', sans-serif; } .bubble { background: #FFF; border-radius: 18px; box-shadow: 0 4px 12px rgba(0,184,148,0.12); padding: 16px; } .tag { background: #55EFC4; border-radius: 20px; color: #2D3436; padding: 4px 12px; }To use these themes with md2wechat AI mode, specify the theme name and provide its specification as the AI prompt:
# AI mode with custom theme prompt
md2wechat convert article.md --mode ai --theme custom --preview
# Combine with humanization
md2wechat convert article.md --mode ai --theme custom --preview
md2wechat humanize article.md --intensity medium
# Full pipeline with cover generation
md2wechat convert article.md --mode ai --theme custom -o output.html
md2wechat generate_cover --article article.md --preset cover-hero
md2wechat convert output.html --draft --cover cover.jpg
When using AI mode conversion, embed the selected theme's color palette, font stack, layout rules, and CSS core into the AI prompt to guide the HTML generation.
铁律 (2026-06-03, Daniel Li 反馈): 公众号发布前 必须 先渲染 HTML 视觉预览 → 检查渲染问题 → 修复后再发布。绝不允许「渲染→发布」二步并一步。
WeChat 公众号编辑器和常规 HTML 浏览器渲染存在以下差异,不预览直接发布会导致用户在前台看到排版事故:
<style> 中的部分 CSS 会被微信编辑器过滤(如 position: fixed)tech 主题在每个 <li> 前面注入 $ 装饰 span,叠加微信默认 list-style:disc 会出现 •$ 文本 双重前缀每次发布前必须执行,不允许跳过:
# Step 1: 渲染并保存 HTML
md2wechat convert article.md --mode ai --theme <theme> -o /tmp/review.html
# Step 2: 视觉预览(生成本地 HTML 截图或浏览器打开)
open /tmp/review.html # macOS
# 或使用 Playwright/Chrome 截图
playwright screenshot --full-page /tmp/review.html /tmp/review.png
# Step 3: 检查清单(必须全部 ✅ 才能发布)
# ✅ list 渲染:ul/ol 是否有重复前缀($ / • / -)
# ✅ list 渲染:是否有 list-style:none 与 list-style-type 冲突
# ✅ code 渲染:代码块是否有高亮 span 嵌套错误
# ✅ table 渲染:表头和隔行背景是否清晰
# ✅ blockquote 渲染:暗色主题下文字是否可读
# ✅ heading 渲染:H1/H2 编号徽章是否对齐
# ✅ 图片渲染:cover 和内联图是否上传成功、是否溢出
# Step 4: 修复(用 scripts/fix-list-rendering.js 等后处理脚本)
node scripts/fix-list-rendering.js /tmp/review.html -o /tmp/review-fixed.html
# Step 5: 重新预览 → 确认无误 → 才允许发布
md2wechat convert /tmp/review-fixed.html --draft --cover cover.jpg
| 主题 | 问题 | 修复 |
|---|---|---|
tech (深色终端风) | <li> 前面有 $ 装饰 span + list-style:none,与 <ul> 的 list-style-type:disc 冲突 → 公众号渲染出 •$ 文本 双重前缀 | 移除 $ span,移除 list-style:none,让微信默认 disc/decimal 渲染 |
tech | blockquote 使用 linear-gradient(#0F172A,#1E293B) 深色背景 + #94A3B8 浅灰文字 → 部分主题下文字-背景对比度 < 4.5:1,无障碍不达标 | 提高文字色亮度到 #D1FAE5 或 #E0F2F1 |
tech | 代码块 <code> 内联 span 颜色 #B91C1C 在深色背景下对比度不足 | 改为 #FCA5A5 或 #FECACA |
business | 表格 <th> 渐变背景在公众号中可能丢失,文字看不清 | 改用纯色 #1E40AF |
simple | H2 左侧 4px 绿色竖条在某些公众号编辑器被裁切 | 改用 border-left: 4px solid 而非 box-shadow |
| 任何主题 | <ul style="padding-left:28px"> 在 6.5 寸屏上偏右 | 改 padding-left:24px |
发布前必跑的修复脚本(位于 scripts/):
scripts/fix-list-rendering.js — 修复列表重复前缀scripts/check-rendering.py — 渲染问题静态检查(grep 已知问题模式)scripts/wechat-preview.html — 公众号兼容的本地预览模板md2wechat convert 后直接 md2wechat convert --draftpreview 或视觉检查就发到草稿箱tech 主题下使用默认 HTML 模板不经过审查就发每次发布到草稿箱前,AI Agent 必须输出审查报告:
✅ 排版审查报告 (2026-06-03)
- 主题: tech (深色终端风)
- 文件: /tmp/review-fixed.html
- 列表 ul/ol: 0 个重复前缀 / 0 个 list-style:none
- 代码块: 12 个,高亮正常
- 表格: 1 个,隔行背景正常
- 引用块: 0 个,文字可读
- 封面: markitdown-cover.png ✅
- 审查结论: 可发布
npx claudepluginhub aaaaqwq/agi-super-team --plugin agi-super-teamConverts Markdown to WeChat Official Account HTML. Automates article formatting, draft upload, image generation (covers, infographics), image-post creation, title suggestions, AI trace removal, and writer-style drafting.
Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting with HTML/markdown/plain text and image-text posts with multiple images.
Posts content to WeChat Official Account via API or Chrome CDP. Supports articles (HTML/markdown/text) and image-text posts. Converts markdown links to citations for WeChat-friendly output.