Wechat Layout logo

Wechat Layout

Community
threerocks
wechat-layout

公众号排版:把一篇文章(Markdown)排成能直接粘贴进公众号编辑器的图文——内联样式、图片内嵌、13 套主推主题配色,附 2.35:1 头图、1:1 封面和发布信息(标题、摘要、步骤);正文一字不改,逐块读回校验。只接受文章:原文(article.md)、译文(article.zh.md)或改写稿导出的文章(rewrite.md,即"总结后发公众号")。可以单独用,也可以接在抓取、翻译、改写后面。Use when the user wants 公众号排版, 微信公众号文章排版, 推文排版, gzh, mp.weixin formatting, "排成公众号/发公众号", or to paste a Markdown article into the WeChat editor.

Overview

Publisherthreerocks
Repositoryarticle2media
Skill namewechat-layout
Stars
610
Forks
96
Bundled files
4
LicenseMIT
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.

  • 4 bundled files

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

  • Open source

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

Installation

Install the Wechat Layout 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/threerocks/article2media/tree/main/skills/wechat-layout
  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/threerocks/article2media.git /tmp/article2media
mkdir -p .claude/skills
cp -r /tmp/article2media/skills/wechat-layout .claude/skills/wechat-layout
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wechat Layout 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 Wechat Layout 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 Wechat Layout 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.

公众号排版(wechat-layout)

路径约定:文中的 ${CLAUDE_SKILL_DIR} 指本 SKILL.md 所在的目录。宿主没有替换这个变量时(命令里原样出现 ${CLAUDE_SKILL_DIR}),把它换成这个目录的绝对路径再运行;../<名字>/ 指同级的另一个 skill 目录。

把一篇文章排成可粘贴的公众号图文。正文一字不改;改不改写、译不译,在排版之前决定。

参数:$ARGUMENTS

0. 先确定排哪篇文章

情况做法
给了 .md 文章,或说"排版 / 原文"直接排它
给的是链接、文件、粘贴的正文或视频先用 article-fetch / video-transcript 取原文
说"总结 / 提炼 / 改写后发公众号"先用 article-rewrite 写 content.json(加 wechat.title、wechat.digest),再用它的 export.mjs 导出 rewrite.md,排 rewrite.md
原文是外文,读者是中文先用 article-translate 出 article.zh.md,排译文
只说"发公众号",没说原文还是总结默认原文排版;一篇别人的长文、结果差别又大时,问一句"原文排版还是总结后再排"

给的是 content.json 时脚本会拒绝:公众号排版只吃文章,先导出 rewrite.md。判断规则和工作目录见 ../article2media/references/pipeline.md。

第一次使用先跑 node ${CLAUDE_SKILL_DIR}/scripts/doctor.mjs(Node 22+、Chrome)。

1. 排版

bash
node ${CLAUDE_SKILL_DIR}/scripts/wechat.mjs <目录>/article.md --check                # 只校验:解析、标题长度
node ${CLAUDE_SKILL_DIR}/scripts/wechat.mjs <目录>/article.md --theme quiet          # → <目录>/quiet-wechat/
node ${CLAUDE_SKILL_DIR}/scripts/wechat.mjs <目录>/rewrite.md                        # 主题默认用 rewrite.md 里记录的(图表按它截的图)
node ${CLAUDE_SKILL_DIR}/scripts/wechat.mjs <目录>/article.md --title "公众号标题" --digest "摘要" --cover-title "两行\n标题"
  • 主题:用户指定 > 文章 front matter 的 theme > 按 ../article2media/references/styles.md 选(没选时是 editorial)。rewrite.md 的图表是按导出时的主题截的图,换主题要先重新导出。
  • 标题、摘要、封面标题的写法和限制见 references/wechat-guide.md。

2. 检查(出图 → 发现问题 → 改 content.json 或参数 → 再出图,算一轮;通常 1–2 轮就够。✗ 没修完就继续改;第 2 轮后还剩的 ⚠,交付时说明。只跑 check.mjs 不算)

  1. 版面检查:✗ 全文校验(逐块不一致)、图片没加载、标题超长、封面标题放不下,都必须修。正文问题改源头(article.md / content.json),不改 HTML。
  2. 亲眼看:打开 cover-2.35x1.png、cover-1x1.png;用浏览器或截图看一遍 article.html 的手机宽度效果。

3. 交付

  • article.html 的绝对路径,告诉用户:"浏览器打开 → 点「复制到公众号」→ 在编辑器正文里粘贴";
  • 贴出标题、摘要,以及两张封面的路径(wechat.md 里有完整发布步骤);
  • 排的是哪篇(原文 / 译文 / 改写稿)、全文校验结果("44 / 44 块逐字一致")、主题和理由;
  • 有图片没能下载、仍是外链的,提醒粘贴后检查。

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 Wechat Layout AI skill do?

公众号排版:把一篇文章(Markdown)排成能直接粘贴进公众号编辑器的图文——内联样式、图片内嵌、13 套主推主题配色,附 2.35:1 头图、1:1 封面和发布信息(标题、摘要、步骤);正文一字不改,逐块读回校验。只接受文章:原文(article.md)、译文(article.zh.md)或改写稿导出的文章(rewrite.md,即"总结后发公众号")。可以单独用,也可以接在抓取、翻译、改写后面。Use when the user wants 公众号排版, 微信公众号文章排版, 推文排版, gzh, mp.weixin formatting, "排成公众号/发公众号", or to paste a Markdown article into the WeChat editor.

Why use Wechat Layout on TypingMind?

Because you install it once and use it with any model. Wechat Layout 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 Wechat Layout in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/threerocks/article2media/tree/main/skills/wechat-layout. 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 Wechat Layout?

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 Wechat Layout?

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

Is the Wechat Layout AI skill free?

Yes. It is published on GitHub by threerocks under the MIT license. 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 👇