One-click formatting for WeChat Official Accounts — Markdown to HTML pasteable in the WeChat backend, multiple themes, multiple font sizes, WYSIWYG.
Suite description · This skill belongs to the
aws-wechat-article-*one-stop suite (9 slugs in total, entryaws-wechat-article-main). Cross-skill relative references depend on the sameskills/directory, and it is recommended to alsoclawhub installthe full set. Source code:https://github.com/aiworkskills/wechat-article-skills
Capabilities
This skill ispurely local Markdown → HTML conversion, zero network, zero credentials.
- Credentials: none
- Network: none
- File read (inside repository):
.aws-article/config.yaml, this article'sarticle.yaml、article.md, optionalclosing.md、.aws-article/presets/formatting/<名>.yaml - File read (outside repository):
~/.aws-article/presets/formatting/(custom themes shared across projects;only reads preset files, does not read credentials) - File write: this article's
article.html - shell: only
{python} {baseDir}/scripts/format.py
Can be used directly when installed standalone:format.py zero dependencies, purely local, no cross-skill script calls. In the documentation, links pointing to ../aws-wechat-article-main/references/*.md will break when the suite is not fully installed, but the formatting function itself remains usable.
Routing
One-click publishing and formatting only was not explicitly requested → aws-wechat-article-main。
Configuration check ⛔
Before any operation, first follow First-time onboarding · Detection order execute, and only continue after passing (or the user explicitly confirms in writing "do not check this time"). The same applies when this skill is enabled standalone.
Built-in templates
Formatting = template(skeleton: title decoration, lead, quote card, image handling, separators, ending) × color scheme(a set of primary/secondary colors, derived colors automatically recalculated). The name is the purpose; before choosing, first look at "suitable":
| Template | Suitable | Not suitable | Color scheme (the first is the default) |
|---|---|---|---|
亲和 |
Tutorials, workplace, explanatory long-form articles aimed at beginners | Serious topics, minimalist and cold brands | Dai purple / pine green / indigo |
资讯 |
News briefs, reviews, industry observations | Lyrical prose, fragmented short paragraphs | Ink green / crimson / navy |
书卷 |
Humanities, reading, history, in-depth long-form articles | Engineering documentation, data-intensive reviews | Cinnabar / dai blue / pale green |
杂志 |
Brand stories, character interviews, lifestyle | Manuscripts without images, informational short articles | Azurite / camel brown / rust |
When not passing --theme , the built-in default is 亲和。
The other four sets are not built into the skill; after choosing the template and color scheme on aiworkskills.cn, they are delivered with the .aws preset package to .aws-article/presets/formatting/(see assets skill):活力(product launches, growth retrospectives),手账(personal notes, retrospectives),硬朗(opinions, manifestos),技术(engineering practice, code walkthroughs). The color scheme chosen on the site gets baked into the YAML top-level variables, so no extra configuration is needed once it lands.
Before choosing, runonce; the criteria, color values, and the specifics of each color scheme are all in the output—don't just guess by name:
{python} {baseDir}/scripts/format.py --list-themes
If you can't tell, look at:--preview to render the samples into a side-by-side comparison page (each column 375px, the same width as a real device), and open it in a browser.
{python} {baseDir}/scripts/format.py --preview 亲和 -o preview.html # 该模版的每套配色并列
{python} {baseDir}/scripts/format.py --preview -o preview.html # 所有模版的默认色并列
The same batch of previews online:https://aiworkskills.cn/format-previews/<骨架>/<配色序号>.html, skeleton names see --list-themes。
Change color scheme:--scheme <配色名>, or this article's article.yaml write default_format_scheme: [松绿](a single-element list, written by main's preset landing step for this article).
Captions only recognize an explicitly written title ⛔

Only what's in quotes after the path in parentheses is the caption.The part after the alt colon is the image instruction and won't be shown to readers.
An earlier implementation had the image instruction double as the caption, and produced things like this: the image showed a person standing in front of a 99.9 sign gazing into the distance, and the caption read "a developer stands before a giant 99.9 score sign, gaze passing beyond the score toward a complex and open city and workplace"—restating what the reader can already see, zero information; and when the image fails to generate, the same sentence appears twice (once in the broken image's alt, once in the caption).
No title means no caption, and this is intentional: the vast majority of images don't need captions, and a wrong caption is worse than none. A caption should add something beyond the image—a data source, a judgment, a counterintuitive detail.
Whether a caption appears is also controlled by the merged configuration's caption_style :有图注 all shown,无图注 all hidden,关键图有 only images in information slots (infographics / evidence) are shown.
Recognizing forms from standard markdown (the main path)
The writing side only produces standard markdown, and recognizing structure is the typesetting layer's job. Having writers master both standard markdown and a private syntax is coupling, and that syntax is recognized only by this toolkit—the manuscript becomes useless the moment it's moved to another tool.
The renderer recognizes these forms; authors don't need to write any special syntax:
| Standard markdown the author writes | What the typesetting layer does |
|---|---|
**加粗** |
The template's accent color or highlighter background—the only scanning anchor in the body text |
- **标签**:说明 |
The label is visually pulled out (62% of list items in real manuscripts have this shape) |
- [ ] / - [x] |
Replaced with that skeleton's three-state icons |
> 金句。 —— 出处 |
Laid out as a pull-quote card (body position, quote with a dash-attributed source) |
> 引文 |
A large quotation mark prepended |
 |
Four corner marks + caption |
--- |
Decorative divider |
## |
Heading decoration (brushstroke / folded-corner block) |
Only forms are recognized, semantics are not inferred. An ordered list in markdown only means "enumeration," not "sequence," so seeing 1. 2. 3. won't render as "Step 1, Step 2"—that would be asserting an order the author didn't state. Real manuscripts measured: of three multi-item ordered lists, only one actually had a sequence.
::: The component syntax is still recognized by the typesetting side, butwriters no longer produce it—for details see branches.md "Section One"。
Workflow
排版进度:
- [ ] 第0步:⛔ 配置检查
- [ ] 第1步:确定模版与配色
- [ ] 第2步:转换
- [ ] 第3步:核对输出
Step 1: Determine the template and color scheme
--theme An explicit specification takes top priority; if not passed, read this article's article.yaml of default_format_preset(single-element list), otherwise the built-in default 亲和. For the complete parsing order and the same set of rules for color schemes, see branches.md "II"。
Step 2: Convert
Inrepository rootrun (adjust paths according to the actual directory for this article):
# 不传 --theme:读本篇 default_format_preset,否则 亲和
{python} {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md -o drafts/YYYYMMDD-slug/article.html
# 显式指定模版 / 配色(覆盖配置)
{python} {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md --theme 资讯 --scheme 绛红 -o drafts/YYYYMMDD-slug/article.html
# 自定义主色 / 字号
{python} {baseDir}/scripts/format.py article.md --color '#C0392B'
{python} {baseDir}/scripts/format.py article.md --font-size 15px
At the end of the document {embed:…} merge rules see branches.md "IV"——if placeholders and configuration do not match, it will fail directly。
Step 3: Verify output
- Bodydoes not includearticle title (
article.mdthe first#is skipped, the title is filled in separately in the backend). - Image markers are still
placeholderwhen kept as<img>, wait for images skill replacement—they must all be replaced with real paths before final review. - Other output features (
closing.mdappend, preformatted range, table alignment) see branches.md "V"。
Options
| Option | Description | Default |
|---|---|---|
--theme <名称> |
template; if omitted, use this article's configuration → built-in 亲和 |
亲和 |
--scheme <配色名> |
template color scheme (see --list-themes); if omitted, read this article's default_format_scheme, otherwise the template default color |
template default |
--color <hex> |
custom primary color | theme default |
--font-size <px> |
body font size (also overrides font sizes in theme p / li) | 16px |
-o <路径> |
output path | same-name .html |
--list-themes |
list templates: appearance, suitable/unsuitable, color values and specifications for each color scheme | |
--preview [模版名] |
render a side-by-side comparison page (if a template name is given, compare each of its color schemes side by side; if not, compare all templates side by side) | |
--export-theme <名称> |
export the theme as YAML, can be used as a starting point for a custom theme | |
--no-preformat |
skip Markdown preformatting |
Branches and details
::: components and lookup order, complete theme parsing order, custom themes,{embed:…} merge rules, output details, WeChat HTML restrictions before designing a new layout → references/branches.md。
Process files
| Read | Produce |
|---|---|
article.md、.aws-article/config.yaml + same directory article.yaml(default template and embeds)、closing.md(optional) |
article.html |