Layout
One-click WeChat Official Account Layout — Converts Markdown to HTML that can be pasted into WeChat backend, with multiple themes, font sizes, and WYSIWYG.
Suite Description · This skill belongs to the
one-stop suite (9 slugs in total, entry is
). Cross-skill relative references depend on the same
directory, it is recommended to install the full set via
together. Source code:
https://github.com/aiworkskills/wechat-article-skills
Capability Disclosure
This skill is a pure local Markdown → HTML conversion, no network, no credentials.
- Credentials: None
- Network: None
- File Read (Within Repository) : , current , , optional ,
.aws-article/presets/formatting/<name>.yaml
- File Read (Outside Repository) : also checks the user's home directory
~/.aws-article/presets/formatting/
(custom layout themes shared across projects; only reads preset files, no credentials). This capability can be disabled by emptying/not creating this directory
- File Write: Current
- Shell: Only
python3 {baseDir}/scripts/format.py
Supporting Skills (informational)
This skill is the
layout stage of the
one-stop WeChat Official Account suite (entry is
).
- Can be used directly when installed separately: The script of this skill has zero dependencies, is pure local, and has no cross-skill script calls.
- Workflow documents will link to
../aws-wechat-article-main/references/*.md
(first-time guidance, etc.). When the suite is not fully installed, link jumps will break, but the layout function itself is still available.
The complete list of 9 slugs can be found in the
source code repository.
Routing
One-click publishing without explicitly requesting only layout → aws-wechat-article-main.
Convert Markdown articles to HTML compatible with WeChat Official Accounts, with all styles inline.
Script Directory
Agent Execution: Determine the directory where this SKILL.md is located as
.
| Script | Purpose |
|---|
| Markdown → WeChat-compatible HTML |
Configuration Check ⛔
Before any operation, must follow the First-time Setup and execute the "Detection Sequence" within it. The same applies when enabling this skill alone. Only proceed with the following operations after passing the detection (or the user explicitly confirms in writing "No check this time"):
Built-in Themes
| Theme | Style | Applicable Scenarios |
|---|
| Classic Blue — Calm and grand, colored block subheadings | Technology, business, general use |
| Elegant Purple — Soft and rounded, left-border subheadings | Culture, aesthetics |
| Warm Orange — Dynamic and bold, colored block subheadings | We Media, entrepreneurship |
| Minimalist Black — Extremely restrained, large white spaces | In-depth thinking, academia |
Each theme includes complete rules for title styles (h1-h4), paragraphs, quote blocks, lists, dividers, images, code blocks, links, accent colors, etc.
Workflow
Layout Progress:
- [ ] Step 0: Configuration Check (see "Configuration Check" in this section) ⛔
- [ ] Step 1: Determine Theme (merge with configuration / user-specified)
- [ ] Step 2: Conversion
- [ ] Step 3: Output HTML
Step 1: Determine Theme
Theme resolution order (choose one between
behavior and the agent):
- Command line : Always take precedence when explicitly specified.
- No passed: only reads in in the same directory as (must be a YAML list: or single element ); use the built-in theme name if empty.
- When the agent helps the user select a theme in the conversation, follow: user's statement → current article's
article.yaml.default_format_preset
→ custom themes in .aws-article/presets/formatting/
→ built-in . The parsing of candidate pool is completed by main in the "Article Preparation" stage and written back to .
Theme names must correspond to
built-in themes or
.aws-article/presets/formatting/<name>.yaml
. For field descriptions, see
articlescreening-schema.md (aligned with top-level fields in the repository's
).
Step 2: Conversion
Execute at the repository root (adjust the path according to the actual directory of this article):
bash
# No --theme passed: use default_format_preset in merged configuration, otherwise default
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md -o drafts/YYYYMMDD-slug/article.html
# Explicitly specify theme (overrides configuration)
python {baseDir}/scripts/format.py drafts/YYYYMMDD-slug/article.md --theme grace -o drafts/YYYYMMDD-slug/article.html
# Custom main color / font size
python {baseDir}/scripts/format.py article.md --theme modern --color "#A93226"
python {baseDir}/scripts/format.py article.md --font-size 15px
# List available themes
python {baseDir}/scripts/format.py --list-themes
Embedded Elements
- : for business cards / mini-programs are based on ; only "previous links": current article's can write , which is deeply merged with the global (used for different recommendations per article). When the merged result has non-empty , parse
{embed:profile|miniprogram|miniprogram_card|link:name}
; otherwise, do not replace the embed placeholders (considered as no configuration).
- Consistent with the placeholder description in Writing Structure Template.
Step 3: Output HTML
HTML Output Features:
- All styles are inline (compatible with WeChat editor)
- Article title not included in main text: The first (h1) in Markdown is skipped during conversion; the title is filled separately in the WeChat backend and will not be repeated in the main text
- Image markers

are retained as tags, to be replaced by the images skill
- Image captions are automatically extracted from the marker description
- If exists in the same directory, will append it to the end of the article (existing behavior of the script)
Options
| Option | Description | Default Value |
|---|
| Theme; if omitted, follow merged configuration → default | See above |
| Custom main color | Theme default |
| Font size | 16px |
| Output path | Same name .html |
| List available themes | |
Custom Themes
Create a new theme file under
.aws-article/presets/formatting/
.
For the theme file format and extension methods, see: references/presets/README.md
Process Files
| Read | Generated |
|---|
| , + same directory (default theme and ), (optional) | |