Back to Marketing & Growth

baoyu-xhs-images

xiaohongshuinfographicscontent creationsocial media marketingvisual contentmarketing automationai generator
โญ 21.7k๐Ÿ•’ 2026-06-13Source โ†—

Install this skill

npx skills add jimliu/baoyu-skills

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

The baoyu-xhs-images agent automates the transformation of text-heavy content into visual infographic carousels tailored for the Xiaohongshu platform. It interprets your raw markdown or text, applying specific design aesthetics and structural layouts based on content signals. By selecting from predefined visual stylesโ€”ranging from minimalist 'notion' line art to 'chalkboard' educational motifsโ€”and adjusting informational density through layouts like 'dense' or 'flow', the agent produces a structured set of image files and supporting outlines. It generates a directory workspace containing individual image prompts, analytical breakdowns, and final image assets for every slide. This tool eliminates the need for manual graphic design by providing consistent, platform-optimized output from existing documents or direct text inputs.

When to Use This Skill

  • โ€ขConverting long-form AI tool tutorials into snackable 6-slide guides
  • โ€ขCreating educational carousels from raw meeting notes or project updates
  • โ€ขGenerating side-by-side comparison graphics for product reviews
  • โ€ขTranslating complex SaaS documentation into approachable knowledge cards

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • โ€œTurn this markdown file into a Xiaohongshu carousel
  • โ€œGenerate an infographic series for my article using the notion style
  • โ€œCreate a dense layout comparison graphic from this text
  • โ€œMake a chalkboard-style educational series for these teaching notes
  • โ€œProduce XHS images for this content with a minimal aesthetic

Pro Tips

  • ๐Ÿ’กExperiment with different `--style` and `--layout` combinations to find the perfect visual language for your specific content and target audience.
  • ๐Ÿ’กFor direct content input, ensure your text is well-structured with clear headings and concise paragraphs to optimize the infographic generation process.
  • ๐Ÿ’กUtilize the auto-select feature by omitting style and layout options initially, then refine with specific parameters if the auto-generated output isn't quite right.

What this skill does

  • โ€ขAutomatic style and layout selection based on semantic content analysis
  • โ€ขGeneration of multi-slide infographic content from markdown source files
  • โ€ขSupport for nine distinct visual styles including cute, pop, and minimal
  • โ€ขModular structural layouts to manage information density and order
  • โ€ขIndependent project directory creation with organized asset tracking

When not to use it

  • โœ•When you require complex, custom branding or unique vector assets outside predefined styles
  • โœ•When the input content is purely visual and lacks meaningful text for structure
  • โœ•When you need to perform significant manual edits inside a design application like Canva or Adobe

Example workflow

  1. Prepare your content in a local markdown file
  2. Invoke the agent with the desired style and layout flags
  3. Review the auto-generated analysis and outline files in the project folder
  4. Modify the generated prompt files if specific adjustments are needed
  5. Execute the final generation to produce PNG assets for each slide

Prerequisites

  • โ€“A local directory containing source text or markdown files
  • โ€“A configured ~/.baoyu-skills/baoyu-xhs-images/EXTEND.md file for custom preferences

Pitfalls & limitations

  • !Existing directory names can trigger conflict naming, creating clutter if not cleaned
  • !Automatic style selection may misinterpret the desired tone if the content is highly ambiguous
  • !Extremely long text files may require manual outlining for the best slide results

FAQ

Can I combine any style with any layout?
Yes, you can mix and match any combination of visual styles and informational layouts to suit your specific content requirements.
How does the tool handle file naming conflicts?
If a project directory already exists, the agent appends a timestamp to the folder name to prevent overwriting existing work.
Where can I view the specific definitions for styles and layouts?
Detailed descriptions are found in the references/styles/ and references/layouts/ directories within the repository.

How it compares

Unlike generic image generators that often produce inconsistent formatting, this agent creates a structured, slide-by-slide production pipeline with specific Xiaohongshu design language.

Source & trust

โญ 22k stars๐Ÿ•’ Updated 2026-06-13
๐Ÿ“„ Full skill instructions โ€” original source: jimliu/baoyu-skills
# Xiaohongshu Infographic Series Generator

Break down complex content into eye-catching infographic series for Xiaohongshu with multiple style options.

## Usage

# Auto-select style and layout based on content
/baoyu-xhs-images posts/ai-future/article.md

# Specify style
/baoyu-xhs-images posts/ai-future/article.md --style notion

# Specify layout
/baoyu-xhs-images posts/ai-future/article.md --layout dense

# Combine style and layout
/baoyu-xhs-images posts/ai-future/article.md --style notion --layout list

# Direct content input
/baoyu-xhs-images
[paste content]

# Direct input with options
/baoyu-xhs-images --style bold --layout comparison
[paste content]


## Options

| Option | Description |
|--------|-------------|
| --style <name> | Visual style (see Style Gallery) |
| --layout <name> | Information layout (see Layout Gallery) |

## Two Dimensions

| Dimension | Controls | Options |
|-----------|----------|---------|
| **Style** | Visual aesthetics: colors, lines, decorations | cute, fresh, warm, bold, minimal, retro, pop, notion, chalkboard |
| **Layout** | Information structure: density, arrangement | sparse, balanced, dense, list, comparison, flow |

Style ร— Layout can be freely combined. Example: --style notion --layout dense creates an intellectual-looking knowledge card with high information density.

## Style Gallery

| Style | Description |
|-------|-------------|
| cute (Default) | Sweet, adorable, girly - classic Xiaohongshu aesthetic |
| fresh | Clean, refreshing, natural |
| warm | Cozy, friendly, approachable |
| bold | High impact, attention-grabbing |
| minimal | Ultra-clean, sophisticated |
| retro | Vintage, nostalgic, trendy |
| pop | Vibrant, energetic, eye-catching |
| notion | Minimalist hand-drawn line art, intellectual |
| chalkboard | Colorful chalk on black board, educational |

Detailed style definitions: references/styles/<style>.md

## Layout Gallery

| Layout | Description |
|--------|-------------|
| sparse (Default) | Minimal information, maximum impact (1-2 points) |
| balanced | Standard content layout (3-4 points) |
| dense | High information density, knowledge card style (5-8 points) |
| list | Enumeration and ranking format (4-7 items) |
| comparison | Side-by-side contrast layout |
| flow | Process and timeline layout (3-6 steps) |

Detailed layout definitions: references/layouts/<layout>.md

## Auto Selection

| Content Signals | Style | Layout |
|-----------------|-------|--------|
| Beauty, fashion, cute, girl, pink | cute | sparse/balanced |
| Health, nature, clean, fresh, organic | fresh | balanced/flow |
| Life, story, emotion, feeling, warm | warm | balanced |
| Warning, important, must, critical | bold | list/comparison |
| Professional, business, elegant, simple | minimal | sparse/balanced |
| Classic, vintage, old, traditional | retro | balanced |
| Fun, exciting, wow, amazing | pop | sparse/list |
| Knowledge, concept, productivity, SaaS | notion | dense/list |
| Education, tutorial, learning, teaching, classroom | chalkboard | balanced/dense |

## File Structure

Each session creates an independent directory named by content slug:

xhs-images/{topic-slug}/
โ”œโ”€โ”€ source-{slug}.{ext} # Source files (text, images, etc.)
โ”œโ”€โ”€ analysis.md # Deep analysis results
โ”œโ”€โ”€ outline-style-[slug].md # Variant A (e.g., outline-style-notion.md)
โ”œโ”€โ”€ outline-style-[slug].md # Variant B (e.g., outline-style-notion.md)
โ”œโ”€โ”€ outline-style-[slug].md # Variant C (e.g., outline-style-minimal.md)
โ”œโ”€โ”€ outline.md # Final selected
โ”œโ”€โ”€ prompts/
โ”‚ โ”œโ”€โ”€ 01-cover-[slug].md
โ”‚ โ”œโ”€โ”€ 02-content-[slug].md
โ”‚ โ””โ”€โ”€ ...
โ”œโ”€โ”€ 01-cover-[slug].png
โ”œโ”€โ”€ 02-content-[slug].png
โ””โ”€โ”€ NN-ending-[slug].png


**Slug Generation**:
1. Extract main topic from content (2-4 words, kebab-case)
2. Example: "AIๅทฅๅ…ทๆŽจ่" โ†’ ai-tools-recommend

**Conflict Resolution**:
If xhs-images/{topic-slug}/ already exists:
- Append timestamp: {topic-slug}-YYYYMMDD-HHMMSS
- Example: ai-tools exists โ†’ ai-tools-20260118-143052

**Source Files**:
Copy all sources with naming source-{slug}.{ext}:
- source-article.md, source-photo.jpg, etc.
- Multiple sources supported: text, images, files from conversation

## Workflow

### Step 0: Check Preferences

**Check paths** (priority order):
1. .baoyu-skills/baoyu-xhs-images/EXTEND.md (project)
2. ~/.baoyu-skills/baoyu-xhs-images/EXTEND.md (user)

**If preferences found**:
1. Parse YAML frontmatter
2. Display current preferences summary:
Loaded preferences from [path]:
- Watermark: [enabled/disabled] "[content]" at [position]
- Style: [name] - [description]
- Layout: [layout]
- Language: [lang]

3. Continue to Step 1

**If NO preferences found**:
1. Ask user with AskUserQuestion (see references/first-time-setup.md)
2. Create EXTEND.md with user choices
3. Continue to Step 1

Schema reference: references/preferences-schema.md

### Step 1: Analyze Content โ†’ analysis.md

Read source content, save it if needed, and perform deep analysis.

**Actions**:
1. **Save source content** (if not already a file):
- If user provides a file path: use as-is
- If user pastes content: save to source.md in target directory
2. Read source content
3. **Deep analysis** following references/analysis-framework.md:
- Content type classification (็ง่‰/ๅนฒ่ดง/ๆต‹่ฏ„/ๆ•™็จ‹/้ฟๅ‘...)
- Hook analysis (็ˆ†ๆฌพๆ ‡้ข˜ๆฝœๅŠ›)
- Target audience identification
- Engagement potential (ๆ”ถ่—/ๅˆ†ไบซ/่ฏ„่ฎบ)
- Visual opportunity mapping
- Swipe flow design
4. Detect source language
5. Determine recommended image count (2-10)
6. Select 3 style+layout combinations
7. **Save to analysis.md**

### Step 2: Generate 3 Outline Variants

Based on analysis, create three distinct style variants.

**For each variant**:
1. **Generate outline** (outline-style-[slug].md):
- YAML front matter with style, layout, image_count
- Cover design with hook
- Each image: layout, core message, text content, visual concept
- **Written in user's preferred language**
- Reference: references/outline-template.md

| Variant | Selection Logic | Example Filename |
|---------|-----------------|------------------|
| A | Primary recommendation | outline-style-notion.md |
| B | Alternative style | outline-style-notion.md |
| C | Different audience/mood | outline-style-minimal.md |

**All variants are preserved after selection for reference.**

### Step 3: User Confirms All Options

**IMPORTANT**: Present ALL options in a single confirmation step using AskUserQuestion. Do NOT interrupt workflow with multiple separate confirmations.

**Prioritize user preferences** (from Step 0):
- If user has preferred_style: Show as first option with "(Your preference)"
- If user has preferred_layout: Show as first option with "(Your preference)"

**Determine which questions to ask**:

| Question | When to Ask |
|----------|-------------|
| Style variant | Always (required) |
| Default layout | Only if user might want to override |
| Language | Only if source_language โ‰  user_language |

**Language handling**:
- If source language = user language: Just inform user (e.g., "Images will be in Chinese")
- If different: Ask which language to use

**AskUserQuestion format**:

Question 1 (Style): Which style variant?
- User preference: notion + dense (Your preference) - ๆ‚จ็š„้ป˜่ฎค่ฎพ็ฝฎ
- A: notion + list - AIๆŽจ่: ๆธ…็ˆฝ็Ÿฅ่ฏ†ๅก็‰‡
- B: minimal + balanced - AIๆŽจ่: ็ฎ€็บฆ้ซ˜็ซฏ้ฃŽๆ ผ
- Custom: ่‡ชๅฎšไน‰้ฃŽๆ ผๆ่ฟฐ

Question 2 (Layout) - only if relevant:
- Your preference: dense (Your preference)
- Keep variant default (Recommended)
- sparse / balanced / list / comparison / flow

Question 3 (Language) - only if mismatch:
- ไธญๆ–‡ (ๅŒน้…ๅŽŸๆ–‡)
- English (your preference)


**After confirmation**:
1. Copy selected outline-style-[slug].md โ†’ outline.md
2. Update YAML front matter with confirmed options
3. If custom style: regenerate outline with that style
4. User may edit outline.md directly for fine-tuning

### Step 4: Generate Images

With confirmed outline + style + layout:

**For each image (cover + content + ending)**:
1. Save prompt to prompts/NN-{type}-[slug].md (in user's preferred language)
2. Generate image using confirmed style and layout
3. Report progress after each generation

**Watermark Application** (if enabled in preferences):
Add to each image generation prompt:
Include a subtle watermark "[content]" positioned at [position]
with approximately [opacity*100]% visibility. The watermark should
be legible but not distracting from the main content.

Reference: references/watermark-guide.md

**Image Generation Skill Selection**:
- Check available image generation skills
- If multiple skills available, ask user preference

**Session Management**:
If image generation skill supports --sessionId:
1. Generate unique session ID: xhs-{topic-slug}-{timestamp}
2. Use same session ID for all images
3. Ensures visual consistency across generated images

### Step 5: Completion Report

Xiaohongshu Infographic Series Complete!

Topic: [topic]
Style: [style name]
Layout: [layout name or "varies"]
Location: [directory path]
Images: N total

โœ“ analysis.md
โœ“ outline-style-notion.md
โœ“ outline-style-chalkboard.md
โœ“ outline-style-minimal.md
โœ“ outline.md (selected: notion + dense)

Files:
- 01-cover-[slug].png โœ“ Cover (sparse)
- 02-content-[slug].png โœ“ Content (balanced)
- 03-content-[slug].png โœ“ Content (dense)
- 04-ending-[slug].png โœ“ Ending (sparse)


## Image Modification

### Edit Single Image

1. Identify image to edit (e.g., 03-content-chatgpt.png)
2. Update prompt in prompts/03-content-chatgpt.md if needed
3. Regenerate image using same session ID

### Add New Image

1. Specify insertion position (e.g., after image 3)
2. Create new prompt with appropriate slug
3. Generate new image
4. **Renumber files**: All subsequent images increment NN by 1
5. Update outline.md with new image entry

### Delete Image

1. Remove image file and prompt file
2. **Renumber files**: All subsequent images decrement NN by 1
3. Update outline.md to remove image entry

## Content Breakdown Principles

1. **Cover (Image 1)**: Hook + visual impact โ†’ sparse layout
2. **Content (Middle)**: Core value per image โ†’ balanced/dense/list/comparison/flow
3. **Ending (Last)**: CTA / summary โ†’ sparse or balanced

**Style ร— Layout Matrix** (โœ“โœ“ = highly recommended, โœ“ = works well):

| | sparse | balanced | dense | list | comparison | flow |
|---|:---:|:---:|:---:|:---:|:---:|:---:|
| cute | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“โœ“ | โœ“ | โœ“ |
| fresh | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“ | โœ“ | โœ“โœ“ |
| warm | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“ | โœ“โœ“ | โœ“ |
| bold | โœ“โœ“ | โœ“ | โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“ |
| minimal | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“ | โœ“ |
| retro | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“โœ“ | โœ“ | โœ“ |
| pop | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“ |
| notion | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ |
| chalkboard | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“โœ“ | โœ“ | โœ“โœ“ |

## References

Detailed templates and guidelines in references/ directory:
- analysis-framework.md - XHS-specific content analysis
- outline-template.md - Outline format and examples
- styles/<style>.md - Detailed style definitions
- layouts/<layout>.md - Detailed layout definitions
- base-prompt.md - Base prompt template
- preferences-schema.md - EXTEND.md YAML schema
- watermark-guide.md - Watermark configuration guide
- first-time-setup.md - First-time setup flow

## Notes

- Image generation typically takes 10-30 seconds per image
- Auto-retry once on generation failure
- Use cartoon alternatives for sensitive public figures
- All prompts and text use confirmed language preference
- Maintain style consistency across all images in series

## Extension Support

Custom styles and configurations via EXTEND.md.

**Check paths** (priority order):
1. .baoyu-skills/baoyu-xhs-images/EXTEND.md (project)
2. ~/.baoyu-skills/baoyu-xhs-images/EXTEND.md (user)

If found, load in Step 0. Extension content overrides defaults.

**Supported preferences**:
- Watermark settings (content, position, opacity)
- Preferred style with custom description
- Preferred layout
- Custom style definitions

**Schema**: references/preferences-schema.md
**First-time setup**: references/first-time-setup.md

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/baoyu-xhs-images/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/jimliu/baoyu-skills/baoyu-xhs-images/SKILL.md
  • Cursor: ~/.cursor/skills/jimliu/baoyu-skills/baoyu-xhs-images/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/jimliu/baoyu-skills/baoyu-xhs-images/SKILL.md

๐Ÿš€ Install with CLI:
npx skills add jimliu/baoyu-skills

Read the Master Guide: Mastering Agent Skills โ†’

Recommended Rules

View more rules โ†’

Recommended Workflows

View more workflows โ†’

Recommended MCP Servers

View more MCP servers โ†’

Take It Further

Maximize your productivity with these powerful resources

๐Ÿ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
๐Ÿ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid marketing & growth issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Marketing & Growth and is published by Jim Liu, maintained in jimliu/baoyu-skills.

โ† Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.