mcpbeat Sign in

Wechat Formatter Skill for Claude

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。**触发场景**:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 `<style>` 标签,必须把所有 CSS 内联到每个 HTML 元素的 style 属性里——本 skill 用 doocs/md 主题完成这件事。本 skill 只负责格式转换;写作交给 wechat-writer,发布交给 wechat-publisher。

6k tokens
context cost
the whole folder, loaded on every use
3
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
130
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/YiShu5/claude-skills --skill wechat-formatter

What comes with it

19 552 bytes besides the instruction
scripts/config.py
scripts/markdown_to_wechat_doocs.py

The instruction itself

1 sections, as written by the author

wechat-formatter · Markdown → 微信 HTML

只解决一件事:把 Markdown 转成微信编辑器粘贴后样式不丢的 HTML

核心问题

微信公众号编辑器不识别 <style> 标签和 CSS class。所以普通的 markdown → html 转换器输出的 HTML 粘到微信里会变成裸文本,所有样式全丢。

唯一可靠方案:所有 CSS 都内联到元素的 style="..." 属性里。doocs/md 是这件事的开源标准,本 skill 直接调用它。

使用方法

python3 scripts/markdown_to_wechat_doocs.py \
  --input drafts/article.md \
  --output drafts/article.html \
  --theme <主题名>

输出的 HTML 可以直接复制粘贴到微信公众号编辑器,样式全部保留。

主题选择

8 个主题,按文章内容氛围选(不只看标题关键词):

| 文章基调 | 推荐主题 | 适用 |

| --- | --- | --- |

| 温暖、励志、有人情味 | orange | 个人成长 / 励志 / 鸡汤 / 故事 |

| 专业、理性、技术感 | blue | 技术评测 / 工具教程 / 商业分析 |

| 清新、自然、放松 | green | 健康养生 / 户外 / 环保 |

| 文艺、清爽、小清新 | cyan | 文艺随笔 / 旅行 / 生活美学 |

| 优雅、高端、品牌 | purple | 品牌故事 / 艺术文化 / 设计 |

| 简约、高级、极简 | black | 摄影 / 极简主题 / 严肃话题 |

| 热情、节日、醒目 | red | 节日 / 重要通知 / 活动 |

| 甜美、浪漫、少女 | pink | 情感 / 美妆 / 少女向 |

选择原则:读完 Markdown 后,问自己"这篇要给读者什么情绪",再选主题。不要靠标题关键词匹配(比如标题里没"励志"也可能是励志文)。

如果用户已在 .env 设了 MARKDOWN_THEME:除非用户明确说"换个主题",否则用 .env 里的。

输出验收

转出来的 HTML 必须:

  • [ ] 不包含 <style> 标签(所有样式必须内联)
  • [ ] 不包含 CSS class(微信不解析)
  • [ ] 图片如果是本地路径 → 必须先用 wechat-publisher 的 upload_material.py 换成微信 URL,否则发布后图片裂掉

不做的事

  • 不发布到草稿箱 → 用 wechat-publisher
  • 不写文章 / 不改稿 → 用 wechat-writer
  • 不生成封面图 → 用 wechat-publisher 的 generate_cover.py
  • 不上传本地图片到微信 CDN → 用 wechat-publisher 的 upload_material.py(如果 Markdown 里有 !,先告诉用户调用 publisher 上传换链接,再回来排版)

配置

.env 文件支持的变量:

MARKDOWN_THEME=        # orange / blue / green / purple / red / cyan / black / pink
                       # 留空则让 agent 按内容判断

Other skills for the same job

different authors, same section of the catalogue
Vitepress
by christophacham
×2

VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.

16k tokens
Bids
by K-Dense-AI
×1

> organizing neuroscience and biomedical data (MRI, EEG, MEG, iEEG, PET, microscopy, NIRS, motion capture, EMG, MR spectroscopy, behavioral), querying BIDS layouts, validating compliance, converting DICOM to BIDS, writing metadata sidecars, or creating BIDS derivatives.

229k tokens scripts
Shopify Developer
by christophacham
×1

Complete Shopify development reference covering Liquid templating, OS 2.0 themes, GraphQL APIs, Hydrogen, Functions, and performance optimization (API v2026-01). Use when working with .liquid files, building Shopify themes or apps, writing GraphQL queries for Shopify, debugging Liquid errors, creating app extensions, migrating from Scripts to Functions, or building headless storefronts. Triggers on "Shopify", "Liquid template", "Hydrogen", "Storefront API", "theme development", "Shopify Functions", "Polaris". Do NOT use for non-Shopify e-commerce platforms.

39k tokens
Writing Page Layout
by ComeOnOliver
×1

Use this skill when you need to write code for a page layout in the Next.js

2k tokens
Od Contribute
by nexu-io

One-click contribution flow for Open Design (nexu-io/open-design) — even for non-coders. Pick one of four cards (ship a Skill or Design System you made with OD; translate docs; fix a typo / write a blog; report a bug), the agent validates and opens a PR (or issue) for you. Trigger words contribute to open design, ship my OD skill, ship my OD design system, translate OD docs, report an OD bug, od-contribute.

19k tokens scripts
Draw Io Diagram Generator
by github
vendor

Use when creating, editing, or generating draw.io diagram files (.drawio, .drawio.svg, .drawio.png). Covers mxGraph XML authoring, shape libraries, style strings, flowcharts, system architecture, sequence diagrams, ER diagrams, UML class diagrams, network topology, layout strategy, the hediet.vscode-drawio VS Code extension, and the full agent workflow from request to a ready-to-open file.

34k tokens scripts
Frontend
by redis
vendor

>- component folder structure, styled-components, hooks, named exports, barrel files, layout components, and theme usage. Use when editing any file under redisinsight/ui/**, writing or modifying React components, Redux slices, styled-components, custom hooks, or when the user mentions UI, frontend, React, Redux, or styled-components.

3k tokens
Md2wechat
by geekjourneyx

Convert Markdown to WeChat Official Account HTML, inspect supported providers/themes/prompts, generate article images, create drafts, write with creator styles, prepare title suggestions, and remove AI writing traces.

3k tokens

How to use it

Copy the folder

Take yishu5/wechat-formatter from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.