Agent skill

Wechat Formatter

by YiShu5 in YiShu5/claude-skills

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。触发场景:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 <style 标签,必须把所有 CSS 内联到每个 HTML…

MITAuto-check: notesProductivity & Automation

Install Wechat Formatter

skills CLI
$ npx skills add YiShu5/claude-skills --skill wechat-formatter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install YiShu5/claude-skills wechat-formatter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/YiShu5/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wechat-formatter .claude/skills/wechat-formatter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wechat-formatter
GitHub stars
132
Token cost
~492 tokens
SKILL.md length
131 words
Files
3 (incl. scripts)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。触发场景:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 <style 标签,必须把所有 CSS 内联到每个 HTML…

  • Tasks that involve Messaging and chat bots
  • SKILL.md covers 核心问题, 使用方法, 主题选择 and 输出验收, plus 2 more sections
  • Runs Python scripts from its folder; calls python3
  • Tasks that involve Linting and formatting

What it does

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

Its SKILL.md is about 490 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/config.py` and `scripts/markdown_to_wechat_doocs.py`).

It sits in Productivity & Automation, covering Messaging and chat bots and Linting and formatting. It works with WeChat. The repository describes itself as: Battle-tested coding-agent skills for product, content, writing, presentations, and workflow automation. The licence is MIT.

When your agent uses it

  • Tasks that involve Messaging and chat bots
  • Tasks that involve Linting and formatting

Example prompts

  • “把 markdown 转成公众号能用的 HTML”
  • “排版一下这篇文章”
  • “微信编辑器不识别我的样式”
  • “/wechat-formatter”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 38bd735. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wechat Formatter loads about 492 tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 131 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~492

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:44
    **如果用户已在 `.env` 设了 `MARKDOWN_THEME`**:除非用户明确说"换个主题",否则用 `.env` 里的。
  • NoteMentions a .env fileSKILL.md:62
    `.env` 文件支持的变量:

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from YiShu5/claude-skills at commit 38bd735, republished under its MIT licence (© YiShu5). 131 words, ~492 tokens.

Download SKILL.mdSave it as .claude/skills/wechat-formatter/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
wechat-formatter
description
把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。**触发场景**:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 `<style>` 标签,必须把所有 CSS 内联到每个 HTML 元素的 style 属性里——本 skill 用 doocs/md 主题完成这件事。本 skill 只负责格式转换;写作交给 wechat-writer,发布交给 wechat-publisher。

wechat-formatter · Markdown → 微信 HTML

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

核心问题

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

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

使用方法

bash
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 里有 ![](./local/img.png),先告诉用户调用 publisher 上传换链接,再回来排版)

配置

.env 文件支持的变量:

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

© YiShu5, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in skills/wechat-formatter of YiShu5/claude-skills.

  • SKILL.md
  • scripts/config.py
  • scripts/markdown_to_wechat_doocs.py

Open the folder on GitHubat commit 38bd735

Compare with similar skills

Wechat Formatter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wechat Formatter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wechat Formatter this skillYiShu5/claude-skills132—~492Automated safety check: NotesMIT
Wechat Article FormatterBND-1/wechat_article_skills317—~1.5kAutomated safety check: NotesNone
Wechat FormatterJianing1117/jianing-skills329—~4.5kAutomated safety check: PassNone
Wechat Article Formatterhuangserva/servasyy_skills167—~688Automated safety check: NotesNone
She Love Me863401402/she-love-me9251 repos~1.3kAutomated safety check: PassMIT
Wechat Article Extractorfreestylefly/wechat-article-extractor-skill1361 repos~1kAutomated safety check: PassNone

Similar skills

  • Wechat Article Formatter

    BND-1/wechat_article_skills

    将Markdown文章转换为美化的HTML格式,适配微信公众号发布。应用专业CSS样式、代码高亮、优化排版。当用户说"美化这篇文章"、"转换为HTML"、"优化公众号格式"、"生成公众号HTML"时使用。

    317 GitHub stars~1.5k tokensUpdated 8 mo ago
    Productivity & AutomationAuto-check: notes
  • Wechat Formatter

    Jianing1117/jianing-skills

    把一篇 Markdown 格式的文章转成可直接粘贴到微信公众号编辑器的 HTML 推文 + 900x383px 封面图片,严格遵循「加宁慢慢来」品牌视觉规范 v7.0。当用户说"排版公众号""帮我生成推文""把这篇文章转成公众号格式""做微信封面""WeChat Article Formatter""WeChat…

    329 GitHub stars~4.5k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Wechat Article Formatter

    huangserva/servasyy_skills

    将 Markdown 文章转换为微信公众号 HTML 格式,支持自动插入配图、微信样式优化. An agent skill from huangserva/servasyy_skills.

    167 GitHub stars~688 tokensUpdated 7 days ago
    Productivity & AutomationAuto-check: notes
  • She Love Me

    863401402/she-love-me

    Acquire, import, and analyze WeChat or QQ chat histories, including installing supported exporters, guiding required login or contact selection, converting exports, assessing relationship dynamics…

    925 GitHub starsUsed in 1 repo~1.3k tokens
    Productivity & AutomationAuto-check passed
  • Wechat Article Extractor

    freestylefly/wechat-article-extractor-skill

    Extract metadata and content from WeChat Official Account articles.

    136 GitHub starsUsed in 1 repo~1k tokens
    Productivity & AutomationAuto-check passed
  • Wechat Miniprogram Builder

    chenjin-cmd/wechat-miniprogram-builder

    This skill should be used when the user wants to build, launch, monetize, or promote a WeChat mini-program with AI (vibe coding) — including topic selection, account registration & ICP filing…

    355 GitHub stars~634 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed

More from YiShu5/claude-skills

All 8 skills in this repo
  • Self Improving Agent

    YiShu5/claude-skills

    Low-noise self-improvement skill. An agent skill from YiShu5/claude-skills.

    132 GitHub stars~1.2k tokensUpdated 19 days ago
    Auto-check passed
  • Wechat Publisher

    YiShu5/claude-skills

    微信公众号文章的发布管道——封面生成、本地图片上传素材库、创建草稿、发布草稿、以及从 mp.weixin URL 提取原文。触发场景:用户说 "发到公众号草稿箱" / "推送到公众号" / "做张公众号封面" / "上传图片到微信" / "把这篇文章提取成 markdown" / "改写这篇 mp.weixin 链接(的提取部分)" / 任何提到「发布 / 草稿 / 封面 / 推送 /…

    132 GitHub stars~951 tokensUpdated 19 days ago
    Auto-check: notes
  • Clawd Animation

    YiShu5/claude-skills

    Clawd 像素风动画生成器。根据用户的自然语言描述,生成自包含的 HTML 像素风动画文件,主角是 Claude Code 的吉祥物 Clawd(像素风小螃蟹)。当用户提到 clawd、clawd 动画、像素动画、pixel animation、给 clawd 做一个小动画、让小螃蟹做某事、或任何涉及为 Clawd 角色创建动画场景的需求时,务必使用此…

    132 GitHub stars~889 tokensUpdated 19 days ago
    Auto-check passed
  • Vibe Writing

    YiShu5/claude-skills

    A skill your agent uses when drafting, rewriting, reviewing, or planning Chinese long-form content for public accounts, blogs, newsletters, professional analysis, product or technical writing…

    132 GitHub stars~985 tokensUpdated 19 days ago
    Auto-check passed
  • Wechat Coauthor

    YiShu5/claude-skills

    协助意疏写「意疏的AI口袋」公众号文章。Claude 是协作者不是写手——voice 必须从意疏嘴里出来,AI 负责结构化、扩写、降 AI 味。触发:写公众号文章 / 帮我整理口述 / 有素材但想不清 / 这段 AI 味太重 / 看看有没有意疏味道 / 帮我把骨架写成文章。输出 Markdown,排版找 wechat-formatter,发布找 wechat-publisher。

    132 GitHub stars~2.4k tokensUpdated 19 days ago
    Auto-check passed
  • Clawd Animation Lite

    YiShu5/claude-skills

    Clawd 像素风动画生成器(轻量版)。根据用户的自然语言描述,生成1-3秒的简短clawd动画,当用户的需求的互动场景较为具体和单一,请采用轻量版本生成token消耗少、生成速度快的HTML像素风动画文件。主角是 Claude Code 的吉祥物 Clawd(像素风小螃蟹)。当用户提到 clawd、clawd 动画、像素动画、pixel animation、给 clawd…

    132 GitHub stars~2.4k tokensUpdated 19 days ago
    Auto-check passed

Works with

Questions about Wechat Formatter

What does Wechat Formatter do?

把 Markdown 文稿转换成微信公众号可用的内联样式 HTML。触发场景:用户说 "把 markdown 转成公众号能用的 HTML" / "排版一下这篇文章" / "套个主题" / "微信编辑器不识别我的样式" / 任何提到「公众号排版 / 微信 HTML / md 转 html / doocs 主题」的请求。微信编辑器不识别 <style 标签,必须把所有 CSS 内联到每个 HTML…. Wechat Formatter is an agent skill from YiShu5/claude-skills.

When should I use Wechat Formatter?

Wechat Formatter fits situations like: tasks that involve Messaging and chat bots; tasks that involve Linting and formatting.

How do I install Wechat Formatter in Claude Code?

Run `npx skills add YiShu5/claude-skills --skill wechat-formatter -a claude-code`. Or copy the skill folder (skills/wechat-formatter in YiShu5/claude-skills) into .claude/skills/wechat-formatter in your project. Claude Code loads it when a task matches its description.

How do I install Wechat Formatter in Codex?

Run `npx skills add YiShu5/claude-skills --skill wechat-formatter -a codex`. Or copy the skill folder (skills/wechat-formatter in YiShu5/claude-skills) into .agents/skills/wechat-formatter in your project. Codex loads it when a task matches its description.

Can I use Wechat Formatter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add YiShu5/claude-skills --skill wechat-formatter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wechat-formatter, .gemini/skills/wechat-formatter, .github/skills/wechat-formatter and .opencode/skills/wechat-formatter in your project.

What does Wechat Formatter need to run?

Going by SKILL.md and its folder, Wechat Formatter needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Wechat Formatter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Wechat Formatter safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Wechat Formatter use?

Wechat Formatter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wechat Formatter use?

About 492 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wechat Formatter?

Skills that share tags, products or a category with Wechat Formatter: Wechat Article Formatter (BND-1/wechat_article_skills, 317 stars), Wechat Formatter (Jianing1117/jianing-skills, 329 stars), Wechat Article Formatter (huangserva/servasyy_skills, 167 stars) and She Love Me (863401402/she-love-me, 925 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wechat Formatter?

YiShu5 (a GitHub user) maintains it in YiShu5/claude-skills, which has 132 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 20, 2026.

Source: YiShu5/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.