返回 Skill 列表
extension
分类: 其它无需 API Key

XHS Cover Generator

生成带有中文文字叠加的小红书封面图片。适用于需要创建社交媒体封面、小红书帖子图片或RED帖子图片时。

person作者: huuuwnnn-droidhubclawhub

XHS Cover Generator

Generate publication-ready Xiaohongshu (小红书) cover images (1080×1440, 3:4 ratio) with Chinese text overlays.

How It Works

  1. Base image: Either AI-generated via Pollinations.ai (--base-prompt) or solid color background
  2. Text overlay: Chinese text rendered with Noto Sans CJK font via PIL (auto-downloaded on first run)
  3. Output: JPEG at 95% quality, ready to post

Styles

| Style | Use Case | Example | |-------|----------|---------| | split | A vs B comparisons | PUA式AI vs 暖心AI | | gradient | Single-topic posts | AI工具测评 | | card | Clean/minimal posts | 效率技巧分享 |

Usage

Run the generate script:

python3 scripts/generate.py \
  --title "主标题文字" \
  --subtitle "副标题" \
  --style split \
  --left-label "左侧标签" \
  --right-label "右侧标签" \
  --base-prompt "english prompt for AI base image" \
  --output cover.jpg

Parameters

  • --title (required): Main title text (Chinese OK)
  • --subtitle: Secondary text line
  • --tagline: Bottom tagline (split style only)
  • --style: split | gradient | card (default: gradient)
  • --left-label / --right-label: Labels for split style
  • --left-color / --right-color: R,G,B colors (default: red/green)
  • --base-prompt: English prompt for Pollinations.ai base image; if omitted, uses solid color
  • --width / --height: Dimensions (default: 1080×1440)
  • --output: Output path (default: cover.jpg)

Examples

Split comparison cover:

python3 scripts/generate.py \
  --title "同一个问题,两种AI的回答" \
  --subtitle "差距有多大?" \
  --tagline "一招设置反PUA人设" \
  --style split \
  --left-label "PUA式AI" --right-label "暖心AI" \
  --base-prompt "cute flat illustration, split screen, left pink sad robot, right green happy robot, kawaii pastel" \
  --output pua-vs-warm.jpg

Gradient tool review:

python3 scripts/generate.py \
  --title "2026最强AI编程助手" \
  --subtitle "Cursor vs Copilot vs Windsurf" \
  --style gradient \
  --base-prompt "futuristic code editor interface, purple blue gradient, clean minimal" \
  --output coding-tools.jpg

Card style tip:

python3 scripts/generate.py \
  --title "用AI写周报只需30秒" \
  --subtitle "打工人效率神器" \
  --style card \
  --left-color "70,130,255" \
  --output weekly-report.jpg

Requirements

  • Python 3 with Pillow (PIL)
  • curl for font download and Pollinations.ai
  • Internet access (first run downloads ~17MB CJK font, cached in /tmp)

Typical Workflow (for agents)

  1. Determine the post topic and style
  2. Craft an English prompt for the base image (descriptive, aesthetic keywords)
  3. Run generate.py with Chinese title/subtitle
  4. Send the resulting image to the user