baoyu-xhs-images
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-xhs-images
Agent 安装分布
Skill 文档
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, study-notes |
| Layout | Information structure: density, arrangement | sparse, balanced, dense, list, comparison, flow, mindmap, quadrant |
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 |
study-notes |
Realistic handwritten photo style, blue pen + red annotations + yellow highlighter |
Detailed style definitions: references/presets/<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) |
mindmap |
Center radial mind map layout (4-8 branches) |
quadrant |
Four-quadrant / circular section layout |
Detailed layout definitions: references/elements/canvas.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 |
| Notes, handwritten, study guide, knowledge, realistic, photo | study-notes |
dense/list/mindmap |
Outline Strategies
Three differentiated outline strategies for different content goals:
Strategy A: Story-Driven (æ äºé©±å¨å)
| Aspect | Description |
|---|---|
| Concept | Personal experience as main thread, emotional resonance first |
| Features | Start from pain point, show before/after change, strong authenticity |
| Best for | Reviews, personal shares, transformation stories |
| Structure | Hook â Problem â Discovery â Experience â Conclusion |
Strategy B: Information-Dense (ä¿¡æ¯å¯éå)
| Aspect | Description |
|---|---|
| Concept | Value-first, efficient information delivery |
| Features | Clear structure, explicit points, professional credibility |
| Best for | Tutorials, comparisons, product reviews, checklists |
| Structure | Core conclusion â Info card â Pros/Cons â Recommendation |
Strategy C: Visual-First (è§è§ä¼å å)
| Aspect | Description |
|---|---|
| Concept | Visual impact as core, minimal text |
| Features | Large images, atmospheric, instant appeal |
| Best for | High-aesthetic products, lifestyle, mood-based content |
| Structure | Hero image â Detail shots â Lifestyle scene â CTA |
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 + questions asked
âââ outline-strategy-a.md # Strategy A: Story-driven
âââ outline-strategy-b.md # Strategy B: Information-dense
âââ outline-strategy-c.md # Strategy C: Visual-first
âââ outline.md # Final selected/merged outline
âââ prompts/
â âââ 01-cover-[slug].md
â âââ 02-content-[slug].md
â âââ ...
âââ 01-cover-[slug].png
âââ 02-content-[slug].png
âââ NN-ending-[slug].png
Slug Generation:
- Extract main topic from content (2-4 words, kebab-case)
- Example: “AIå·¥å
·æ¨è” â
ai-tools-recommend
Conflict Resolution:
If xhs-images/{topic-slug}/ already exists:
- Append timestamp:
{topic-slug}-YYYYMMDD-HHMMSS - Example:
ai-toolsexists â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
Progress Checklist
Copy and track progress:
XHS Infographic Progress:
- [ ] Step 0: Check preferences (EXTEND.md) â BLOCKING
- [ ] Found â load preferences â continue
- [ ] Not found â run first-time setup â MUST complete before Step 1
- [ ] Step 1: Analyze content â analysis.md
- [ ] Step 2: Confirmation 1 - Content understanding â ï¸ REQUIRED
- [ ] Step 3: Generate 3 outline + style variants
- [ ] Step 4: Confirmation 2 - Outline & style & elements selection â ï¸ REQUIRED
- [ ] Step 5: Generate images (sequential)
- [ ] Step 6: Completion report
Flow
Input â [Step 0: Preferences] ââ¬â Found â Continue
â
ââ Not found â First-Time Setup â BLOCKING
â
ââ Complete setup â Save EXTEND.md â Continue
â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
Analyze â [Confirm 1] â 3 Outlines â [Confirm 2: Outline + Style + Elements] â Generate â Complete
Step 0: Load Preferences (EXTEND.md) â BLOCKING
Purpose: Load user preferences or run first-time setup.
CRITICAL: If EXTEND.md not found, MUST complete first-time setup before ANY other questions or steps. Do NOT proceed to content analysis, do NOT ask about style, do NOT ask about layout â ONLY complete the preferences setup first.
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .baoyu-skills/baoyu-xhs-images/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-xhs-images/EXTEND.md" && echo "user"
ââââââââââââââââââââââââââââââââââââââââââââââââââââââ¬ââââââââââââââââââââ â Path â Location â ââââââââââââââââââââââââââââââââââââââââââââââââââââââ¼âââââââââââââââââââ⤠â .baoyu-skills/baoyu-xhs-images/EXTEND.md â Project directory â ââââââââââââââââââââââââââââââââââââââââââââââââââââââ¼âââââââââââââââââââ⤠â $HOME/.baoyu-skills/baoyu-xhs-images/EXTEND.md â User home â ââââââââââââââââââââââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââ
âââââââââââââ¬ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Result â Action â âââââââââââââ¼âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⤠â Found â Read, parse, display summary â Continue to Step 1 â âââââââââââââ¼âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⤠â Not found â â BLOCKING: Run first-time setup ONLY (see below) â Complete and save EXTEND.md â Then Step 1 â âââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
First-Time Setup (when EXTEND.md not found):
Language: Use user’s input language or saved language preference.
Use AskUserQuestion with ALL questions in ONE call. See references/config/first-time-setup.md for question details.
EXTEND.md Supports: Watermark | Preferred style/layout | Custom style definitions | Language preference
Schema: references/config/preferences-schema.md
Step 1: Analyze Content â analysis.md
Read source content, save it if needed, and perform deep analysis.
Actions:
- Save source content (if not already a file):
- If user provides a file path: use as-is
- If user pastes content: save to
source.mdin target directory - Backup rule: If
source.mdexists, rename tosource-backup-YYYYMMDD-HHMMSS.md
- Read source content
- Deep analysis following
references/workflows/analysis-framework.md:- Content type classification (ç§è/干货/æµè¯/æç¨/é¿å…)
- Hook analysis (çæ¬¾æ 颿½å)
- Target audience identification
- Engagement potential (æ¶è/å享/è¯è®º)
- Visual opportunity mapping
- Swipe flow design
- Detect source language
- Determine recommended image count (2-10)
- Generate clarifying questions (see Step 2)
- Save to
analysis.md
Step 2: Confirmation 1 – Content Understanding â ï¸
Purpose: Validate understanding + collect missing info. Do NOT skip.
Display summary:
- Content type + topic identified
- Key points extracted
- Tone detected
- Source images count
Use AskUserQuestion for:
- Core selling point (multiSelect: true)
- Target audience
- Style preference: Authentic sharing / Professional review / Aesthetic mood / Auto
- Additional context (optional)
After response: Update analysis.md â Step 3
Step 3: Generate 3 Outline + Style Variants
Based on analysis + user context, create three distinct strategy variants. Each variant includes both outline structure and visual style recommendation.
For each strategy:
| Strategy | Filename | Outline | Recommended Style |
|---|---|---|---|
| A | outline-strategy-a.md |
Story-driven: emotional, before/after | warm, cute, fresh |
| B | outline-strategy-b.md |
Information-dense: structured, factual | notion, minimal, chalkboard |
| C | outline-strategy-c.md |
Visual-first: atmospheric, minimal text | bold, pop, retro |
Outline format (YAML front matter + content):
---
strategy: a # a, b, or c
name: Story-Driven
style: warm # recommended style for this strategy
style_reason: "Warm tones enhance emotional storytelling and personal connection"
elements: # from style preset, can be customized in Step 4
background: solid-pastel
decorations: [clouds, stars-sparkles]
emphasis: star-burst
typography: highlight
layout: balanced # primary layout
image_count: 5
---
## P1 Cover
**Type**: cover
**Hook**: "å
¥å¬åè¸ä¸å¹²äºð¥¹ç»äºæ¾å°å¯¹çé¢é"
**Visual**: Product hero shot with cozy winter atmosphere
**Layout**: sparse
## P2 Problem
**Type**: pain-point
**Message**: Previous struggles with dry skin
**Visual**: Before state, relatable scenario
**Layout**: balanced
...
Differentiation requirements:
- Each strategy MUST have different outline structure AND different recommended style
- Adapt page count: A typically 4-6, B typically 3-5, C typically 3-4
- Include
style_reasonexplaining why this style fits the strategy - Consider user’s style preference from Step 2
Reference: references/workflows/outline-template.md
Step 4: Confirmation 2 – Outline & Style & Elements Selection â ï¸
Purpose: User chooses outline strategy, confirms visual style, and customizes elements. Do NOT skip.
Display each strategy:
- Strategy name + page count + recommended style
- Page-by-page summary (P1 â P2 â P3…)
Use AskUserQuestion with three questions:
Question 1: Outline Strategy
- Strategy A (Recommended if “authentic sharing”)
- Strategy B (Recommended if “professional review”)
- Strategy C (Recommended if “aesthetic mood”)
- Combine: specify pages from each
Question 2: Visual Style
- Use strategy’s recommended style (show which style)
- Or select from: cute / fresh / warm / bold / minimal / retro / pop / notion / chalkboard
- Or type custom style description
Question 3: Visual Elements (show after style selection) Display the selected style’s default elements from preset, then ask:
- Use style defaults (Recommended) – show preview: background, decorations, emphasis
- Adjust background – options: solid-pastel / solid-saturated / gradient-linear / gradient-radial / paper-texture / grid
- Adjust decorations – options: hearts / stars-sparkles / flowers / clouds / leaves / confetti
- Type custom element preferences
After response:
- Single strategy â copy to
outline.mdwith confirmed style - Combination â merge specified pages with confirmed style
- Custom request â regenerate based on feedback
- Style defaults â use preset’s Element Combination as-is
- Background adjustment â update elements.background with user choice
- Decorations adjustment â update elements.decorations with user choice
- Custom elements â parse user’s preferences into elements fields
- Update
outline.mdfrontmatter with final style and elements
Step 5: Generate Images
With confirmed outline + style + layout:
For each image (cover + content + ending):
- Save prompt to
prompts/NN-{type}-[slug].md(in user’s preferred language)- Backup rule: If prompt file exists, rename to
prompts/NN-{type}-[slug]-backup-YYYYMMDD-HHMMSS.md
- Backup rule: If prompt file exists, rename to
- Generate image using confirmed style and layout
- Backup rule: If image file exists, rename to
NN-{type}-[slug]-backup-YYYYMMDD-HHMMSS.png
- Backup rule: If image file exists, rename to
- 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].
The watermark should be legible but not distracting from the main content.
Reference: references/config/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:
- Generate unique session ID:
xhs-{topic-slug}-{timestamp} - Use same session ID for all images
- Ensures visual consistency across generated images
Step 6: Completion Report
Xiaohongshu Infographic Series Complete!
Topic: [topic]
Strategy: [A/B/C/Combined]
Style: [style name]
Layout: [layout name or "varies"]
Location: [directory path]
Images: N total
â analysis.md
â outline-strategy-a.md
â outline-strategy-b.md
â outline-strategy-c.md
â outline.md (selected: [strategy])
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
| Action | Steps |
|---|---|
| Edit | Update prompt file FIRST â Regenerate with same session ID |
| Add | Specify position â Create prompt â Generate â Renumber subsequent files (NN+1) â Update outline |
| Delete | Remove files â Renumber subsequent (NN-1) â Update outline |
IMPORTANT: When updating images, ALWAYS update the prompt file (prompts/NN-{type}-[slug].md) FIRST before regenerating. This ensures changes are documented and reproducible.
Content Breakdown Principles
- Cover (Image 1): Hook + visual impact â
sparselayout - Content (Middle): Core value per image â
balanced/dense/list/comparison/flow - Ending (Last): CTA / summary â
sparseorbalanced
Style à Layout Matrix (ââ = highly recommended, â = works well):
| sparse | balanced | dense | list | comparison | flow | mindmap | quadrant | |
|---|---|---|---|---|---|---|---|---|
| cute | ââ | ââ | â | ââ | â | â | â | â |
| fresh | ââ | ââ | â | â | â | ââ | â | â |
| warm | ââ | ââ | â | â | ââ | â | â | â |
| bold | ââ | â | â | ââ | ââ | â | â | ââ |
| minimal | ââ | ââ | ââ | â | â | â | â | â |
| retro | ââ | ââ | â | ââ | â | â | â | â |
| pop | ââ | ââ | â | ââ | ââ | â | â | â |
| notion | ââ | ââ | ââ | ââ | ââ | ââ | ââ | ââ |
| chalkboard | ââ | ââ | ââ | ââ | â | ââ | ââ | â |
| study-notes | â | â | ââ | ââ | â | â | ââ | â |
References
Detailed templates in references/ directory:
Elements (Visual building blocks):
elements/canvas.md– Aspect ratios, safe zones, grid layoutselements/image-effects.md– Cutout, stroke, filterselements/typography.md– Decorated text (è±å), tags, text directionelements/decorations.md– Emphasis marks, backgrounds, doodles, frames
Presets (Style presets):
presets/<name>.md– Element combination definitions (cute, notion, warm…)
Workflows (Process guides):
workflows/analysis-framework.md– Content analysis frameworkworkflows/outline-template.md– Outline template with layout guideworkflows/prompt-assembly.md– Prompt assembly guide
Config (Settings):
config/preferences-schema.md– EXTEND.md schemaconfig/first-time-setup.md– First-time setup flowconfig/watermark-guide.md– Watermark configuration
Notes
- Auto-retry once on failure | Cartoon alternatives for sensitive figures
- Use confirmed language preference | Maintain style consistency
- Two confirmation points required (Steps 2 & 4) – do not skip
Extension Support
Custom configurations via EXTEND.md. See Step 0 for paths and supported options.