Compare commits

...

4 Commits

Author SHA1 Message Date
Jim Liu 宝玉 688d1760ed chore: release v0.8.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 16:44:50 -06:00
Jim Liu 宝玉 a701be873b update Image Generation Guidelines 2026-01-17 16:24:23 -06:00
Jim Liu 宝玉 1df5e4974d feat: add analysis framework for Xiaohongshu content 2026-01-17 15:52:00 -06:00
Jim Liu 宝玉 2677e730b9 Update release-skills to update readme 2026-01-17 15:11:50 -06:00
14 changed files with 817 additions and 277 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
}, },
"metadata": { "metadata": {
"description": "Skills shared by Baoyu for improving daily work efficiency", "description": "Skills shared by Baoyu for improving daily work efficiency",
"version": "0.7.0" "version": "0.8.0"
}, },
"plugins": [ "plugins": [
{ {
+27 -5
View File
@@ -58,7 +58,24 @@ Default behavior:
- If changes include `feat:` or new skills → Minor bump - If changes include `feat:` or new skills → Minor bump
- Otherwise → Patch bump - Otherwise → Patch bump
### Step 3: Update Changelogs ### Step 3: Check and Update README
Before updating changelogs, check if README files need updates based on changes:
**When to update README**:
- New skills added → Add to skill list
- Skills removed → Remove from skill list
- Skill renamed → Update references
- New features affecting usage → Update usage section
- Breaking changes → Update migration notes
**Files to sync**:
- `README.md` (English)
- `README.zh.md` (Chinese)
If changes include new skills or significant feature changes, update both README files to reflect the new capabilities. Keep both files in sync with the same structure and information.
### Step 4: Update Changelogs
Files to update: Files to update:
- `CHANGELOG.md` (English) - `CHANGELOG.md` (English)
@@ -86,7 +103,7 @@ Only include sections that have changes. Omit empty sections.
For Chinese changelog, translate the content maintaining the same structure. For Chinese changelog, translate the content maintaining the same structure.
### Step 4: Update marketplace.json ### Step 5: Update marketplace.json
Update `.claude-plugin/marketplace.json`: Update `.claude-plugin/marketplace.json`:
```json ```json
@@ -97,14 +114,14 @@ Update `.claude-plugin/marketplace.json`:
} }
``` ```
### Step 5: Commit Changes ### Step 6: Commit Changes
```bash ```bash
git add CHANGELOG.md CHANGELOG.zh.md .claude-plugin/marketplace.json git add README.md README.zh.md CHANGELOG.md CHANGELOG.zh.md .claude-plugin/marketplace.json
git commit -m "chore: release v{NEW_VERSION}" git commit -m "chore: release v{NEW_VERSION}"
``` ```
### Step 6: Create Version Tag ### Step 7: Create Version Tag
```bash ```bash
git tag v{NEW_VERSION} git tag v{NEW_VERSION}
@@ -150,7 +167,12 @@ Changelog preview (EN):
### Fixes ### Fixes
- `baoyu-bar`: fixed timeout issue - `baoyu-bar`: fixed timeout issue
README updates needed: Yes/No
(If yes, show proposed changes)
Files to modify: Files to modify:
- README.md (if updates needed)
- README.zh.md (if updates needed)
- CHANGELOG.md - CHANGELOG.md
- CHANGELOG.zh.md - CHANGELOG.zh.md
- .claude-plugin/marketplace.json - .claude-plugin/marketplace.json
+10
View File
@@ -2,6 +2,16 @@
English | [中文](./CHANGELOG.zh.md) English | [中文](./CHANGELOG.zh.md)
## 0.8.0 - 2026-01-17
### Features
- `baoyu-xhs-images`: adds content analysis framework (`analysis-framework.md`, `outline-template.md`) for structured content breakdown and outline generation.
### Documentation
- `CLAUDE.md`: adds Output Path Convention (directory structure, backup rules) and Image Naming Convention (format, slug rules) to standardize image generation outputs.
- Multiple skills: updates file management conventions to use unified directory structure (`[source-name-no-ext]/<skill-suffix>/`).
- `baoyu-article-illustrator`, `baoyu-comic`, `baoyu-cover-image`, `baoyu-slide-deck`, `baoyu-xhs-images`
## 0.7.0 - 2026-01-17 ## 0.7.0 - 2026-01-17
### Features ### Features
+10
View File
@@ -2,6 +2,16 @@
[English](./CHANGELOG.md) | 中文 [English](./CHANGELOG.md) | 中文
## 0.8.0 - 2026-01-17
### 新功能
- `baoyu-xhs-images`:新增内容分析框架(`analysis-framework.md``outline-template.md`),提供结构化内容拆解与大纲生成方案。
### 文档
- `CLAUDE.md`:新增 Output Path Convention(目录结构、备份规则)和 Image Naming Convention(文件命名格式、slug 规则),统一图片生成输出规范。
- 多个技能:更新文件管理规范,采用统一目录结构(`[source-name-no-ext]/<skill-suffix>/`)。
- `baoyu-article-illustrator``baoyu-comic``baoyu-cover-image``baoyu-slide-deck``baoyu-xhs-images`
## 0.7.0 - 2026-01-17 ## 0.7.0 - 2026-01-17
### 新功能 ### 新功能
+86
View File
@@ -102,3 +102,89 @@ When referencing scripts in workflow sections, use `${SKILL_DIR}/scripts/<name>.
- Async/await patterns - Async/await patterns
- Short variable names - Short variable names
- Type-safe interfaces - Type-safe interfaces
## Image Generation Guidelines
Skills that require image generation MUST delegate to available image generation skills rather than implementing their own.
### Image Generation Skill Selection
1. Check available image generation skills in `skills/` directory
2. Read each skill's SKILL.md to understand parameters and capabilities
3. If multiple image generation skills available, ask user to choose preferred skill
### Generation Flow Template
Use this template when implementing image generation in skills:
```markdown
### Step N: Generate Images
**Skill Selection**:
1. Check available image generation skills (e.g., `baoyu-gemini-web`)
2. Read selected skill's SKILL.md for parameter reference
3. If multiple skills available, ask user to choose
**Generation Flow**:
1. Call selected image generation skill with:
- Prompt file path (or inline prompt)
- Output image path
- Any skill-specific parameters (refer to skill's SKILL.md)
2. Generate images sequentially (one at a time)
3. After each image, output progress: "Generated X/N"
4. On failure, auto-retry once before reporting error
```
### Output Path Convention
Generated images from the same skill and source file MUST be grouped together:
**With source file** (e.g., `/path/to/project/content/my-article.md`):
```
/path/to/project/content/my-article/<skill-suffix>/
```
- Remove file extension from source filename
- Use skill name suffix (e.g., `xhs-images`, `cover-image`, `slide-deck`)
- Example: source `/tests-data/anthropic-economic-index.md` + skill `baoyu-xhs-images``/tests-data/anthropic-economic-index/xhs-images/`
**Without source file**:
```
./<skill-suffix>/<source-slug>/
```
- Place under current project directory
- Use descriptive slug for the content
**Directory Backup**:
- If output directory already exists, rename existing directory with timestamp
- Format: `<dirname>-backup-YYYYMMDD-HHMMSS`
- Example: `xhs-images``xhs-images-backup-20260117-143052`
### Image Naming Convention
Image filenames MUST include meaningful slugs for readability:
**Format**: `NN-{type}-[slug].png`
- `NN`: Two-digit sequence number (01, 02, ...)
- `{type}`: Image type (cover, content, page, slide, illustration, etc.)
- `[slug]`: Descriptive kebab-case slug derived from content
**Examples**:
```
01-cover-ai-future.png
02-content-key-benefits.png
03-page-enigma-machine.png
04-slide-architecture-overview.png
```
**Slug Rules**:
- Derived from image purpose or content (kebab-case)
- Must be unique within the output directory
- 2-5 words, concise but descriptive
- When content changes significantly, update slug accordingly
### Best Practices
- Always read the image generation skill's SKILL.md before calling
- Pass parameters exactly as documented in the skill
- Handle failures gracefully with retry logic
- Provide clear progress feedback to user
+16 -2
View File
@@ -178,14 +178,28 @@ Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohms
/baoyu-comic posts/turing-story/source.md --style dramatic /baoyu-comic posts/turing-story/source.md --style dramatic
/baoyu-comic posts/turing-story/source.md --style ohmsha /baoyu-comic posts/turing-story/source.md --style ohmsha
# Specify layout # Custom style (natural language)
/baoyu-comic posts/turing-story/source.md --style "watercolor with soft edges"
# Specify layout and aspect ratio
/baoyu-comic posts/turing-story/source.md --layout cinematic /baoyu-comic posts/turing-story/source.md --layout cinematic
/baoyu-comic posts/turing-story/source.md --layout webtoon /baoyu-comic posts/turing-story/source.md --aspect 16:9
# Specify language
/baoyu-comic posts/turing-story/source.md --lang zh
# Direct content input # Direct content input
/baoyu-comic "The story of Alan Turing and the birth of computer science" /baoyu-comic "The story of Alan Turing and the birth of computer science"
``` ```
**Options**:
| Option | Values |
|--------|--------|
| `--style` | `classic` (default), `dramatic`, `warm`, `tech`, `sepia`, `vibrant`, `ohmsha`, `realistic`, or custom description |
| `--layout` | `standard` (default), `cinematic`, `dense`, `splash`, `mixed`, `webtoon` |
| `--aspect` | `3:4` (default, portrait), `4:3` (landscape), `16:9` (widescreen) |
| `--lang` | `auto` (default), `zh`, `en`, `ja`, etc. |
**Styles** (visual aesthetics): **Styles** (visual aesthetics):
| Style | Description | Best For | | Style | Description | Best For |
+16 -2
View File
@@ -178,14 +178,28 @@ npx add-skill jimliu/baoyu-skills
/baoyu-comic posts/turing-story/source.md --style dramatic /baoyu-comic posts/turing-story/source.md --style dramatic
/baoyu-comic posts/turing-story/source.md --style ohmsha /baoyu-comic posts/turing-story/source.md --style ohmsha
# 指定布局 # 自定义风格(自然语言描述)
/baoyu-comic posts/turing-story/source.md --style "水彩风格,边缘柔和"
# 指定布局和比例
/baoyu-comic posts/turing-story/source.md --layout cinematic /baoyu-comic posts/turing-story/source.md --layout cinematic
/baoyu-comic posts/turing-story/source.md --layout webtoon /baoyu-comic posts/turing-story/source.md --aspect 16:9
# 指定语言
/baoyu-comic posts/turing-story/source.md --lang zh
# 直接输入内容 # 直接输入内容
/baoyu-comic "图灵的故事与计算机科学的诞生" /baoyu-comic "图灵的故事与计算机科学的诞生"
``` ```
**选项**
| 选项 | 取值 |
|------|------|
| `--style` | `classic`(默认)、`dramatic``warm``tech``sepia``vibrant``ohmsha``realistic`,或自然语言描述 |
| `--layout` | `standard`(默认)、`cinematic``dense``splash``mixed``webtoon` |
| `--aspect` | `3:4`(默认,竖版)、`4:3`(横版)、`16:9`(宽屏) |
| `--lang` | `auto`(默认)、`zh``en``ja` 等 |
**风格**(视觉美学): **风格**(视觉美学):
| 风格 | 描述 | 适用场景 | | 风格 | 描述 | 适用场景 |
+31 -9
View File
@@ -102,22 +102,44 @@ When no `--style` is specified, analyze content to select the best style:
## File Management ## File Management
Save illustrations to `imgs/` subdirectory in the same folder as the article: ### With Article Path
Save illustrations to `[source-name-no-ext]/illustrations/` subdirectory in the same folder as the article:
``` ```
path/to/ path/to/
├── article.md ├── article.md
└── imgs/ └── article/
└── illustrations/
├── outline.md
├── prompts/
│ ├── illustration-concept-a.md
│ ├── illustration-concept-b.md
│ └── ...
├── illustration-concept-a.png
├── illustration-concept-b.png
└── ...
```
Example: `/posts/ai-future.md``/posts/ai-future/illustrations/`
### Without Article Path (Pasted Content)
Save to `./illustrations/[topic-slug]/`:
```
illustrations/
└── ai-future/
├── source.md
├── outline.md ├── outline.md
├── prompts/ ├── prompts/
│ ├── illustration-concept-a.md └── *.png
│ ├── illustration-concept-b.md
│ └── ...
├── illustration-concept-a.png
├── illustration-concept-b.png
└── ...
``` ```
### Directory Backup
If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
## Workflow ## Workflow
### Step 1: Analyze Content & Select Style ### Step 1: Analyze Content & Select Style
@@ -266,7 +288,7 @@ Style notes: [specific style characteristics]
Insert generated images at corresponding positions: Insert generated images at corresponding positions:
```markdown ```markdown
![illustration description](imgs/illustration-[slug].png) ![illustration description]([article-name]/illustrations/illustration-[slug].png)
``` ```
**Insertion Rules**: **Insertion Rules**:
+6 -2
View File
@@ -84,8 +84,12 @@ Style × Layout × Aspect can be freely combined. Custom styles can be described
``` ```
**Target directory**: **Target directory**:
- With source path: `[source-dir]/comic/` - With source path: `[source-dir]/[source-name-no-ext]/comic/`
- Without source: `comic-outputs/YYYY-MM-DD/[topic-slug]/` - Example: `/posts/turing-story.md``/posts/turing-story/comic/`
- Without source: `./comic/[topic-slug]/`
**Directory backup**:
- If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
## Workflow ## Workflow
+20 -14
View File
@@ -76,30 +76,36 @@ When no `--style` is specified, the system analyzes content to select the best s
### With Article Path ### With Article Path
Save to `imgs/` subdirectory in the same folder as the article: Save to `[source-name-no-ext]/cover-image/` subdirectory in the same folder as the article:
``` ```
path/to/ path/to/
├── article.md ├── article.md
└── imgs/ └── article/
└── cover-image/
├── prompts/
│ └── cover.md
└── cover.png
```
Example: `/posts/ai-future.md``/posts/ai-future/cover-image/`
### Without Article Path (Pasted Content)
Save to `./cover-image/[topic-slug]/`:
```
cover-image/
└── ai-future/
├── source.md # Saved pasted content
├── prompts/ ├── prompts/
│ └── cover.md │ └── cover.md
└── cover.png └── cover.png
``` ```
### Without Article Path (Pasted Content) ### Directory Backup
Save to `cover-outputs/YYYY-MM-DD/[topic-slug]/`: If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
```
cover-outputs/
└── 2026-01-17/
└── ai-future/
├── source.md # Saved pasted content
├── prompts/
│ └── cover.md
└── cover.png
```
## Workflow ## Workflow
+15 -8
View File
@@ -89,18 +89,21 @@ This deck is designed for **reading and sharing**, not live presentation:
``` ```
content-dir/ content-dir/
├── source-content.md ├── source-content.md
└── slide-deck/ └── source-content/
── outline.md ── slide-deck/
├── prompts/ ├── outline.md
── 01-slide-cover.md, 02-slide-{slug}.md, ... ── prompts/
── 01-slide-cover.png, 02-slide-{slug}.png, ... │ └── 01-slide-cover.md, 02-slide-{slug}.md, ...
├── {topic-slug}.pptx ├── 01-slide-cover.png, 02-slide-{slug}.png, ...
── {topic-slug}.pdf ── {topic-slug}.pptx
└── {topic-slug}.pdf
``` ```
Example: `/posts/ai-intro.md``/posts/ai-intro/slide-deck/`
### Without Content Path (Pasted Content) ### Without Content Path (Pasted Content)
``` ```
slide-outputs/YYYY-MM-DD/{topic-slug}/ slide-deck/{topic-slug}/
├── source.md ├── source.md
├── outline.md ├── outline.md
├── prompts/ ├── prompts/
@@ -109,6 +112,10 @@ slide-outputs/YYYY-MM-DD/{topic-slug}/
└── {topic-slug}.pdf └── {topic-slug}.pdf
``` ```
### Directory Backup
If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
## Workflow ## Workflow
### Step 1: Analyze Content ### Step 1: Analyze Content
+153 -234
View File
@@ -76,264 +76,150 @@ Detailed style definitions: `references/styles/<style>.md`
Detailed layout definitions: `references/layouts/<layout>.md` Detailed layout definitions: `references/layouts/<layout>.md`
## Auto Style Selection ## Auto Selection
When no `--style` is specified, analyze content to select: | Content Signals | Style | Layout |
|-----------------|-------|--------|
| Beauty, fashion, cute, girl, pink | `cute` | sparse/balanced |
| Health, nature, clean, fresh, organic | `fresh` | balanced/flow |
| Tech, AI, code, digital, app, tool | `tech` | dense/list |
| 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 |
| Content Signals | Selected Style | ## File Structure
|----------------|----------------|
| Beauty, fashion, cute, girl, pink | `cute` |
| Health, nature, clean, fresh, organic | `fresh` |
| Tech, AI, code, digital, app, tool | `tech` |
| Life, story, emotion, feeling, warm | `warm` |
| Warning, important, must, critical | `bold` |
| Professional, business, elegant, simple | `minimal` |
| Classic, vintage, old, traditional | `retro` |
| Fun, exciting, wow, amazing | `pop` |
| Knowledge, concept, productivity, SaaS, notion | `notion` |
## Auto Layout Selection
When no `--layout` is specified, analyze content structure to select:
| Content Signals | Selected Layout |
|----------------|-----------------|
| Single quote, one key point, cover | `sparse` |
| 3-4 points, explanation, tutorial | `balanced` |
| 5+ points, summary, cheat sheet, 干货 | `dense` |
| Numbered items, top N, checklist, steps | `list` |
| vs, compare, before/after, pros/cons | `comparison` |
| Process, flow, timeline, steps with order | `flow` |
**Layout by Position**:
| Position | Recommended Layout |
|----------|-------------------|
| Cover | `sparse` |
| Content | `balanced` or content-appropriate |
| Ending | `sparse` or `balanced` |
## File Management
### With Article Path
Save to `xhs-images/` subdirectory in the same folder as the article:
``` ```
posts/ai-future/ [target]/
├── article.md ├── source.md # Source content (if pasted)
── xhs-images/ ── analysis.md # Deep analysis results
├── outline.md ├── outline-style-[slug].md # Variant A (e.g., outline-style-tech.md)
├── prompts/ ├── outline-style-[slug].md # Variant B (e.g., outline-style-notion.md)
├── 01-cover.md ├── outline-style-[slug].md # Variant C (e.g., outline-style-minimal.md)
├── 02-content-1.md ├── outline.md # Final selected
│ └── ... ├── prompts/
├── 01-cover.png ├── 01-cover-[slug].md
├── 02-content-1.png ├── 02-content-[slug].md
└── 03-ending.png └── ...
├── 01-cover-[slug].png
├── 02-content-[slug].png
└── NN-ending-[slug].png
``` ```
### Without Article Path (Pasted Content) **Target directory**:
- With source path: `[source-dir]/[source-name-no-ext]/xhs-images/`
- Example: `/tests-data/article.md``/tests-data/article/xhs-images/`
- Without source: `./xhs-images/[topic-slug]/`
Save to `xhs-outputs/YYYY-MM-DD/[topic-slug]/`: **Directory backup**:
- If target directory exists, rename existing to `<dirname>-backup-YYYYMMDD-HHMMSS`
```
xhs-outputs/
└── 2026-01-13/
└── ai-agent-guide/
├── source.md # Saved pasted content
├── outline.md
├── prompts/
│ ├── 01-cover.md
│ └── ...
├── 01-cover.png
└── 02-ending.png
```
## Workflow ## Workflow
### Step 1: Analyze Content & Select Style/Layout ### 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): 1. **Save source content** (if not already a file):
- If user provides a file path: use as-is - If user provides a file path: use as-is
- If user pastes content: save to `source.md` in target directory - If user pastes content: save to `source.md` in target directory
2. Read content 2. Read source content
3. If `--style` specified, use that style; otherwise auto-select 3 candidates 3. **Deep analysis** following `references/analysis-framework.md`:
4. If `--layout` specified, use that layout; otherwise auto-select per image - Content type classification (种草/干货/测评/教程/避坑...)
5. **Language detection**: - Hook analysis (爆款标题潜力)
- Detect **source language** from content - Target audience identification
- Detect **user language** from conversation context - Engagement potential (收藏/分享/评论)
- Note if source_language ≠ user_language (will ask in Step 4) - Visual opportunity mapping
6. Determine image count based on content complexity: - 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`**
| Content Type | Image Count | ### Step 2: Generate 3 Outline Variants
|-------------|-------------|
| Simple opinion / single topic | 2-3 |
| Medium complexity / tutorial | 4-6 |
| Deep dive / multi-dimensional | 7-10 |
**Note**: Layout can vary per image in a series. Cover typically uses `sparse`, content pages use `balanced`/`dense`/`list` as appropriate. Based on analysis, create three distinct style variants.
### Step 2: Generate Outline **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`
Plan for each image with style and layout specifications: | Variant | Selection Logic | Example Filename |
|---------|-----------------|------------------|
| A | Primary recommendation | `outline-style-tech.md` |
| B | Alternative style | `outline-style-notion.md` |
| C | Different audience/mood | `outline-style-minimal.md` |
```markdown **All variants are preserved after selection for reference.**
# Xiaohongshu Infographic Series Outline
**Topic**: [topic description] ### Step 3: User Confirms All Options
**Style**: [selected style]
**Default Layout**: [selected layout or "varies"]
**Image Count**: N
**Generated**: YYYY-MM-DD HH:mm
---
## Image 1 of N
**Position**: Cover
**Layout**: sparse
**Core Message**: [one-liner]
**Filename**: 01-cover.png
**Text Content**:
- Title: xxx
- Subtitle: xxx
**Visual Concept**: [style + layout appropriate description]
---
## Image 2 of N
**Position**: Content
**Layout**: [balanced/dense/list/comparison/flow]
**Core Message**: [one-liner]
**Filename**: 02-xxx.png
**Text Content**:
- Title: xxx
- Points: [list based on layout density]
**Visual Concept**: [description matching style + layout]
---
...
```
### Step 3: Save Outline
Save outline as `outline.md`.
### Step 4: Review & Confirm
**Purpose**: Let user confirm all options in a single step before image generation.
**IMPORTANT**: Present ALL options in a single confirmation step using AskUserQuestion. Do NOT interrupt workflow with multiple separate confirmations. **IMPORTANT**: Present ALL options in a single confirmation step using AskUserQuestion. Do NOT interrupt workflow with multiple separate confirmations.
1. **Generate 3 style variants** (if style not specified): **Determine which questions to ask**:
- Analyze content to select 3 most suitable styles
- Generate complete outline for each style variant
- Save as `outline-{style}.md` (e.g., `outline-cute.md`, `outline-notion.md`, `outline-tech.md`)
2. **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` |
| Question | When to Ask | **Language handling**:
|----------|-------------| - If source language = user language: Just inform user (e.g., "Images will be in Chinese")
| Style variant | Always (required) | - If different: Ask which language to use
| Default layout | Always (offer common options) |
| Language | Only if `source_language ≠ user_language` |
3. **Present options** (use AskUserQuestion with all applicable questions): **AskUserQuestion format**:
**Question 1 (Style)** - always: ```
- Style A (recommended): [style name] - [brief description] Question 1 (Style): Which style variant?
- Style B: [style name] - [brief description] - A: tech + dense (Recommended) - 专业科技感,适合干货
- Style C: [style name] - [brief description] - B: notion + list - 清爽知识卡片
- Custom: Provide custom style reference - C: minimal + balanced - 简约高端风格
- Custom: 自定义风格描述
**Question 2 (Layout)** - always: Question 2 (Layout) - only if relevant:
- sparse (Recommended for cover) - minimal info, maximum impact - Keep variant default (Recommended)
- balanced - standard 3-4 points - sparse / balanced / dense / list / comparison / flow
- dense - high info density, knowledge cards
- list / comparison / flow - special formats
**Question 3 (Language)** - only if source ≠ user language: Question 3 (Language) - only if mismatch:
- [Source language] (matches content) - 中文 (匹配原文)
- [User language] (your preference) - English (your preference)
**Language handling**:
- If source language = user language: Just inform user (e.g., "Images will be in Chinese")
- If different: Ask which language to use
4. **Apply selection**:
- Copy selected `outline-{style}.md` to `outline.md`
- If custom style provided, generate new outline with that style
- If different language selected, regenerate outline in that language
- User may edit `outline.md` directly for fine-tuning
- If modified, reload outline before proceeding
5. **Proceed only after explicit user confirmation**
### Step 5: Generate Images One by One
For each image, create a prompt file with style and layout specifications.
**Prompt Format**:
```markdown
Infographic theme: [topic]
Style: [style name]
Layout: [layout name]
Position: [cover/content/ending]
Visual composition:
- Main visual: [style-appropriate description]
- Arrangement: [layout-specific structure]
- Decorative elements: [style-specific decorations]
Color scheme:
- Primary: [style primary color]
- Background: [style background color]
- Accent: [style accent color]
Text content:
- Title: 「xxx」(large, prominent)
- Key points: [based on layout density]
Layout instructions: [layout-specific guidance]
Style notes: [style-specific characteristics]
``` ```
**Layout-Specific Instructions**: **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
| Layout | Arrangement Instructions | ### Step 4: Generate Images
|--------|-------------------------|
| `sparse` | Single focal point centered, 1-2 text elements, maximum breathing room | With confirmed outline + style + layout:
| `balanced` | Title at top, 3-4 points in clear sections, moderate spacing |
| `dense` | Grid or multi-section layout, 5-8 points, compact but organized | **For each image (cover + content + ending)**:
| `list` | Vertical numbered/bulleted list, consistent item spacing, clear hierarchy | 1. Save prompt to `prompts/NN-{type}-[slug].md` (in user's preferred language)
| `comparison` | Two-column split, clear divider, mirrored structure left/right | 2. Generate image using confirmed style and layout
| `flow` | Horizontal or vertical flow with arrows, connected nodes/steps | 3. Report progress after each generation
**Image Generation Skill Selection**: **Image Generation Skill Selection**:
1. Check available image generation skills - Check available image generation skills
2. If multiple skills available, ask user to choose - If multiple skills available, ask user preference
**Session Management**: **Session Management**:
If the image generation skill supports `--sessionId`: If image generation skill supports `--sessionId`:
1. Generate a unique session ID at the start (e.g., `xhs-{topic-slug}-{timestamp}`) 1. Generate unique session ID: `xhs-{topic-slug}-{timestamp}`
2. Use the same session ID for all images in the series 2. Use same session ID for all images
3. This ensures style consistency across all generated images 3. Ensures visual consistency across generated images
**Generation Flow**: ### Step 5: Completion Report
1. Call selected image generation skill with prompt file, output path, and session ID
2. Confirm generation success
3. Report progress: "Generated X/N"
4. Continue to next
**All prompts are written in the user's confirmed language preference.**
### Step 6: Completion Report
``` ```
Xiaohongshu Infographic Series Complete! Xiaohongshu Infographic Series Complete!
@@ -344,21 +230,48 @@ Layout: [layout name or "varies"]
Location: [directory path] Location: [directory path]
Images: N total Images: N total
- 01-cover.png ✓ Cover (sparse) ✓ analysis.md
- 02-content-1.png ✓ Content (balanced) ✓ outline-style-tech.md
- 03-content-2.png ✓ Content (dense) ✓ outline-style-notion.md
- 04-ending.png ✓ Ending (sparse) ✓ outline-style-minimal.md
✓ outline.md (selected: tech + dense)
Outline: outline.md 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 ## Content Breakdown Principles
1. **Cover (Image 1)**: Strong visual impact, core title, attention hook`sparse` layout 1. **Cover (Image 1)**: Hook + visual impact → `sparse` layout
2. **Content (Middle)**: Core points per image, density varies by content`balanced`/`dense`/`list`/`comparison`/`flow` 2. **Content (Middle)**: Core value per image → `balanced`/`dense`/`list`/`comparison`/`flow`
3. **Ending (Last)**: Summary / call-to-action / memorable quote`sparse` or `balanced` 3. **Ending (Last)**: CTA / summary`sparse` or `balanced`
**Style × Layout Matrix** (recommended combinations): **Style × Layout Matrix** (✓✓ = highly recommended, ✓ = works well):
| | sparse | balanced | dense | list | comparison | flow | | | sparse | balanced | dense | list | comparison | flow |
|---|:---:|:---:|:---:|:---:|:---:|:---:| |---|:---:|:---:|:---:|:---:|:---:|:---:|
@@ -372,13 +285,19 @@ Outline: outline.md
| pop | ✓✓ | ✓✓ | ✓ | ✓✓ | ✓✓ | ✓ | | pop | ✓✓ | ✓✓ | ✓ | ✓✓ | ✓✓ | ✓ |
| notion | ✓✓ | ✓✓ | ✓✓ | ✓✓ | ✓✓ | ✓✓ | | notion | ✓✓ | ✓✓ | ✓✓ | ✓✓ | ✓✓ | ✓✓ |
✓✓ = highly recommended, ✓ = works well ## 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
## Notes ## Notes
- Image generation typically takes 10-30 seconds per image - Image generation typically takes 10-30 seconds per image
- Auto-retry once on generation failure - Auto-retry once on generation failure
- Use cartoon alternatives for sensitive public figures - Use cartoon alternatives for sensitive public figures
- Prompts written in user's confirmed language preference - All prompts and text use confirmed language preference
- Text on images uses confirmed language - Maintain style consistency across all images in series
- Maintain selected style consistency across all images in series
@@ -0,0 +1,198 @@
# Xiaohongshu Content Analysis Framework
Deep analysis framework tailored for Xiaohongshu's unique engagement patterns.
## Purpose
Before creating infographics, thoroughly analyze the source material to:
- Maximize hook power and swipe motivation
- Identify save-worthy and share-worthy elements
- Plan the visual narrative arc
- Match content to optimal style/layout
## Platform Characteristics
Unlike other platforms, Xiaohongshu content must prioritize:
- **Hook Power**: First image decides 90% of engagement
- **Swipe Motivation**: Each image must compel users to continue
- **Save Value**: Content worth bookmarking for later
- **Share Triggers**: Emotional resonance that drives sharing
## Analysis Dimensions
### 1. Content Type Classification
| Type | Characteristics | Best Style | Best Layout |
|------|----------------|------------|-------------|
| 种草/安利 | Product recommendation, benefits focus | cute/fresh | balanced/list |
| 干货分享 | Knowledge, tips, how-to | notion/tech | dense/list |
| 个人故事 | Personal experience, emotional | warm | balanced |
| 测评对比 | Review, comparison, pros/cons | tech/bold | comparison |
| 教程步骤 | Step-by-step guide | fresh/notion | flow/list |
| 避坑指南 | Warnings, mistakes to avoid | bold | list/comparison |
| 清单合集 | Collections, recommendations | cute/minimal | list/dense |
### 2. Hook Analysis (爆款标题潜力)
Evaluate title/hook potential using these patterns:
**Hook Types**:
- **数字钩子**: "5个方法", "3分钟学会", "99%的人不知道"
- **痛点钩子**: "踩过的坑", "后悔没早知道", "别再..."
- **好奇钩子**: "原来...", "竟然...", "没想到..."
- **利益钩子**: "省钱", "变美", "效率翻倍"
- **身份钩子**: "打工人必看", "学生党", "新手妈妈"
**Rating Scale**:
- ⭐⭐⭐⭐⭐ (5/5): Multiple strong hooks combined
- ⭐⭐⭐⭐ (4/5): Clear hook with room for enhancement
- ⭐⭐⭐ (3/5): Basic hook, needs strengthening
- ⭐⭐ (2/5): Weak hook, requires significant improvement
- ⭐ (1/5): No clear hook
### 3. Target Audience (用户画像)
| Audience | Interests | Preferred Style | Content Focus |
|----------|-----------|-----------------|---------------|
| 学生党 | 省钱、学习、校园 | cute/fresh | 平价、教程、学习方法 |
| 打工人 | 效率、职场、减压 | minimal/tech | 工具、技巧、摸鱼 |
| 宝妈 | 育儿、家居、省心 | warm/fresh | 实用、安全、经验 |
| 精致女孩 | 美妆、穿搭、仪式感 | cute/retro | 好看、氛围、品质 |
| 技术宅 | 工具、效率、极客 | tech/notion | 深度、专业、新奇 |
| 美食爱好者 | 探店、食谱、测评 | warm/pop | 好吃、简单、颜值 |
| 旅行达人 | 攻略、打卡、小众 | fresh/retro | 省钱、避坑、拍照 |
### 4. Engagement Potential
**Save Value (收藏价值)**:
- Is it reference material? ✓ High save potential
- Is it a checklist or list? ✓ High save potential
- Is it a tutorial? ✓ High save potential
- Is it time-sensitive news? ✗ Low save potential
**Share Triggers (分享冲动)**:
- "我朋友也需要看这个" → High share potential
- "这说的就是我" → Identity resonance
- "太有用了必须分享" → Utility sharing
- "笑死,给朋友看看" → Entertainment sharing
**Comment Inducement (评论诱导)**:
- Open-ended questions: "你是哪种类型?"
- Experience sharing: "评论区说说你的经历"
- Debate triggers: "你觉得呢?"
- Help requests: "有更好的推荐吗?"
**Interaction Design (互动设计)**:
- Polls: "A还是B"
- Challenges: "你能做到几个?"
- Tags: "@你那个需要的朋友"
### 5. Visual Opportunity Map
| Content Element | Visual Treatment | Example |
|-----------------|------------------|---------|
| 数据/统计 | Highlighted numbers, simple charts | "节省80%时间" 大字突出 |
| 对比 | Before/after, side-by-side | 左右分屏对比图 |
| 步骤 | Numbered flow, arrows | 1→2→3 流程图 |
| 清单 | Checklist with icons | ✓/✗ 列表配图标 |
| 情感 | Character expressions, scenes | 卡通人物表情包 |
| 产品 | Product showcase, lifestyle | 产品实拍+使用场景 |
| 引用 | Quote cards, speech bubbles | 金句卡片设计 |
### 6. Swipe Flow Design
Plan the narrative arc across images:
| Position | Purpose | Hook Strategy |
|----------|---------|---------------|
| **Cover (封面)** | Stop scrolling | 最强视觉冲击 + 核心标题 |
| **Setup (铺垫)** | Build context | 痛点共鸣 / 好奇心 |
| **Core (核心)** | Deliver value | 干货内容,每页1-2个要点 |
| **Payoff (收获)** | Practical takeaway | 可执行的行动建议 |
| **Ending (结尾)** | Drive action | CTA + 互动引导 |
**Swipe Motivation Between Images**:
- End each image with a hook for the next
- Use "下一页更精彩" type transitions
- Create information gaps that require swiping
- Build anticipation through numbering ("第3个最重要")
## Output Format
Analysis results should be saved to `analysis.md` with:
```yaml
---
title: "5个让你效率翻倍的AI工具"
topic: 干货分享
content_type: 工具推荐
source_language: zh
user_language: zh
recommended_image_count: 6
---
## Target Audience
- **Primary**: 打工人、自由职业者 - 追求效率提升
- **Secondary**: 学生党 - 写论文、做作业需要
- **Tertiary**: 内容创作者 - 需要AI辅助
## Hook Analysis
**标题钩子评分**: ⭐⭐⭐⭐ (4/5)
- ✓ 数字钩子: "5个"
- ✓ 利益钩子: "效率翻倍"
- △ 可增强: 加入身份标签 "打工人必看"
**建议优化**:
- 原标题: "5个让你效率翻倍的AI工具"
- 优化: "打工人必看!5个让我效率翻倍的AI神器"
## Value Proposition
**为什么用户要看?**
1. **实用价值**: 直接可用的工具推荐
2. **省时省力**: 不用自己筛选,直接抄作业
3. **FOMO**: 别人都在用,我不能落后
**收藏理由**: 工具清单,需要时可以回来查
## Engagement Design
- **互动点**: 结尾问"你最常用哪个?"
- **评论诱导**: "还有什么好用的工具评论区分享"
- **分享触发**: 打工人会转发给同事
## Content Signals
- "AI工具" → tech + dense
- "效率" → notion + list
- "干货" → minimal + dense
## Swipe Flow
| Image | Position | Purpose | Hook |
|-------|----------|---------|------|
| 1 | Cover | 吸引停留 | 标题+视觉冲击 |
| 2 | Setup | 建立共鸣 | 为什么需要AI工具 |
| 3-5 | Core | 核心价值 | 每页1-2个工具详解 |
| 6 | Ending | 行动引导 | 总结+互动引导 |
## Recommended Approaches
1. **Tech + Dense** - 专业科技感,适合干货分享 (recommended)
2. **Notion + List** - 清爽知识卡片风格
3. **Minimal + Balanced** - 简约高端,适合职场人群
```
## Analysis Checklist
Before proceeding to outline generation:
- [ ] Can I identify the content type?
- [ ] Is the hook strong enough? (≥3 stars)
- [ ] Do I know the primary audience?
- [ ] Have I identified save/share triggers?
- [ ] Are there clear visual opportunities?
- [ ] Is the swipe flow planned?
- [ ] Have I selected 3 style+layout combinations?
@@ -0,0 +1,228 @@
# Xiaohongshu Outline Template
Template for generating infographic series outlines.
## File Naming
Outline files use style slug in the name:
- `outline-style-tech.md` - Tech style variant
- `outline-style-notion.md` - Notion style variant
- `outline-style-minimal.md` - Minimal style variant
- `outline.md` - Final selected (copied from chosen variant)
## Image File Naming
Images use meaningful slugs for readability:
```
NN-{type}-[slug].png
NN-{type}-[slug].md (in prompts/)
```
| Type | Usage |
|------|-------|
| `cover` | First image (cover) |
| `content` | Middle content images |
| `ending` | Last image |
**Examples**:
- `01-cover-ai-tools.png`
- `02-content-why-ai.png`
- `03-content-chatgpt.png`
- `04-content-midjourney.png`
- `05-content-notion-ai.png`
- `06-ending-summary.png`
**Slug rules**:
- Derived from image content (kebab-case)
- Must be unique within the series
- Keep short but descriptive (2-4 words)
## Outline Format
```markdown
# Xiaohongshu Infographic Series Outline
---
style: tech
default_layout: dense
image_count: 6
generated: YYYY-MM-DD HH:mm
---
## Image 1 of 6
**Position**: Cover
**Layout**: sparse
**Hook**: 打工人必看!
**Slug**: ai-tools
**Filename**: 01-cover-ai-tools.png
**Text Content**:
- Title: 「5个AI神器让你效率翻倍」
- Subtitle: 亲测好用,建议收藏
**Visual Concept**:
科技感背景,多个AI工具图标环绕,中心大标题,
霓虹蓝+深色背景,未来感十足
**Swipe Hook**: 第一个就很强大👇
---
## Image 2 of 6
**Position**: Content
**Layout**: balanced
**Core Message**: 为什么你需要AI工具
**Slug**: why-ai
**Filename**: 02-content-why-ai.png
**Text Content**:
- Title: 「为什么要用AI?」
- Points:
- 重复工作自动化
- 创意辅助不卡壳
- 效率提升10倍
**Visual Concept**:
对比图:左边疲惫打工人,右边轻松使用AI的人
科技线条装饰,简洁有力
**Swipe Hook**: 接下来是具体工具推荐👇
---
## Image 3 of 6
**Position**: Content
**Layout**: dense
**Core Message**: ChatGPT使用技巧
**Slug**: chatgpt
**Filename**: 03-content-chatgpt.png
**Text Content**:
- Title: 「ChatGPT」
- Subtitle: 最强AI助手
- Points:
- 写文案:给出框架,秒出初稿
- 改文章:润色、翻译、总结
- 编程:写代码、找bug
- 学习:解释概念、出题练习
**Visual Concept**:
ChatGPT logo居中,四周放射状展示功能点
深色科技背景,霓虹绿点缀
**Swipe Hook**: 下一个更适合创意工作者👇
---
## Image 4 of 6
**Position**: Content
**Layout**: dense
**Core Message**: Midjourney绘图
**Slug**: midjourney
**Filename**: 04-content-midjourney.png
**Text Content**:
- Title: 「Midjourney」
- Subtitle: AI绘画神器
- Points:
- 输入描述,秒出图片
- 风格多样:写实/插画/3D
- 做封面、做头像、做素材
- 不会画画也能当设计师
**Visual Concept**:
展示几张MJ生成的不同风格图片
画框/画布元素装饰
**Swipe Hook**: 还有一个效率神器👇
---
## Image 5 of 6
**Position**: Content
**Layout**: balanced
**Core Message**: Notion AI笔记
**Slug**: notion-ai
**Filename**: 05-content-notion-ai.png
**Text Content**:
- Title: 「Notion AI」
- Subtitle: 智能笔记助手
- Points:
- 自动总结长文
- 头脑风暴出点子
- 整理会议记录
**Visual Concept**:
Notion界面风格,简洁黑白配色
展示笔记整理前后对比
**Swipe Hook**: 最后总结一下👇
---
## Image 6 of 6
**Position**: Ending
**Layout**: sparse
**Core Message**: 总结与互动
**Slug**: summary
**Filename**: 06-ending-summary.png
**Text Content**:
- Title: 「工具只是工具」
- Subtitle: 关键是用起来!
- CTA: 收藏备用 | 转发给需要的朋友
- Interaction: 你最常用哪个?评论区见👇
**Visual Concept**:
简洁背景,大字标题
底部互动引导文字
收藏/分享图标
---
```
## Layout Guidelines by Position
| Position | Recommended Layout | Why |
|----------|-------------------|-----|
| Cover | `sparse` | Maximum visual impact, clear title |
| Setup | `balanced` | Context without overwhelming |
| Core | `balanced`/`dense`/`list` | Based on content density |
| Payoff | `balanced`/`list` | Clear takeaways |
| Ending | `sparse` | Clean CTA, memorable close |
## Swipe Hook Strategies
Each image should end with a hook for the next:
| Strategy | Example |
|----------|---------|
| Teaser | "第一个就很强大👇" |
| Numbering | "接下来是第2个👇" |
| Superlative | "下一个更厉害👇" |
| Question | "猜猜下一个是什么?👇" |
| Promise | "最后一个最实用👇" |
| Urgency | "最重要的来了👇" |
## Variant Differentiation
Three variants should differ meaningfully:
| Aspect | Variant A | Variant B | Variant C |
|--------|-----------|-----------|-----------|
| Style | Primary match | Alternative | Different mood |
| Layout | Content-optimized | Different density | Different structure |
| Tone | Professional | Casual | Playful |
| Audience | Primary target | Secondary target | Broader appeal |
**Example for "AI工具推荐"**:
- `outline-style-tech.md`: Tech + Dense - 专业极客风
- `outline-style-notion.md`: Notion + List - 清爽知识卡片
- `outline-style-cute.md`: Cute + Balanced - 可爱易读风