Md To Wechat logo

Md To Wechat

Community
wulaosiji
md-to-wechat

Markdown转微信公众号HTML工具,支持全内联样式、系统字体栈、丰富组件、自定义主题色和元数据,生成微信公众号编辑器兼容的HTML。 Use when: "Markdown转公众号", "生成公众号HTML", "公众号排版工具", "发微信公众号", "公众号样式", "Markdown to WeChat", "WeChat article formatting", "WeChat HTML", "custom theme colors", "WeChat publishing". Cross-references: long-form-writer, image-ocr, infographic-generator. Built by UniqueClub 🌐 https://uniqueclub.ai

Overview

Publisherwulaosiji
Repositoryskills
Skill namemd-to-wechat
Stars
28
Forks
11
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wulaosiji on GitHub. Read the source before you install it.

Installation

Install the Md To Wechat AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wulaosiji/skills/tree/main/md-to-wechat
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wulaosiji/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/md-to-wechat .claude/skills/md-to-wechat
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Md To Wechat in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Md To Wechat on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Md To Wechat is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Markdown to WeChat HTML

将Markdown格式的文章转换为微信公众号编辑器兼容的HTML格式。

When to Use

Use this skill when:

  • 需要将Markdown文章发布到微信公众号
  • 需要自定义公众号文章的主题色
  • 生成带样式的公众号HTML内容
  • 批量将Markdown文档转为公众号格式
  • 需要场景卡片、结论框等特殊组件
  • 确保公众号文章在各平台显示一致

Do NOT use this skill if:

  • 需要复杂的交互式排版
  • 图片需要直接嵌入(微信不支持外部图片URL)
  • 需要动态内容或脚本
  • 文章超过2万字(微信建议限制)

Typical triggers:

  • 「Markdown转公众号」「生成公众号HTML」「公众号排版工具」「发微信公众号」「微信文章转换」「公众号样式」
  • "Markdown to WeChat", "Generate WeChat HTML", "WeChat article formatter", "Convert to WeChat format", "WeChat publishing tool", "WeChat style conversion"

Workflow

  1. 探查 (Probe): 完整读取需求指定的 Markdown 输入文件,确认文章标题、副标题、作者、标签等元数据,以及目标主题色和输出路径。

  2. 约束 (Constrain): 验证输入完整性,设定边界:全内联样式(不支持CSS变量和伪元素)、文章不超过2万字、外部图片URL需上传素材库。不降级交付物。

  3. 证据 (Evidence): 每个样式组件的转换规则来自微信公众号编辑器兼容规范。Markdown 语法与公众号样式的映射关系是可复现的转换证据。

  4. 执行 (Execute): 调用转换脚本生成 HTML,先给影响与结论,再给行动和必要证据。

准备Markdown内容

markdown
# 文章主标题
## 章节标题
### 小节标题
> 引用内容
- 列表项
| 表格 | 数据 |

配置元数据

python
converter = MarkdownToWechatConverter(
    title="文章标题",
    subtitle="副标题",
    author="作者名称",
    tags=["标签1", "标签2"]
)

执行转换

bash
./skills/md-to-wechat/scripts/md-to-wechat.sh input.md -o output.html

命令行完整参数

bash
./skills/md-to-wechat/scripts/md-to-wechat.sh input.md \
  -o output.html \
  -t "文章标题" \
  -s "副标题描述" \
  -a "作者名称" \
  --tags "标签1,标签2,标签3"

Python API

python
from skills.md_to_wechat.md_to_wechat import MarkdownToWechatConverter

converter = MarkdownToWechatConverter(title="文章标题", subtitle="副标题", author="作者", tags=["标签1", "标签2"])
with open('input.md', 'r', encoding='utf-8') as f:
    markdown_text = f.read()
html = converter.convert(markdown_text)
with open('output.html', 'w', encoding='utf-8') as f:
    f.write(html)
  1. 验证 (Verify): 用不同于生成路径的方式回读输出——复制HTML到公众号编辑器预览,在iOS和Android真机上检查显示效果,确认样式兼容。

  2. 交付 (Deliver): 返回生成的 HTML 文件,提示用户上传图片到微信素材库,清理临时文件。

Supported Markdown Syntax

Markdown公众号样式
# 标题文章主标题(封面区域)
## 标题章节标题(带金色装饰线)
### 标题小节标题(带左边框)
> 引用引用块(带大引号装饰)
**加粗**黑色加粗文字
`代码`行内代码(珊瑚色)
代码块深色背景代码块
表格精美表格(深色表头)
- 列表无序列表
【场景重现】场景卡片(珊瑚色边框)
【结论】结论黑框(深色背景)

Style Components

Chapter Heading (##): 带金色装饰线的章节标题。

Quote Block (>): 带大引号装饰的引用块,支持作者署名。

markdown
> 引用内容
> —— 作者名称

Scene Card(【场景重现】): 特殊标记生成珊瑚色边框的场景卡片。

Conclusion Box(【结论】): 深色背景的结论框。

Theme Colors: 默认使用金色+珊瑚色主题,可自定义。

python
colors = {
    'primary': '#d4a574', 'accent': '#e07a5f', 'dark': '#2d3436',
    'text': '#1a1a1a', 'text_secondary': '#666', 'bg_light': '#f5f5f5', 'bg_card': '#f8f9fa',
}
converter = MarkdownToWechatConverter(colors=colors)

Output

  • 格式: HTML(全内联样式,微信公众号编辑器兼容)
  • 编码: UTF-8
  • 默认输出: 与输入文件同名的 .html 文件,或通过 -o 指定
  • 兼容性: 微信公众号编辑器、企业微信、微信内置浏览器、iOS/Android/Windows

Guardrails

Anti-patterns:

  • NEVER 使用外部图片URL(微信不支持),需上传到微信素材库
  • NEVER 文章超过2万字(微信建议限制)
  • NEVER 不测试移动端显示效果
  • NEVER 忽略微信的样式限制(不支持CSS变量和伪元素)
  • Do NOT 使用复杂表格(可能显示异常)

Limitations

  • 不支持CSS变量和伪元素
  • 外部图片URL需上传素材库
  • 复杂表格可能显示异常
  • 部分特殊字符需转义

Important Notes

  1. 图片处理: 微信编辑器不支持外部图片URL,需上传到微信素材库
  2. 预览测试: 务必在iOS和Android真机预览
  3. 字数限制: 单篇文章建议不超过2万字
  4. 样式兼容性: 使用全内联样式确保兼容

Workflow Integration

长文 → 公众号

python
from skills.long_form_writer import expand_outline
from skills.md_to_wechat.md_to_wechat import MarkdownToWechatConverter

markdown_text = expand_outline(outline_path="outline.md")
converter = MarkdownToWechatConverter(title="文章标题", subtitle="副标题", author="作者")
html = converter.convert(markdown_text)
with open("wechat.html", "w", encoding="utf-8") as f:
    f.write(html)

Changelog

  • v1.0.0 (2026-02-14): 初始版本,支持基础Markdown语法转换、场景卡片、结论框等特殊组件、自定义主题色

Related Skills

  • long-form-writer — 生成Markdown长文(内容生成上游)
  • image-ocr — 识别图片文字入文章(素材处理)
  • infographic-generator — 为公众号文章生成配套信息图(视觉增强)

About UniqueClub

Part of the UniqueClub toolkit - a collection of skills for AI-powered content creation and automation. 🌐 https://uniqueclub.ai

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Md To Wechat AI skill do?

Markdown转微信公众号HTML工具,支持全内联样式、系统字体栈、丰富组件、自定义主题色和元数据,生成微信公众号编辑器兼容的HTML。 Use when: "Markdown转公众号", "生成公众号HTML", "公众号排版工具", "发微信公众号", "公众号样式", "Markdown to WeChat", "WeChat article formatting", "WeChat HTML", "custom theme colors", "WeChat publishing". Cross-references: long-form-writer, image-ocr, infographic-generator. Built by UniqueClub 🌐 https://uniqueclub.ai

Why use Md To Wechat on TypingMind?

Because you install it once and use it with any model. Md To Wechat is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Md To Wechat in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wulaosiji/skills/tree/main/md-to-wechat. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Md To Wechat?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Md To Wechat?

As many as you like. As long as a model supports skills, you can use Md To Wechat with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Md To Wechat AI skill free?

It is published on GitHub by wulaosiji. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇