Shan Chun AI · WeChat Official Account Layout Expert: Preview First, Then Output WeChat-Compliant HTML

Preface

WeChat Official Account backends offer limited support for formatting: common practices involve manually writing inline styles or formatting in third-party editors before pasting. Whenever an article is revised, the top banner, body line spacing, and bottom guidance bar often require complete re-adjustment. If you are already using Agents with Skills (like Cursor or Claude Code) for writing, you can delegate the task of creating “WeChat-compliant HTML structures + three fixed styles + code generation upon confirmation” to a Skill, rather than piecing together tags from scratch every time.

Below is an introduction to the community Skill on SkillHub: 善春AI·微信公众号排版专家 | SCAI WeChat Formatter (Coordinate @user_0c169ec6/wechat-formatter-cn, current version 1.3.0), along with installation methods and standard usage within conversations.

What is this

This Skill targets WeChat Official Account graphic messages: based on the body text you provide, it generates HTML with inline styles according to built-in templates and supports a text-based preview of the effect before generating the final code. The SkillHub category is content-creation, the source is community, and the publisher is user_0c169ec6. The page indicates requires_api_key=false, meaning no additional API Key is needed. In SKILL.md, the author is credited as 善春, pointing to the GitHub repository ShanchunAI_Protocol_16Layers.

Official entries:

  • API Page: https://api.skillhub.cn/user_0c169ec6/wechat-formatter-cn
  • SkillHub Details: https://www.skillhub.cn/skills/user_0c169ec6/wechat-formatter-cn

(As of the data retrieval time, SkillHub shows a rating of approximately 100000 and about 1007 downloads.)

Core Features

The following capabilities are derived from the official description and the v1.3.0 SKILL.md:

  1. One-click Generation of WeChat-compliant Formatted HTML: The output is a snippet with fully inline styles, and the description states it can be copied directly to the Official Account backend for use.
  2. Three Styles: Tech Style (default, primary color #007aff), Literary Style (#c17e61), and Minimal Style (#333333). The top banner gradients and accent colors are swapped according to style switching rules.
  3. Preview First, Generate Later: When content starting with “排版:” (English: Format:) is received, the Agent first outputs an ASCII box-style text preview (top banner, body sample, bottom banner, current style name). Only after you reply with “生成” (Generate) or a style switching command will the full HTML be output.
  4. Bilingual Support: The same Skill package includes workflow instructions for both the Chinese version and the English Version.
  5. Hardcoded Templates: The HTML skeletons for styles like “Tech” are hardcoded within the skill package. Body paragraphs, subheadings, quotes, and emphasis have fixed tags and style rules to ensure stable output formatting.

Installation and Activation

The official SkillHub installation instructions require reading the SkillHub Installation and Priority Source Configuration first, followed by installing this Skill.

1. Check or install the skillhub CLI

command -v skillhub && skillhub --version

If it is not installed, you can perform a full installation according to the official documentation (the example below is the recommended method):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install to the current Agent’s skills directory

When installing, you must use --dir to point to the skills directory recognized by your current client; otherwise, it may land in the default ./skills/ directory and not be loaded. Common paths provided in the official documentation are as follows:

Client skills Directory
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/ or .agents/skills/ under the project

Installation command (coordinate consistent with the SkillHub page):

skillhub install @user_0c169ec6/wechat-formatter-cn --dir ~/.cursor/skills/

Replace ~/.cursor/skills/ with the directory you are actually using. After installation is complete, refresh or restart the Agent according to the conventions of your client to ensure the Skill is loaded.

You can also ask the Agent in the conversation to install it according to the documentation above. Example prompt (excerpted from the SkillHub page):

Please install @user_0c169ec6/wechat-formatter-cn based on https://skillhub.cn/install/skillhub.md.

Typical Usage

The standard workflow provided in SKILL.md is divided into three steps: after installing or loading the skill, trigger it with “排版:” (Format:); view the preview first, then confirm to generate the code.

Chinese Conversation Example

  1. Send the body text (fixed prefix):
排版:今天想聊聊AI的未来。AI正在改变我们的生活方式。
  1. The Agent should return a text-based “Formatting Effect Preview” and indicate the current style (Tech Style by default), prompting that you can reply with “生成” (Generate) or “文艺风 / 简约风” (Literary / Minimal) to switch.

  2. If satisfied, reply with:

生成
  1. The Agent outputs the complete HTML; you copy it and paste it into the WeChat Official Account graphic message editor (the official FAQ states it uses inline styles and can be pasted directly).

English Conversation Example

Format: Today I want to talk about AI. AI is changing our lives.

After confirming the preview, reply with Generate; to switch styles, you can use Literary / Minimal (see the English workflow in SKILL.md).

Exceptions and Edge Cases (Conventions within the Skill Package)

  • If the content is empty, the Agent should prompt to use the format “排版:你的文章内容” (Format: your article content).
  • If the “排版:” (Format:) prefix is missing, the content can still be processed normally according to the SKILL instructions.
  • If the user directly says “生成” (Generate), output the full HTML using the currently selected style.

Use Cases and Notes

Who is it for

  • Content authors or operators who post to Official Accounts regularly and want a unified structure for the top banner, body, and bottom banner.
  • Developers who already write articles within Agents and want to avoid manually writing <p style="..."> or exporting back and forth between multiple formatting tools.

Things to Note

  • The output styles are limited to three presets; custom brand colors or complex layouts still require modifying the HTML yourself or creating separate templates.
  • The preview is a text schematic, not a real rendering; the final display depends on how it appears after pasting into the WeChat backend.
  • The skill package contains sample text for follow prompts, “Wow” (在看) likes, and comments; please modify the text within the HTML according to your account’s actual situation before publishing.
  • This Skill is a community release; check the version and description on the SkillHub page before use. For commercial licensing, refer to the SCAI Commercial identifier in the SKILL and the author’s repository instructions.

Conclusion

善春AI·微信公众号排版专家 (SCAI WeChat Formatter) incorporates the common three-section layout (top banner, body, bottom banner) and three color styles into a Skill, using “preview first, generate later” to reduce repeated trial and error. If you are using SkillHub to manage Agent capabilities, you can install @user_0c169ec6/wechat-formatter-cn from the official page:

https://www.skillhub.cn/skills/user_0c169ec6/wechat-formatter-cn

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye