Preface¶
Manually writing or modifying CSS for WeChat Official Account article content is often tedious, requiring repeated adjustments against the actual DOM in the editor. Standard web page themes cannot be applied directly because selectors, resource referencing methods, and font restrictions differ significantly from ordinary websites. If you are already using Markdown-to-WeChat typesetting tools (e.g., toolchains based on the #wenyan namespace), a set of generation rules that can be stably executed by an Agent is needed, rather than letting the model “freely style” every time.
Below is an introduction to the SkillHub community skill WeChat Official Account Custom Theme Generator (Coordinate @user_d8946e26/generate-wenyan-theme). It translates “visual requirements → actionable CSS files” into an Agent-readable SKILL specification and emphasizes the namespace and resource constraints on the WeChat side that are most prone to pitfalls.
What is this¶
The WeChat Official Account Custom Theme Generator is a Skill for AI Agents (based on the universal SKILL.md format), maintained by community publisher user_d8946e26. The current version is 1.0.0, categorized under design-media, with a source of community.
Official one-sentence positioning (consistent with Skill metadata):
AI-ready skill to design and generate highly customized CSS themes for WeChat Official Accounts.
What it solves is: designing and generating highly customized CSS themes based on natural language descriptions, and only responsible for generating CSS code and saving it as a local file (not responsible for HTML typesetting in the Official Account backend or one-click publishing). The Skill is marked requires_api_key=false, meaning installation and use do not depend on additional API Keys.
SkillHub page (as of data capture): Rating 100000, Downloads 1301, Installations 91.
- Skill Page: https://www.skillhub.cn/skills/user_d8946e26/generate-wenyan-theme
- API Identifier: https://api.skillhub.cn/user_d8946e26/generate-wenyan-theme
Core Functions¶
The following capabilities are derived from the Skill’s built-in SKILL.md description.
Natural Language to CSS¶
After reading the skill, the Agent should be able to understand the user’s visual needs (e.g., cyberpunk style, decorated quote blocks, dark code blocks) and output corresponding CSS, rather than just providing design suggestions.
WeChat Typesetting Specification Adaptation¶
Generated code must strictly follow the #wenyan namespace: all selectors must start with #wenyan, separated from element selectors by a space. Styles lacking this prefix will not take effect in the target DOM.
Example (correct vs. incorrect comparison given in the skill):
/* Correct */
#wenyan h1 { color: red; }
/* Incorrect */
h1 { color: red; }
Font and Font Size Constraints¶
- It should not actively set
font-familyto facilitate adaptation with the system fonts of the Official Account editor. - Font sizes should be controlled within a reasonable range (the skill suggests approximately
12px–18px) to avoid overflow or reading difficulties.
Element-level Customization Cheat Sheet¶
The skill provides a comparison table of selectors and common attributes ranging from global styles, headings (including span and ::before decorations), paragraphs, quotes, code blocks, hr, a, etc. This facilitates the Agent in generating a complete theme structure rather than just changing a color or two.
Advanced Visual Effects¶
While adhering to constraints, pseudo-elements (::before, ::after), gradients (linear-gradient), inline SVG / Base64, etc., can be used to implement more complex layouts.
External Resource Rules¶
- Forbidden: Local paths, such as
url("./bg.png"). - Allowed: Data URIs (recommended),
https://remote addresses. - Not Supported:
@font-facefor importing Web fonts.
Reference Default Structure¶
When generating new themes, the skill requires referencing the default.css structure of the wenyan-cli style (Global #wenyan, Heading levels, Lists, Images, Tables, Quotes, Code blocks, Dividers, Links, etc.). The complete template can be found in the code block of SKILL.md within the skill package. Due to its length, it can be directly referenced and modified after installation.
Installation and Activation¶
Install via SkillHub CLI (Recommended)¶
The installation method provided on the SkillHub skill page is: let the Agent install the coordinate @user_d8946e26/generate-wenyan-theme following the SkillHub Installation Documentation.
Documentation requirement: During installation, you must use --dir to point to the actual skills directory currently used by the Agent; otherwise, defaulting to ./skills/ might result in failure to be recognized.
- Check if the CLI is installed:
command -v skillhub && skillhub --version
- If not installed, you can execute the complete installation or just the CLI according to the documentation (excerpt):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
- Install this skill (replace
<skills directory>with your environment’s path):
skillhub install @user_d8946e26/generate-wenyan-theme --dir <skills directory>
Common skills directories listed in the SkillHub documentation include:
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
For other clients (Windsurf, Gemini CLI, etc.), please refer to Section 4 of the Installation Documentation for the path. After installation, restart or refresh the skill list according to the conventions of your Agent to load the SKILL.md.
Identifier within the Skill Package¶
In the SKILL.md header metadata, name is generate-wechat-theme, coexisting with the SkillHub coordinate generate-wenyan-theme; simply take the installation coordinate @user_d8946e26/generate-wenyan-theme as the standard.
Typical Usage¶
The skill defines a set of Agent Execution Steps that can be directly reproduced in a conversation.
- Analyze Requirements: Extract style keywords (e.g., dark, tech style) and primary color tones from the user’s description.
- Generate CSS: Strictly use the
#wenyanprefix and cover necessary selectors such as global, headings, body text, quotes, code blocks, etc. - Save File: Write the result to a local file in the current working directory, e.g.,
theme.css. - Follow-up Guidance: The skill description suggests that users use the
apply-wechat-custom-themeskill for test rendering or publishing; this step is a link in the same workflow and requires separate installation of the corresponding Skill.
Example expression to initiate a task to the Agent (for illustration, adjust the output filename according to your project path):
Please follow the installed "WeChat Official Account Custom Theme Generator" skill:
1. Theme: Dark tech style, primary color #00d4ff, highlighted bar on the left of quote blocks;
2. Adhere to the #wenyan namespace and resource reference restrictions;
3. Generate complete CSS and save as theme.css.
Suitable Scenarios and Notes¶
Who it is for
- Developers or operators writing for Official Accounts using Markdown /
wenyantype tools who need frequent skin changing or brand-specific CSS. - Teams hoping to solidify “typesetting specifications” within the Skill to reduce manual CSS writing and repeated correction of selector prefixes.
Limitations and Notes
- This Skill only generates CSS files and does not replace typesetting operations within the Official Account editor; testing and application require combination with your rendering toolchain (the skill documentation points to
apply-wechat-custom-themeas an optional next step). - Violating the
#wenyanprefix, using localurl(), or@font-facewill cause styles to fail or be incompatible with the environment; generated results should be verified manually or via tools. - The version takes SkillHub as the standard (current 1.0.0); upgrades can be done using
skillhubto update to the same coordinate in the Agent’s skills directory.
Conclusion¶
The WeChat Official Account Custom Theme Generator writes the namespace, element tables, and resource boundaries for Official Account theme CSS into Agent instructions, making it suitable for reusable theme generation within an existing #wenyan typesetting workflow. See SkillHub for installation and details:
https://www.skillhub.cn/skills/user_d8946e26/generate-wenyan-theme