pw-redbook-image

Original🇨🇳 Chinese
Translated

Break down article content into Xiaohongshu-style series of images. Support generating cover images, content images, and ending images from URLs, files, or text, automatically create prompts and call image generation tools.

30installs
Added on

NPX Install

npx skill4agent add plugins-world/pw-skills pw-redbook-image

SKILL.md Content (Chinese)

View Translation Comparison →

Xiaohongshu-Style Image Generation

Intelligently break down article content into Xiaohongshu-style series of images, including cover images, content images, and ending images.

Core Features

  • Intelligently break down articles into multiple images (2-10 images)
  • Automatically generate image prompts that match Xiaohongshu style
  • Support multiple input sources (URL, file path, text content)
  • Automatically create structured working directories
  • Support post-processing (merge into long image, PPT, PDF)

Usage Scenarios

When users explicitly request Xiaohongshu-style image generation:
  • "Generate Xiaohongshu images"
  • "Create Xiaohongshu series images"
  • "Turn this article into Xiaohongshu images"
  • "Help me make Xiaohongshu-style graphics and text"
Unsuitable scenarios:
  • Users only ask how to create (provide suggestions only)
  • Users need a single cover image (use pw-cover-image)
  • Users need images in other styles (use general image generation tools)

Usage Methods

bash
# Generate from URL
/pw-redbook-image https://example.com/article

# Generate from text content
/pw-redbook-image "Article content..."

# Generate from markdown file
/pw-redbook-image path/to/article.md

Parameter Description

  • Input Source (Required): Supports three formats
    • URL: Web address starting with http:// or https://
    • File path: Relative or absolute path, supports text files like .md, .txt
    • Text content: Directly passed article content string

Xiaohongshu Style Characteristics

  • Ratio: Vertical (3:4 or 9:16)
  • Style: Cartoon style, hand-drawn style
  • Color Scheme: Morandi colors, cream white, off-white, light pink, mint green
  • Text: Hand-drawn style text, prominent large titles, highlighted with highlighter lines
  • Decorations: Cartoon elements, emoji icons, hand-drawn stickers, speech bubbles
  • Layout: Streamlined information, ample white space, key points presented in bullet points

Content Breakdown Principles

  • Cover Image: Strong visual impact, includes core title
  • Content Image: Each focuses on 1 core viewpoint
  • Ending Image: Summary/call to action/golden quote
Image Quantity:
  • Simple viewpoints: 2-3 images
  • Medium complexity: 4-6 images
  • In-depth content: 7-10 images

File Management

Output Directory

Each session creates an independent directory named after the topic:
redbook-{topic-slug}/
├── source.md              # Source article
├── prompts/               # Prompt files
│   ├── 01_封面图.md
│   ├── 02_内容图_核心观点1.md
│   ├── 03_内容图_核心观点2.md
│   └── 04_结尾图.md
└── images/                # Generated images
    ├── 01_封面图.png
    ├── 02_内容图_核心观点1.png
    ├── 03_内容图_核心观点2.png
    └── 04_结尾图.png
Topic Naming Rules:
  1. Extract topic from article title/content (2-4 words, kebab-case)
  2. Example: "如何提升工作效率" →
    improve-work-efficiency

Conflict Resolution

If
redbook-{topic-slug}/
already exists:
  • Append timestamp:
    {topic-slug}-YYYYMMDD-HHMMSS
  • Example:
    improve-work-efficiency
    already exists →
    improve-work-efficiency-20260123-143052

Source Files

Save source article using
source.md
or
source-{original filename}
.

Workflow

Step 1: Obtain Article Content

Process input sources:
  • URL: Use WebFetch to crawl webpage content
  • File path: Use Read to read file content
  • Text: Directly use the passed content
Save source content:
  • Create working directory
    redbook-{topic-slug}/
  • Save source file to
    source.md
    or
    source-{original filename}

Step 2: Analyze and Break Down Article

Use
${SKILL_DIR}/references/文章拆解模板.md
to analyze the article:
  • Extract topic and core viewpoints
  • Determine image quantity (2-10 images)
  • Generate breakdown plan, clarify core content of each image
Image quantity suggestions:
  • Simple viewpoints: 2-3 images
  • Medium complexity: 4-6 images
  • In-depth content: 7-10 images

Step 3: Generate Prompt Files

Create
redbook-{topic-slug}/prompts/
directory, select template based on image type:
  • Cover image:
    ${SKILL_DIR}/references/封面图模板.md
  • Content image:
    ${SKILL_DIR}/references/内容图模板.md
  • Ending image:
    ${SKILL_DIR}/references/结尾图模板.md
Generate independent prompt files for each image:
  • Naming format:
    01_封面图.md
    ,
    02_内容图_关键词.md
    ,
    03_结尾图.md
  • Prompts use English, avoid Markdown format
  • Include style keywords and color schemes

Step 4: Generate Images

Check available image generation skills:
  • Prioritize using pw-danger-gemini-web
  • If multiple skills are available, ask user to choose
Generate images one by one:
  • Output directory:
    redbook-{topic-slug}/images/
  • Display generation progress
  • Images sorted by serial number
  • After generating the first image, confirm style before batch generating the rest

Step 5: Post-Processing (Optional)

Merge into long image (requires ImageMagick):
bash
brew install imagemagick
node ~/.claude/skills/pw-image-generation/scripts/merge-to-long-image.js \
  redbook-{topic-slug}/images \
  redbook-{topic-slug}/长图.png
Merge into PPT:
bash
node ~/.claude/skills/pw-image-generation/scripts/merge-to-pptx.js \
  redbook-{topic-slug}/images \
  redbook-{topic-slug}/配图.pptx
Merge into PDF:
bash
node ~/.claude/skills/pw-image-generation/scripts/merge-to-pdf.js \
  redbook-{topic-slug}/images \
  redbook-{topic-slug}/配图.pdf

Step 6: Output Summary

After generation is complete, output:
Xiaohongshu series images generated!

Topic: [Topic]
Number of images: [Quantity] images
Working directory: redbook-{topic-slug}/

Next steps:
- Preview all images to confirm style consistency
- If needed, use merge tools to generate long image, PPT or PDF

Best Practices

Style Consistency:
  • Confirm style after generating the first image, then batch generate the rest
  • Use the same style keywords and color scheme for all images
  • Uniformly place author information at the bottom right corner, keep format consistent
Content Design:
  • Each image focuses on one core viewpoint, avoid overloading content
  • Ample white space to improve readability
  • Titles should be large and prominent, highlight keywords with highlighter lines
Prompt Optimization:
  • Use English prompts for better results
  • Avoid Markdown format, use plain text description
  • Clearly specify ratio (3:4 or 9:16), style (cartoon/hand-drawn), color scheme (Morandi colors)

Common Issues

Issue: Generated images have inconsistent styles Solution: Clearly specify the same style keywords in prompts, such as "cartoon style, hand-drawn, pastel colors"
Issue: Too much content in images, not concise enough Solution: Reduce text amount per image, split into more images, each focusing on one viewpoint
Issue: URL crawling failed Solution: Check if the URL is accessible, or directly copy article content as text input
Issue: Directory already exists Solution: Automatically append timestamp, e.g.,
improve-work-efficiency
exists →
improve-work-efficiency-20260123-143052
Issue: Image generation failed Solution: Check if image generation skills are available, confirm API configuration is correct

Template References

Template FilePurposeLocation
文章拆解模板.mdAnalysis template for breaking down articles into series images
${SKILL_DIR}/references/
封面图模板.mdPrompt generation template for cover images
${SKILL_DIR}/references/
内容图模板.mdPrompt generation template for content images
${SKILL_DIR}/references/
结尾图模板.mdPrompt generation template for ending images
${SKILL_DIR}/references/

Extended Configuration

Support custom configuration via EXTEND.md, check paths (priority order):
  1. .pw-skills/pw-redbook-image/EXTEND.md
    (project-level)
  2. ~/.pw-skills/pw-redbook-image/EXTEND.md
    (user-level)
If found, load before workflow. Extended content will override default values.
Customizable content:
  • Default image quantity range
  • Style keywords and color schemes
  • Author information format
  • Output directory naming rules