Turn an article into a header image. By default, Codex's built-in image_gen, with visuals following this repository's xhs-Skills/space-xhs-image 'sLightweight AI Product Infographicsystem, with the canvas changed to the Official Account's 2.35:1.
This Skill only makes header images. Body images go through space-chart-image / space-text-logic-diagram, and full-article layout goes through space-wechat-layout。
The most important point: Official Account covers get cropped twice
This is what makes it different from Xiaohongshu 3:4 coversthe most fundamental difference, remember this before you start.
| Scenario | Display |
|---|---|
| Subscription account message list / top of article | Full 2.35:1 |
| Shared to Moments / chats | Only the exact center 1:1 square is captured |
On a 2.35:1 canvas, that exact center square occupies only42.6% of the width。
|←── 左翼 28.7% ──→|←── 中央安全区 42.6% ──→|←── 右翼 28.7% ──→|
分享时切掉 分享时唯一保得住的 分享时切掉
Taking the recommended canvas 1175×500 as an example, the safe zone is x 337–837, these 500px。
Actual result: a 12-character headline filling the full width, when shared, leaves only the middle 6 characters, and the first and last characters are each cut in half, completely unreadable.
So: the core phrase of the main headline, the main subject, anything that must be seen,must all go inside the central safe zone. The left and right wings should only hold background extensions, decorations, account name, date, and similar things that don't matter if lost.
⚠️ The counterintuitive part: the design instinct for a horizontal canvas is "left-right split columns"—text on the left, image on the right. But on an Official Account cover,any layout that distributes information evenly across the left and right sides is a trap, because when shared, both sides are cut off entirely, leaving only the middle. See
references/cover-layouts.mdfor the share safety rating of each layout.
Default settings
Use directly when the user hasn't specified, don't repeatedly ask about conventional options:
- Canvas:2.35:1 horizontal
- Output:1175 × 500 PNG
- Quantity: 1 image
- Visual system: Lightweight AI Product Infographic (see Style Lock below)
- Copy: 1 main headline, optional 1 short tag
- Main headline: 6–14 Chinese characters, at most 2 lines(horizontal canvas height is limited, 3 lines will definitely be cramped)
- Tag: no more than 8 Chinese characters, placed in a pill
- Visual order: main headline → emphasis words → decoration
- Safe zone strategy: core phrase must fall within the central 42.6%
When the user says "just do it" or "you decide", make a reasonable choice directly and generate, without pausing to wait.
Three safe zone strategies
| Strategy | Approach | Share effect | Suitable for |
|---|---|---|---|
| A Fully centered | The entire headline is packed into the central safe zone, ≤12 characters split into 2 lines | Completely intact | Accounts that rely on sharing for reach and prioritize stability |
| B Core phrase centered(Default) | Title spreads horizontally, but the most critical 4–6 character phrase is pressed right in the center | Core words intact, modifiers cut off | Most cases |
| C: Image-text separation | Main subject/graphic in the center, text on both wings | No text after sharing | Only displayed at the top of the article, sharing not expected |
Default to B. When choosing B, you must explicitly state "which characters are the core phrase" and verify during the check phase that they are within the safe zone.
C requires proactively warning about the risk, and proceed only after the user confirms.
Visual System (Style Lock)
Continue using the xhs-Skills/space-xhs-image/references/visual-system.md color palette and components, with the canvas changed to landscape.
Color palette(consistent with the Xiaohongshu series, for cross-platform visual consistency):
- Ink black
#181A24— titles and body text - Tech purple
#6C35E8— numbers, lines, key words - Electric blue
#4563F2— transition color for purple - Lime green
#A4E927— results, improvements, key actions - Light lavender
#F1ECFF/ light blue#EEF3FF— card background - Background
#FCFBFF/#FAFAFD/ pure white
Ratio approximately 72% white/light background, 18% black text and lines, 10% color accents. At most three accent colors per image.
Landscape-specific ratio adjustments(different from portrait, be sure to follow this set):
- Margins: about 5%–7% left and right, about 10%–14% top and bottom (tighter top and bottom in landscape)
- Main title height: occupies 28%–42%
- Decorative clusters: at most 2 groups(portrait has 3 groups; landscape is flatter, and 3 groups will inevitably look cluttered)
- Whitespace: ≥ 30%
Style Lock (reuse verbatim when generating images):
Create an original premium AI-product cover banner for a WeChat article in a 2.35:1 ultra-wide horizontal canvas. Use a clean white to very pale lavender background with generous margins and breathable negative space. Place the headline and all critical content inside the central square safe area (the middle 42.6% of the width), because this banner gets center-cropped to 1:1 when shared. Use modern simplified-Chinese sans-serif typography in near-black, with only one or two key phrases highlighted by a controlled violet-to-electric-blue gradient or vivid lime green. Optional supporting elements use large white rounded cards with subtle lavender-gray shadows. Use coherent thin rounded line icons related to software, workflow, documents, checklists, targets, and AI. Keep decorations sparse and confined to the left and right wings. The result should feel polished, calm, and instantly readable at small size in a message list.
Fixed negative constraints:
Do not copy any reference image layout. No copied creator name, no logo, no watermark, no signature, no fake interface screenshot, no garbled text, no invented Chinese characters, no long paragraphs, no tiny dense type, no photorealism, no glossy 3D mascot, no childish stickers, no heavy black shadows, no dark full-bleed background, no excessive decoration, and no critical text placed near the left or right edges.
Workflow
1. Understand the article
After reading the content, extract three things:
- The one sentence readers should remember most
- Which word best creates recognition or interest (this word is the one to press right in the center of the safe zone)
- Whether there is an object suitable to become the main subject of the image
2. Decide the title
If the user provided a title, keep the original meaning. If only the body text is provided, give 3 short title candidates and recommend 1.
Landscape title rules(stricter than portrait):
- Total length 6–14 characters, at most 2 lines
- First circle the core phrase (4–6 characters), and this part must be within the safe zone
- One line carries only one semantic block; do not break lines in the middle of a phrase
- When mixing Chinese and English, keep complete English phrases unbroken
- Omit punctuation as much as possible
The cover title is not the same as the article title. The article title can be long and can have hooks; the cover title must be short and scannable at a glance. If you need a viral article title, go to
baokuan-title-generator。
3. Choose the layout
Choose from references/cover-layouts.md ,each layout is marked with a sharing safety rating. Recommend 2–3 directions and explain the differences.
For the same batch of variants, keep the title and main subject consistent; you may change: composition, color weighting, decorative system, background treatment.Do not count simply changing a color as a new version。
4. Generate
Use references/prompt-recipes.md to assemble the prompt. Must specify:
Use case: ads-marketing- 2.35:1 horizontal WeChat official account header image
- Text that needs to appearlist character by character
- which characters must be in the central safe area
- composition, color scheme, font temperament, decoration placement
- must still be clear when scaled down to message list size
- no adding watermarks, account names, brands, or irrelevant text
One image_gen call generates only one variant. For 3 images, call 3 times, and specify the differences for each.
5. Check (two passes, neither can be skipped)
First pass: machine check
python3 scripts/check_cover.py 路径/cover-01.png --safe-zone --share-preview --thumbnail
It will output:
- whether the ratio is 2.35:1, dimensions, file size
- the exact pixel range of the safe area
-safezone.jpg: darken the left and right wings, draw a red frame around the safe area,see at a glance whether the title has crossed the boundary-share-1x1.jpg: what it actually looks like when shared to Moments-thumb.jpg: feed thumbnail
Second pass: visual check(machines cannot check these)
- whether the main title is correct character by character, whether there are garbled characters, typos, or extra text
- Open
-share-1x1.jpg: does the core phrase still read clearly? - Open
-thumb.jpg: can it be understood within 2 seconds - whether the main title is the first visual focus
- whether faces, products, and key identifiers are complete
- whether there is enough white space, and whether all four sides have safe margins
- whether the color palette, corner radius, and line width are consistent with other images in this series
If the share preview does not read clearly, it is unqualified, no matter how good the full image looks.
6. Correction
If only a local issue exists, edit in a targeted way; do not redo the entire image:
Only move the second line of the main title "Agent 接管 SaaS" as a whole to the left by about 8%, so that it falls completely within the square area at the exact center of the image; all other text, composition, colors, and decorations remain unchanged.
When the same text still fails to generate correctly twice in a row:
- First shorten the text and try again
- If it still fails, generate atext-free base imageand reserve a clear title area, telling the user that the text will be overlaid in an editable way
- Switch to
space-wechat-layoutor an external tool to make a character-accurate text layer
Do not deliver an image with typos as a finished product.
7. Save and deliver
09 frames/gzh-cover/YYYY-MM-DD-主题/
├── cover-01.png
├── cover-01-safezone.jpg
├── cover-01-share-1x1.jpg
└── prompt.md
When generating only one image, still call it cover-01.png. If a file with the same name already exists, use -v2,must not silently overwrite. If the image generation result is in a temporary directory, it must be copied to the project directory before delivery.
When delivering, provide:
- the absolute path of the finished product and a clickable link
- actual dimensions and ratio
- the layout and safe area strategy used (A/B/C)
- which characters make up the core phrase, and whether it has been verified to be within the safe area
- when there are multiple versions, explain the differences of each version
- if there are limitations, state them directly
Content and visual boundaries
- Do not automatically add account names, watermarks, QR codes, or platform logos that the user did not request
- For reference images, only extract general layout, color scheme, materials, and font temperament; do not copy brand signatures, personal identities, or exclusive characters
- Do not fabricate efficacy, benefits, rankings, or professional endorsements
- For finance and medical topics, do not stuff disclaimers into the cover; remind the user to add them in the body text
- Do not generate real-person portraits or brand trademarks unless requested
Quick example
User says:
Help me make a WeChat official account cover for "The era of Agent taking over SaaS has begun."
Execution:
- Circle the core phrase:"taking over SaaS"(4 characters + 1 English word)
- Break the title into lines:
Agent 接管 SaaS/时代已开启 - Choose a layout: large centered text (share safety ★★★)
- Strategy B: press the core phrase in the exact center,
Agentand时代已开启are allowed to overflow to both wings - Generate 1175×500, with the purple→blue gradient falling only on the two characters "taking over"
- Run
check_cover.py --safe-zone --share-preview - Confirm that "taking over SaaS" is fully readable in the share preview
Coordination with other Skills in this repository
| Scenario | Go to |
|---|---|
| Need to come up with an article title | baokuan-title-generator |
| Need body images / charts | space-chart-image / space-text-logic-diagram |
| Need full-page layout | space-wechat-layout |
| Need a 3:4 Xiaohongshu cover | xhs-Skills/space-xhs-cover |
| Original definition of the visual system | xhs-Skills/space-xhs-image/references/visual-system.md |