wechat-red-envelope-cover-designer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese技能概述
Skill Overview
技能名称: wechat-red-envelope-cover-designer
核心功能: 生成符合微信红包封面开放平台规范的封面设计图片,包括封面图、封面挂件、气泡挂件和封面故事素材。
适用场景:
- 春节、中秋、情人节、七夕、圣诞、生日、元宵、端午、元旦、国庆等节日主题红包封面设计
- 自定义品牌活动主题红包封面设计
- 企业或个人定制红包封面需求
Skill Name: wechat-red-envelope-cover-designer
Core Function: Generate cover design images that comply with the specifications of the WeChat Red Envelope Cover Open Platform, including cover images, cover pendants, bubble pendants, and cover story materials.
Applicable Scenarios:
- Festival-themed red envelope cover design for Spring Festival, Mid-Autumn Festival, Valentine's Day, Qixi Festival, Christmas, Birthday, Lantern Festival, Dragon Boat Festival, New Year's Day, National Day, etc.
- Custom brand event-themed red envelope cover design
- Enterprise or personal custom red envelope cover needs
完整工作流程
Complete Workflow
plaintext
需求确认 → 制定设计方案 → 生成封面图片 → 交付与审核提醒plaintext
Requirement Confirmation → Design Formulation → Cover Image Generation → Delivery & Review Reminder阶段一:需求确认
Phase 1: Requirement Confirmation
在开始设计前,必须与用户确认以下关键信息:
Before starting the design, the following key information must be confirmed with the user:
1. 基础信息确认
1. Basic Information Confirmation
封面主题:
- 节日类型选择:春节、中秋、情人节、七夕、圣诞、生日、元宵、端午、元旦、国庆
- 或品牌活动主题
封面简称:
- 最多8个字
- 显示在红包封面上
- 可以是:企业名称字号、公众号名称、视频号名称、注册商标
是否需要品牌logo:
- 是/否
- 如果是,需要提供logo文件(200×200px,≤100KB)
目标受众:
- 普通用户
- 企业客户
- 特定群体
Cover Theme:
- Festival type selection: Spring Festival, Mid-Autumn Festival, Valentine's Day, Qixi Festival, Christmas, Birthday, Lantern Festival, Dragon Boat Festival, New Year's Day, National Day
- Or brand event theme
Cover Abbreviation:
- Maximum 8 characters
- Displayed on the red envelope cover
- Can be: enterprise name abbreviation, official account name, video account name, registered trademark
Need Brand Logo:
- Yes/No
- If yes, provide the logo file (200×200px, ≤100KB)
Target Audience:
- General users
- Enterprise clients
- Specific groups
2. 设计风格确认
2. Design Style Confirmation
整体风格选择:
- 国潮(传统元素+现代设计)
- 简约
- 插画
- 3D立体
- 扁平化
- 手绘
- Q萌可爱
- 复古
- 其他自定义风格
主色调偏好:
- 红金色系(适合春节、国庆等喜庆节日)
- 粉紫色系(适合情人节、七夕)
- 蓝白色系(适合中秋、冰雪主题)
- 绿色系(适合端午、环保主题)
- 自定义颜色描述
元素偏好:
- 传统元素(祥云、纹样、窗花等)
- 现代元素(几何图形、抽象设计等)
- 吉祥物
- 抽象图案
- 特定IP形象
Overall Style Selection:
- Chinese Chic (traditional elements + modern design)
- Minimalist
- Illustration
- 3D Stereoscopic
- Flat Design
- Hand-drawn
- Cute/Q-style
- Retro
- Other custom styles
Main Color Preference:
- Red and Gold Series (suitable for festive festivals like Spring Festival, National Day)
- Pink and Purple Series (suitable for Valentine's Day, Qixi Festival)
- Blue and White Series (suitable for Mid-Autumn Festival, ice and snow themes)
- Green Series (suitable for Dragon Boat Festival, environmental protection themes)
- Custom color description
Element Preference:
- Traditional elements (auspicious clouds, patterns, window grilles, etc.)
- Modern elements (geometric shapes, abstract designs, etc.)
- Mascots
- Abstract patterns
- Specific IP images
3. 素材需求确认
3. Material Requirement Confirmation
用户选择需要生成的素材:
- ☑️ 封面图(必需素材)
- ☐ 封面挂件(可选素材)
- ☐ 气泡挂件(可选素材)
- ☐ 封面故事图片(可选素材,最多5张)
Materials the user needs to generate:
- ☑️ Cover Image (Required)
- ☐ Cover Pendant (Optional)
- ☐ Bubble Pendant (Optional)
- ☐ Cover Story Images (Optional, maximum 5 images)
4. 特殊需求确认
4. Special Requirement Confirmation
是否包含人物肖像:
- 如果是,需要提供肖像权授权书(授权有效期需≥提审后6个月)
是否使用注册商标:
- 如果是,需要提供商标注册证
是否包含版权素材:
- 如果是,需要提供版权授权书(授权有效期需≥提审后6个月)
Include Portrait:
- If yes, provide portrait authorization letter (authorization validity period ≥ 6 months after submission for review)
Use Registered Trademark:
- If yes, provide trademark registration certificate
Include Copyrighted Materials:
- If yes, provide copyright authorization letter (authorization validity period ≥ 6 months after submission for review)
阶段二:制定设计方案
Phase 2: Design Formulation
根据用户确认的需求,向用户展示完整的设计方案:
Based on the confirmed requirements, present the complete design proposal to the user:
方案展示格式
Proposal Display Format
plaintext
【设计方案】
━━━━━━━━━━━━━━━━━━━━━━━━
🎨 主题:[主题名称]
📝 封面简称:[简称](≤8字)
🎯 设计风格:[风格描述]
🎨 主色调:[色彩方案]
📦 素材清单:
1. ☑️ 封面图(必需)- 957×1278像素
2. ☐ 封面挂件(可选)- 1053×1746像素
3. ☐ 气泡挂件(可选)- 480×384像素
4. ☐ 封面故事图片(可选)- 750×1250像素 × [数量]
━━━━━━━━━━━━━━━━━━━━━━━━plaintext
【Design Proposal】
━━━━━━━━━━━━━━━━━━━━━━━━
🎨 Theme: [Theme Name]
📝 Cover Abbreviation: [Abbreviation] (≤8 characters)
🎯 Design Style: [Style Description]
🎨 Main Color Scheme: [Color Scheme]
📦 Material List:
1. ☑️ Cover Image (Required) - 957×1278 pixels
2. ☐ Cover Pendant (Optional) - 1053×1746 pixels
3. ☐ Bubble Pendant (Optional) - 480×384 pixels
4. ☐ Cover Story Images (Optional) - 750×1250 pixels × [Quantity]
━━━━━━━━━━━━━━━━━━━━━━━━方案确认
Proposal Confirmation
- 用户确认设计方案无误后,进入下一阶段
- 如有修改需求,调整后再次确认
- 确认后方可开始生成图片
- After the user confirms the design proposal is correct, proceed to the next phase
- If there are modification needs, adjust and confirm again
- Start generating images only after confirmation
阶段三:生成封面图片
Phase 3: Cover Image Generation
严格按照以下顺序和规范生成各类素材:
Generate various materials in strict accordance with the following order and specifications:
生成顺序
Generation Order
- 封面图(必需)- 957×1278px
- 封面挂件(可选)- 1053×1746px
- 气泡挂件(可选)- 480×384px
- 封面故事图(可选)- 750×1250px
- Cover Image (Required) - 957×1278px
- Cover Pendant (Optional) - 1053×1746px
- Bubble Pendant (Optional) - 480×384px
- Cover Story Images (Optional) - 750×1250px
图片生成步骤
Image Generation Steps
步骤1:选择提示词模板
Step 1: Select Prompt Template
如果是节日主题:
- 使用 中对应的节日专属提示词
references/festival-prompts.md - 确保使用与节日匹配的元素和配色方案
如果是自定义主题:
- 使用 中的通用模板
references/prompt-templates.md - 根据用户需求替换变量,补充细节
If it's a festival theme:
- Use the festival-specific prompts in
references/festival-prompts.md - Ensure elements and color schemes match the festival
If it's a custom theme:
- Use the general templates in
references/prompt-templates.md - Replace variables and supplement details according to user needs
步骤2:构建完整提示词
Step 2: Build Complete Prompt
根据选择的模板,替换以下变量:
- :替换为用户确认的具体风格
[用户选择的风格] - :替换为用户确认的配色方案
[主色调] - :替换为具体的主题名称
[主题描述] - :替换为用户确认的核心元素(如生肖形象、动物等)
[核心视觉元素描述] - :替换为具体的背景描述
[背景设计] - :替换为用户确认的装饰元素
[装饰性元素]
Replace the following variables according to the selected template:
- : Replace with the specific style confirmed by the user
[User-selected Style] - : Replace with the color scheme confirmed by the user
[Main Color Scheme] - : Replace with the specific theme name
[Theme Description] - : Replace with the core elements confirmed by the user (such as zodiac images, animals, etc.)
[Core Visual Element Description] - : Replace with the specific background description
[Background Design] - : Replace with the decorative elements confirmed by the user
[Decorative Elements]
步骤3:强调关键构图规则
Step 3: Emphasize Key Composition Rules
- 使用 中的尺寸规范文件的详细说明
references/dimension-specs.md
在提示词中必须包含尺寸规范文件中的相关规则,例如以下说明:
封面图构图规则:
- 主要视觉元素集中在画面中部和下部
- 上方区域避免复杂图案,确保白色文字清晰可读
- 画面底部15%可能被遮挡,避免放置关键元素
封面挂件构图规则:
- 说明:挂件应是一个图案或图标,具备一定的造型和装饰纹样,不应是单一的线条或线框。封面挂件会和封面图一起展示在拆红包页。
- 尺寸:1053×1746像素,宽高比约3:5
- 可编辑区域:仅顶部约324px区域可编辑(其余区域为不可编辑区域)
- 设计元素必须 100% 位于顶部324px区域内(包括阴影、光晕、粒子等细节)
- 顶部324px以下区域必须保持完全空白/透明(不可出现任何不透明像素)
- 挂件应是一个图案或图标,具备一定的造型和装饰纹样,不应是单一的线条或线框。
气泡挂件构图规则:
- 挂件应是一个图案或图标,具备一定的造型和装饰纹样,不应是单一的线条或线框。气泡挂件会和封面图一起展示在红包气泡上。
- 尺寸:480×384像素,宽高比5:4
- 可编辑区域(按平台编辑器示意图):
- 顶部96px为可编辑区域(可出现元素)
- 中间216px为不可编辑区域(必须完全透明留空,不可出现任何不透明像素)
- 底部72px为可编辑区域(可出现元素)
- 元素不得越界:包括阴影、描边、发光、粒子等都不得进入中间216px不可编辑区域
封面故事图构图规则:
- 说明:封面故事将在红包详情页展示,用于讲述品牌、团队、封面创作背后的故事,让品牌文化更好地传递。
- 尺寸:750×1250像素,宽高比3:5
- 画面顶部和底部各10%可能在部分设备上被裁切
- 关键元素集中在画面中央80%区域
- 底部预留空间用于可选的故事描述文字叠加
- Use the detailed instructions in the dimension specification file
references/dimension-specs.md
The prompt must include relevant rules from the dimension specification file, such as the following instructions:
Cover Image Composition Rules:
- Main visual elements are concentrated in the middle and lower parts of the image
- Avoid complex patterns in the upper area to ensure white text is clearly readable
- The bottom 15% of the image may be blocked, so avoid placing key elements there
Cover Pendant Composition Rules:
- Description: The pendant should be a pattern or icon with certain shapes and decorative patterns, not a single line or wireframe. The cover pendant will be displayed together with the cover image on the red envelope opening page.
- Size: 1053×1746 pixels, aspect ratio approximately 3:5
- Editable Area: Only the top approximately 324px area is editable (the rest is non-editable)
- Design elements must be 100% located within the top 324px area (including details such as shadows, halos, particles, etc.)
- The area below the top 324px must be completely blank/transparent (no opaque pixels allowed)
- The pendant should be a pattern or icon with certain shapes and decorative patterns, not a single line or wireframe.
Bubble Pendant Composition Rules:
- Description: The bubble pendant should be a pattern or icon with certain shapes and decorative patterns, not a single line or wireframe. The bubble pendant will be displayed together with the cover image on the red envelope bubble.
- Size: 480×384 pixels, aspect ratio 5:4
- Editable Area (according to platform editor schematic):
- Top 96px is editable area (elements can be placed)
- Middle 216px is non-editable area (must be completely transparent and blank, no opaque pixels allowed)
- Bottom 72px is editable area (elements can be placed)
- Elements must not cross boundaries: including shadows, strokes, glows, particles, etc., must not enter the middle 216px non-editable area
Cover Story Image Composition Rules:
- Description: The cover story will be displayed on the red envelope details page, used to tell the story behind the brand, team, and cover creation, allowing brand culture to be better conveyed.
- Size: 750×1250 pixels, aspect ratio 3:5
- The top and bottom 10% of the image may be cropped on some devices
- Key elements are concentrated in the central 80% area of the image
- Reserve space at the bottom for optional story description text overlay
步骤4:强调禁止元素
Step 4: Emphasize Prohibited Elements
在提示词中必须包含以下禁止内容:
- 不包含任何文字、水印或logo
- 不包含二维码、条形码或联系方式
- 不包含真实人物照片或肖像
- 不包含品牌商品图片或广告元素
- 不包含政治、宗教或争议性符号
- 内容适合全年龄段用户
The prompt must include the following prohibited content:
- No text, watermarks or logos
- No QR codes, barcodes or contact information
- No real person photos or portraits
- No brand product images or advertising elements
- No political, religious or controversial symbols
- Content suitable for all age groups
步骤5:调用图片生成工具
Step 5: Call Image Generation Tool
-
使用工具生成初始图片,使用命令样例如下:
scripts/generate_imagenode scripts/generate_image.js -p "日落山脉风景" -f "sunset.png" -a 1:1 -r 2K命令解释如下:参数 必填 说明 /-p--prompt是 图片描述(文生图)或编辑指令(图生图)。保留用户原始完整输入。 /-f--filename否 输出图片路径/文件名;不传则自动生成带时间戳的 PNG 文件名,并写入当前目录。 /-a--aspect-ratio否 图片比例: 、1:1、16:9、9:16、4:3、3:4、3:2、2:3、5:4、4:5。21:9/-r--resolution否 图片分辨率: /1K/2K(必须大写)。不传则不在请求中指定,由 API 侧决定。4K/-i--input-image否 图生图输入图片路径;可传多张(最多 14 张)。传入该参数即进入编辑模式。 -
根据素材类型设置合适的描述
-
每次调用可以生成多张图片以提高质量
-
Use thetool to generate initial images, with the following command example:
scripts/generate_imagenode scripts/generate_image.js -p "Sunset mountain landscape" -f "sunset.png" -a 1:1 -r 2KCommand explanation:Parameter Required Description /-p--promptYes Image description (text-to-image) or editing instruction (image-to-image). Keep the user's original complete input. /-f--filenameNo Output image path/filename; if not provided, a PNG filename with timestamp will be automatically generated and saved in the current directory. /-a--aspect-ratioNo Image aspect ratio: ,1:1,16:9,9:16,4:3,3:4,3:2,2:3,5:4,4:521:9/-r--resolutionNo Image resolution: /1K/2K(must be uppercase). If not provided, it will not be specified in the request, determined by the API side.4K/-i--input-imageNo Input image path for image-to-image; multiple images (up to 14) can be passed. Passing this parameter enters edit mode. -
Set appropriate descriptions according to material types
-
Generate multiple images each time to improve quality
步骤6:调整图片尺寸并自动压缩
Step 6: Adjust Image Size and Auto-Compress
- 使用中的说明内容,理解图片尺寸规范和智能压缩策略
scripts/readme.md
使用 脚本对生成的图片进行精确裁剪、尺寸调整和智能压缩:
scripts/resize_cover.js脚本功能:
- 自动居中裁剪,保持目标比例
- 智能压缩:自动调整质量直到满足微信大小限制
- 支持批量生成所有尺寸
- 自动检查文件大小限制
- 挂件类自动强制安全区域透明
- 显示安全区域提示
- 注意:本脚本不处理背景去除,背景去除请使用 remove_bg_enhanced.js
微信大小限制:
- 封面图:≤500KB
- 封面挂件:≤300KB(PNG透明)
- 气泡挂件:≤300KB(PNG透明)
- 封面故事:≤300KB
使用方法:
-
安装依赖bash
cd scripts npm install -
单类型裁剪(自动压缩)bash
# 生成封面图(自动压缩到≤500KB) node resize_cover.js <输入图片> cover # 生成封面挂件(自动裁剪到标准尺寸,仅保留顶部324px可编辑区域) node resize_cover.js <输入图片> hang # 生成气泡挂件(自动裁剪到标准尺寸,保留顶部96px和底部72px可编辑区域) node resize_cover.js <输入图片> bubble # 生成封面故事(自动压缩到≤300KB) node resize_cover.js <输入图片> story -
批量生成所有尺寸bash
node resize_cover.js <输入图片> all [输出目录] -
指定输出路径bash
node resize_cover.js <输入图片> <类型> <输出路径>
支持的尺寸:
- 封面图:957×1278px(3:4)
- 封面挂件:1053×1746px(3:5,仅顶部324px可编辑,PNG透明)
- 气泡挂件:480×384px(5:4,顶部96px+底部72px可编辑,中间216px透明留空,PNG透明)
- 封面故事:750×1250px(3:5)
智能压缩策略:
脚本会自动尝试多种压缩策略直到满足限制:
-
非透明图片(封面图、故事图):
- JPEG质量调整:90% → 85% → ... → 55%
- 使用mozjpeg优化编码
- 必要时降低分辨率
-
透明图片(挂件类):
- 8-bit调色板PNG
- 降低调色板质量
- 限制颜色数量(128色)
- 最大压缩级别
- 必要时降低分辨率
输出示例:
📸 封面图
原始: 1920×1080px, 2450.50KB
目标: 957×1278px, ≤500KB
裁剪: 1438×1080px → 957×1278px
✅ 已保存: ./output/cover.jpg
大小: 485.32KB / 500KB
压缩: jpeg, 质量75%- Use the instructions in to understand image size specifications and intelligent compression strategies
scripts/readme.md
Use the script for precise cropping, size adjustment and intelligent compression of generated images:
scripts/resize_cover.jsScript Functions:
- Auto center cropping to maintain target aspect ratio
- Intelligent Compression: Automatically adjust quality until meeting WeChat size limits
- Support batch generation of all sizes
- Auto check file size limits
- Auto force safety area transparency for pendants
- Display safety area prompts
- Note: This script does not handle background removal. Please use remove_bg_enhanced.js for background removal
WeChat Size Limits:
- Cover Image: ≤500KB
- Cover Pendant: ≤300KB (PNG transparent)
- Bubble Pendant: ≤300KB (PNG transparent)
- Cover Story: ≤300KB per image
Usage:
-
Install Dependenciesbash
cd scripts npm install -
Single Type Cropping (Auto Compression)bash
# Generate cover image (auto compress to ≤500KB) node resize_cover.js <input-image> cover # Generate cover pendant (auto crop to standard size, only retain top 324px editable area) node resize_cover.js <input-image> hang # Generate bubble pendant (auto crop to standard size, retain top 96px and bottom 72px editable areas) node resize_cover.js <input-image> bubble # Generate cover story (auto compress to ≤300KB) node resize_cover.js <input-image> story -
Batch Generate All Sizesbash
node resize_cover.js <input-image> all [output-directory] -
Specify Output Pathbash
node resize_cover.js <input-image> <type> <output-path>
Supported Sizes:
- Cover Image: 957×1278px (3:4)
- Cover Pendant: 1053×1746px (3:5, only top 324px editable, PNG transparent)
- Bubble Pendant: 480×384px (5:4, top 96px + bottom 72px editable, middle 216px transparent blank, PNG transparent)
- Cover Story: 750×1250px (3:5)
Intelligent Compression Strategy:
The script will automatically try multiple compression strategies until meeting the limit:
-
Non-transparent Images (cover images, story images):
- JPEG quality adjustment: 90% → 85% → ... → 55%
- Optimize encoding with mozjpeg
- Reduce resolution if necessary
-
Transparent Images (pendants):
- 8-bit palette PNG
- Reduce palette quality
- Limit color count (128 colors)
- Maximum compression level
- Reduce resolution if necessary
Output Example:
📸 Cover Image
Original: 1920×1080px, 2450.50KB
Target: 957×1278px, ≤500KB
Cropped: 1438×1080px → 957×1278px
✅ Saved to: ./output/cover.jpg
Size: 485.32KB / 500KB
Compression: jpeg, quality 75%步骤7:处理透明背景(仅挂件)
Step 7: Handle Transparent Background (Pendants Only)
对于封面挂件和气泡挂件,需要确保背景为透明(PNG格式),元素必须位于规定的安全区域内。
使用 remove_bg_enhanced.js(AI生成图专用)
适用于AI生成的复杂背景图片,具有智能的背景检测算法:
脚本特点:
- 智能背景检测(支持白色/灰色/自动模式)
- 基于亮度和颜色距离的双重检测算法
- 边缘羽化和抗锯齿处理
- 噪点过滤(自动去除小杂质)
- 针对AI生成图片优化
使用方法:
-
先生成白底图片bash
# 生成封面挂件(提示词中包含 "PURE WHITE BACKGROUND") node generate_image.js -p "... PURE WHITE BACKGROUND ..." -i "封面.png" -f "封面挂件_白底.png" -a "2:3" # 生成气泡挂件 node generate_image.js -p "... PURE WHITE BACKGROUND ..." -i "封面.png" -f "气泡挂件_白底.png" -a "5:4" -
使用增强脚本去除背景bash
# 处理封面挂件 node remove_bg_enhanced.js 封面挂件_白底.png 封面挂件.png --mode white --tolerance 35 --feather 4 # 处理气泡挂件 node remove_bg_enhanced.js 气泡挂件_白底.png 气泡挂件.png --mode white --tolerance 35 --feather 3 -
调整尺寸到规范要求bash
# 封面挂件调整到标准尺寸(已透明,直接裁剪即可) node resize_cover.js 封面挂件.png hang 封面挂件.png # 气泡挂件调整到标准尺寸(已透明,直接裁剪即可) node resize_cover.js 气泡挂件.png bubble 气泡挂件.png
参数说明:
| 参数 | 说明 | 默认值 | 建议值 |
|---|---|---|---|
| 背景检测模式: | auto | white(白底图) |
| 背景容差(0-100),越大越激进 | 30 | 35-50 |
| 边缘羽化像素(0-20) | 3 | 3-5 |
| 边缘平滑度(0-10) | 2 | 2-4 |
| 最小保留区域像素数 | 100 | 100-200 |
完整工作流示例:
bash
undefinedFor cover pendants and bubble pendants, ensure the background is transparent (PNG format) and elements are located within the specified safety areas.
Use remove_bg_enhanced.js (AI-generated Image Special)
Suitable for AI-generated images with complex backgrounds, featuring intelligent background detection algorithms:
Script Features:
- Intelligent background detection (supports white/gray/auto modes)
- Dual detection algorithm based on brightness and color distance
- Edge feathering and anti-aliasing processing
- Noise filtering (auto remove small impurities)
- Optimized for AI-generated images
Usage:
-
Generate White Background Image Firstbash
# Generate cover pendant (prompt includes "PURE WHITE BACKGROUND") node generate_image.js -p "... PURE WHITE BACKGROUND ..." -i "cover.png" -f "cover-pendant-white-bg.png" -a "2:3" # Generate bubble pendant node generate_image.js -p "... PURE WHITE BACKGROUND ..." -i "cover.png" -f "bubble-pendant-white-bg.png" -a "5:4" -
Use Enhanced Script to Remove Backgroundbash
# Process cover pendant node remove_bg_enhanced.js cover-pendant-white-bg.png cover-pendant.png --mode white --tolerance 35 --feather 4 # Process bubble pendant node remove_bg_enhanced.js bubble-pendant-white-bg.png bubble-pendant.png --mode white --tolerance 35 --feather 3 -
Adjust Size to Specification Requirementsbash
# Adjust cover pendant to standard size (already transparent, just crop) node resize_cover.js cover-pendant.png hang cover-pendant.png # Adjust bubble pendant to standard size (already transparent, just crop) node resize_cover.js bubble-pendant.png bubble bubble-pendant.png
Parameter Explanation:
| Parameter | Description | Default Value | Recommended Value |
|---|---|---|---|
| Background detection mode: | auto | white (white background images) |
| Background tolerance (0-100), larger values are more aggressive | 30 | 35-50 |
| Edge feathering pixels (0-20) | 3 | 3-5 |
| Edge smoothness (0-10) | 2 | 2-4 |
| Minimum reserved area pixel count | 100 | 100-200 |
Complete Workflow Example:
bash
undefined1. 生成白底挂件图片
1. Generate white background pendant image
node generate_image.js
-p "A decorative pendant design on PURE WHITE BACKGROUND..."
-i "封面.png"
-f "封面挂件_白底.png"
-a "2:3"
-p "A decorative pendant design on PURE WHITE BACKGROUND..."
-i "封面.png"
-f "封面挂件_白底.png"
-a "2:3"
node generate_image.js
-p "A decorative pendant design on PURE WHITE BACKGROUND..."
-i "cover.png"
-f "cover-pendant-white-bg.png"
-a "2:3"
-p "A decorative pendant design on PURE WHITE BACKGROUND..."
-i "cover.png"
-f "cover-pendant-white-bg.png"
-a "2:3"
2. 去除背景
2. Remove background
node remove_bg_enhanced.js
封面挂件_白底.png
封面挂件_透明.png
--mode white
--tolerance 35
--feather 4
--min-area 200
封面挂件_白底.png
封面挂件_透明.png
--mode white
--tolerance 35
--feather 4
--min-area 200
node remove_bg_enhanced.js
cover-pendant-white-bg.png
cover-pendant-transparent.png
--mode white
--tolerance 35
--feather 4
--min-area 200
cover-pendant-white-bg.png
cover-pendant-transparent.png
--mode white
--tolerance 35
--feather 4
--min-area 200
3. 调整尺寸到微信规范
3. Adjust size to WeChat specifications
node resize_cover.js
封面挂件_透明.png
hang
封面挂件.png
--no-remove-bg
封面挂件_透明.png
hang
封面挂件.png
--no-remove-bg
**注意事项:**
- 生成图片时务必在提示词中加入 `PURE WHITE BACKGROUND`
- 容差值根据实际效果调整,复杂背景可适当增大
- 羽化值越大边缘越柔和,但可能损失细节
- 处理完成后必须使用 `resize_cover.js` 调整至标准尺寸node resize_cover.js
cover-pendant-transparent.png
hang
cover-pendant.png
--no-remove-bg
cover-pendant-transparent.png
hang
cover-pendant.png
--no-remove-bg
**Notes:**
- Be sure to add `PURE WHITE BACKGROUND` to the prompt when generating images
- Adjust tolerance value according to actual effect, can appropriately increase for complex backgrounds
- Larger feather values result in softer edges but may lose details
- Must use `resize_cover.js` to adjust to standard size after processing阶段四:交付与审核提醒
Phase 4: Delivery & Review Reminder
完成所有素材生成后,向用户提供完整的交付清单和审核提醒:
After completing all material generation, provide the user with a complete delivery list and review reminders:
交付清单格式
Delivery List Format
plaintext
【交付清单】
━━━━━━━━━━━━━━━━━━━━━━━━
✅ 封面图 (957×1278px),文件名称
└─ 格式:PNG/JPG,≤500KB
☐ 封面挂件 (1053×1746px),文件名称
└─ 格式:PNG透明背景,≤300KB
☐ 气泡挂件 (480×384px),文件名称
└─ 格式:PNG透明背景,≤300KB
☐ 封面故事图片 (750×1250px) × [数量],文件名称
└─ 格式:PNG/JPG,≤300KB每张
📋 提交审核提醒:
- [ ] 准备封面简称(≤8字)
- [ ] 准备品牌logo(如需,200×200px,≤100KB)
- [ ] 准备证明材料(如涉及商标/肖像/版权)
- [ ] 授权有效期需≥提审后6个月
━━━━━━━━━━━━━━━━━━━━━━━━plaintext
【Delivery List】
━━━━━━━━━━━━━━━━━━━━━━━━
✅ Cover Image (957×1278px), File Name
└─ Format: PNG/JPG, ≤500KB
☐ Cover Pendant (1053×1746px), File Name
└─ Format: PNG transparent background, ≤300KB
☐ Bubble Pendant (480×384px), File Name
└─ Format: PNG transparent background, ≤300KB
☐ Cover Story Images (750×1250px) × [Quantity], File Name
└─ Format: PNG/JPG, ≤300KB per image
📋 Submission & Review Reminders:
- [ ] Prepare cover abbreviation (≤8 characters)
- [ ] Prepare brand logo (if needed, 200×200px, ≤100KB)
- [ ] Prepare supporting documents (if involving trademarks/portraits/copyrights)
- [ ] Authorization validity period ≥ 6 months after submission for review
━━━━━━━━━━━━━━━━━━━━━━━━审核前自检提醒
Pre-Review Self-Check Reminders
提醒用户在提交审核前进行以下检查:
- 内容合规性检查
- 不包含任何法律禁止内容
- 不包含政治敏感内容
- 不包含联系方式和引流信息
- 不包含商业推广内容
- 不侵犯他人版权、商标、肖像权
- 设计质量检查
- 画面清晰锐利,无模糊、锯齿
- 色彩搭配和谐统一
- 构图平衡,焦点明确
- 文件大小符合要求
- 尺寸精确无误
- 安全区域检查
- 封面图上方25%区域简洁干净
- 封面图底部15%无关键元素
- 封面挂件元素仅在顶部324px可编辑区域内(其余区域透明留空)
- 气泡挂件中间216px不可编辑区域完全透明(元素仅出现在顶部96px与底部72px)
- 格式要求检查
- 封面图:PNG/JPG,≤500KB,957×1278px
- 封面挂件:PNG透明,≤300KB,1053×1746px
- 气泡挂件:PNG透明,≤300KB,480×384px
- 封面故事:PNG/JPG,≤300KB/张,750×1250px
Remind the user to perform the following checks before submitting for review:
- Content Compliance Check
- No legally prohibited content
- No politically sensitive content
- No contact information or traffic-diversion information
- No commercial promotion content
- No infringement of others' copyrights, trademarks, portrait rights
- Design Quality Check
- Clear and sharp image, no blurriness or jagged edges
- Harmonious and unified color matching
- Balanced composition, clear focus
- File size meets requirements
- Exact size
- Safety Area Check
- The top 25% area of the cover image is simple and clean
- No key elements in the bottom 15% of the cover image
- Cover pendant elements are only within the top 324px editable area (the rest is transparent blank)
- The middle 216px non-editable area of the bubble pendant is completely transparent (elements only appear in the top 96px and bottom 72px)
- Format Requirement Check
- Cover Image: PNG/JPG, ≤500KB, 957×1278px
- Cover Pendant: PNG transparent, ≤300KB, 1053×1746px
- Bubble Pendant: PNG transparent, ≤300KB, 480×384px
- Cover Story: PNG/JPG, ≤300KB per image, 750×1250px
工作流程的关键原则
Key Principles of Workflow
1. 循序渐进
1. Step-by-Step
- 每个阶段完成后才能进入下一阶段
- 必须在用户确认设计方案后才能开始生成图片
- 确保每个步骤都符合规范要求
- Proceed to the next phase only after completing the current one
- Start generating images only after the user confirms the design proposal
- Ensure each step complies with specifications
2. 遵循规范
2. Follow Specifications
- 严格遵循 中的尺寸规范
references/dimension-specs.md - 严格遵循 和
references/prompt-templates.md中的提示词模板references/festival-prompts.md - 严格遵循 中的审核标准
references/audit-standards.md
- Strictly follow the size specifications in
references/dimension-specs.md - Strictly follow the prompt templates in and
references/prompt-templates.mdreferences/festival-prompts.md - Strictly follow the review standards in
references/audit-standards.md
3. 风格统一
3. Style Consistency
- 所有素材(封面图、挂件、故事图)必须使用统一的设计语言
- 色彩、风格、元素选择要协调一致
- 形成完整的视觉体系
- All materials (cover images, pendants, story images) must use a unified design language
- Colors, styles, and element selections must be coordinated
- Form a complete visual system
4. 安全优先
4. Safety First
- 始终以审核通过率为首要目标
- 任何不确定的内容都不要使用
- 保持内容积极向上、健康正面
- Always prioritize review pass rate
- Do not use any uncertain content
- Keep content positive, healthy and uplifting
5. 用户确认
5. User Confirmation
- 每个关键阶段都需要用户确认
- 用户的满意度是最终目标
- 根据用户反馈及时调整
- User confirmation is required at each key phase
- User satisfaction is the ultimate goal
- Adjust promptly based on user feedback
常见场景处理
Common Scenario Handling
场景1:用户选择节日主题
Scenario 1: User Selects Festival Theme
- 从 中选择对应的节日模板
references/festival-prompts.md - 使用节日专属的元素和配色方案
- 按照节日主题的设计要求生成素材
- Select the corresponding festival template from
references/festival-prompts.md - Use festival-specific elements and color schemes
- Generate materials according to the design requirements of the festival theme
场景2:用户有自定义品牌需求
Scenario 2: User Has Custom Brand Needs
- 使用 中的通用模板
references/prompt-templates.md - 融入用户的品牌元素(logo、品牌色等)
- 提醒用户准备商标注册证等证明材料
- Use the general templates in
references/prompt-templates.md - Integrate the user's brand elements (logo, brand colors, etc.)
- Remind the user to prepare supporting documents such as trademark registration certificates
场景3:用户需要所有素材
Scenario 3: User Needs All Materials
- 按照顺序生成:封面图 → 封面挂件 → 气泡挂件 → 封面故事图
- 确保每张图片都符合对应的尺寸规范
- 保持所有素材的风格统一
- Generate in order: Cover Image → Cover Pendant → Bubble Pendant → Cover Story Images
- Ensure each image complies with the corresponding size specifications
- Maintain style consistency across all materials
场景4:用户只需要封面图
Scenario 4: User Only Needs Cover Image
- 仅生成封面图(957×1278px)
- 确保构图符合安全区域要求
- 重点优化封面图的视觉效果
- Generate only the cover image (957×1278px)
- Ensure the composition meets safety area requirements
- Focus on optimizing the visual effect of the cover image
技能目录文件结构
Skill Directory File Structure
核心功能: 存放技能运行所需的参考文档、模板和规范文件,为微信红包封面设计提供标准化的指导依据。
├── SKILL.md # 技能主文件,包含完整的工作流程和使用说明
└── scripts/ # 脚本文件夹
├── generate_image.js # 图片生成脚本(文生图/图生图)
├── resize_cover.js # 图片尺寸裁剪和压缩脚本
├── remove_bg_enhanced.js # 增强版背景去除脚本(AI图专用)
├── package.json # 依赖配置
└── README.md # 脚本使用说明
└── references/ # 参考文档文件夹
├── dimension-specs.md # 尺寸规范文档
├── prompt-templates.md # 通用提示词模板
├── festival-prompts.md # 节日专属提示词
└── audit-standards.md # 审核标准文档
Core Function: Store reference documents, templates and specification files required for skill operation, providing standardized guidance for WeChat red envelope cover design.
├── SKILL.md # Main skill file, including complete workflow and usage instructions
└── scripts/ # Script folder
├── generate_image.js # Image generation script (text-to-image/image-to-image)
├── resize_cover.js # Image size cropping and compression script
├── remove_bg_enhanced.js # Enhanced background removal script (for AI-generated images)
├── package.json # Dependency configuration
└── README.md # Script usage instructions
└── references/ # Reference document folder
├── dimension-specs.md # Dimension specification document
├── prompt-templates.md # General prompt templates
├── festival-prompts.md # Festival-specific prompts
└── audit-standards.md # Review standards document
references文件清单及用途说明
References File List and Usage Instructions
1. dimension-specs.md(尺寸规范文档)
1. dimension-specs.md (Dimension Specification Document)
文档作用: 定义微信红包封面各类素材的精确尺寸规格和设计要求
Document Function: Define precise size specifications and design requirements for various materials of WeChat red envelope covers
2. prompt-templates.md(通用提示词模板)
2. prompt-templates.md (General Prompt Templates)
文档作用: 提供各类素材的通用提示词模板,确保生成的图片符合微信红包封面规范
Document Function: Provide general prompt templates for various materials to ensure generated images comply with WeChat red envelope cover specifications
3. festival-prompts.md(节日专属提示词)
3. festival-prompts.md (Festival-Specific Prompts)
文档作用: 为不同节日提供专属的提示词模板,包含节日特定的元素、配色方案和设计要求
Document Function: Provide festival-specific prompt templates for different festivals, including festival-specific elements, color schemes and design requirements
4. audit-standards.md(审核标准文档)
4. audit-standards.md (Review Standards Document)
文档作用: 详细说明微信红包封面的审核标准和禁止内容,确保生成的素材能够通过平台审核
Document Function: Detail the review standards and prohibited content for WeChat red envelope covers, ensuring generated materials can pass platform review
scripts脚本清单及用途说明
Scripts List and Usage Instructions
1. generate_image.js(图片生成脚本)
1. generate_image.js (Image Generation Script)
文件作用: 调用AI接口生成图片,支持文生图和图生图
核心功能:
- 文生图:根据提示词生成全新图片
- 图生图:基于已有图片进行编辑和优化
- 支持多种比例和分辨率
使用场景:
- 生成封面图、挂件、故事图等素材
- 基于已有图片生成配套素材(保持风格一致)
File Function: Call AI interface to generate images, supporting text-to-image and image-to-image
Core Functions:
- Text-to-image: Generate new images based on prompts
- Image-to-image: Edit and optimize based on existing images
- Support multiple aspect ratios and resolutions
Usage Scenarios:
- Generate cover images, pendants, story images and other materials
- Generate supporting materials based on existing images (maintain style consistency)
2. resize_cover.js(尺寸裁剪脚本)
2. resize_cover.js (Size Cropping Script)
文件作用: 调整图片尺寸至微信红包封面规范,并进行智能压缩
核心功能:
- 自动居中裁剪,保持目标比例
- 智能压缩至符合大小限制
- 挂件类自动强制安全区域透明(仅保留可编辑区域内容)
使用场景:
- 将图片调整到微信红包封面的标准尺寸
- 压缩文件至符合微信大小限制
- 强制挂件类图片的安全区域(自动裁剪掉不可编辑区域)
注意事项:
- 本脚本不负责背景去除,仅处理尺寸和压缩
- 如需去背景,请先使用 remove_bg_enhanced.js 处理
File Function: Adjust image size to WeChat red envelope cover specifications and perform intelligent compression
Core Functions:
- Auto center cropping to maintain target aspect ratio
- Intelligent compression to meet size limits
- Auto force safety area transparency for pendants (only retain content in editable areas)
Usage Scenarios:
- Adjust images to the standard size of WeChat red envelope covers
- Compress files to meet WeChat size limits
- Force safety areas for pendant images (auto crop non-editable areas)
Notes:
- This script does not handle background removal, only size and compression
- For background removal, please use remove_bg_enhanced.js first
3. remove_bg_enhanced.js(增强版背景去除脚本)⭐ 推荐
3. remove_bg_enhanced.js (Enhanced Background Removal Script) ⭐ Recommended
文件作用: 专为AI生成图片设计的智能背景去除工具
核心功能:
- 智能背景检测(白色/灰色/自动模式)
- 亮度和颜色距离双重检测算法
- 边缘羽化和抗锯齿处理
- 噪点过滤,保留主体细节
使用场景:
- AI生成挂件图片的背景去除
- 复杂背景的专业级抠图
- 需要精细边缘处理的场景
脚本分工:
| 功能 | resize_cover.js | remove_bg_enhanced.js |
|---|---|---|
| 主要职责 | 尺寸裁剪和压缩 | 背景去除和透明处理 |
| 适用场景 | 所有图片的尺寸标准化 | AI生成图片的背景去除 |
| 核心能力 | 居中裁剪、智能压缩、安全区域限制 | 智能背景检测、边缘羽化、噪点过滤 |
| 使用时机 | 最后一步尺寸标准化 | 去背景后,resize_cover.js之前 |
| 典型工作流 | 最后执行 | 先生成白底图→去背景→resize_cover.js调整尺寸 |
File Function: Intelligent background removal tool designed specifically for AI-generated images
Core Functions:
- Intelligent background detection (white/gray/auto modes)
- Dual detection algorithm based on brightness and color distance
- Edge feathering and anti-aliasing processing
- Noise filtering, retain subject details
Usage Scenarios:
- Background removal for AI-generated pendant images
- Professional keying for complex backgrounds
- Scenarios requiring fine edge processing
Script Division of Labor:
| Function | resize_cover.js | remove_bg_enhanced.js |
|---|---|---|
| Main Responsibility | Size cropping and compression | Background removal and transparency processing |
| Applicable Scenarios | Size standardization for all images | Background removal for AI-generated images |
| Core Capabilities | Center cropping, intelligent compression, safety area restriction | Intelligent background detection, edge feathering, noise filtering |
| Usage Timing | Final step of size standardization | After background removal, before resize_cover.js |
| Typical Workflow | Execute last | Generate white background image first → remove background → adjust size with resize_cover.js |
references文件使用原则
References File Usage Principles
- 优先使用节日专属模板
- 当用户选择节日主题时,优先使用 festival-prompts.md 中的对应模板
- 确保节日元素和配色方案符合节日特色
- 通用模板作为补充
- 当用户有自定义需求或节日专属模板不完全匹配时,使用 prompt-templates.md 中的通用模板
- 根据用户需求替换变量,补充细节
- 严格遵守尺寸规范
- 所有素材必须严格按照 dimension-specs.md 中的尺寸要求生成
- 特别注意构图安全区域,确保文字可读性
- 始终遵循审核标准
- 所有设计必须符合 audit-standards.md 中的要求
- 避免使用任何禁止内容
- 确保内容适合全年龄段用户
- 风格保持一致
- 所有素材(封面图、挂件、故事图)必须使用统一的设计语言
- 色彩、风格、元素选择要协调
- Prioritize Festival-Specific Templates
- When the user selects a festival theme, prioritize using the corresponding template in festival-prompts.md
- Ensure festival elements and color schemes match festival characteristics
- General Templates as Supplement
- When the user has custom needs or the festival-specific template does not fully match, use the general templates in prompt-templates.md
- Replace variables and supplement details according to user needs
- Strictly Follow Size Specifications
- All materials must be generated strictly in accordance with the size requirements in dimension-specs.md
- Pay special attention to composition safety areas to ensure text readability
- Always Follow Review Standards
- All designs must comply with the requirements in audit-standards.md
- Avoid using any prohibited content
- Ensure content is suitable for all age groups
- Maintain Style Consistency
- All materials (cover images, pendants, story images) must use a unified design language
- Colors, styles, and element selections must be coordinated