AgentSkillsCN

baoyu-article-illustrator

分析文章结构,识别需要视觉辅助的位置,采用“类型 × 风格”的二维方法生成插图。当用户提出“为文章配图”、“添加图片”、“为文章生成图片”,或“为文章配图”时,可使用此技能。

SKILL.md
--- frontmatter
name: baoyu-article-illustrator
description: Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style two-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".

Article Illustrator

Analyze articles, identify illustration positions, generate images with Type × Style consistency.

Two Dimensions

DimensionControlsExamples
TypeInformation structure, layoutinfographic, scene, flowchart, comparison, framework, timeline
StyleVisual aesthetics, moodnotion, warm, minimal, blueprint, watercolor, elegant

Type × Style can be freely combined. Example: --type infographic --style blueprint

Illustration Purpose

Auto-detected during content analysis. Influences type/style recommendations.

PurposeDescriptionBest Types
informationHelp understand abstract conceptsinfographic, flowchart, comparison
visualizationTurn abstract ideas into concrete visualsframework, comparison, infographic
imaginationCreate atmosphere, spark imaginationscene, timeline

Type Gallery

TypeBest For
infographicData, metrics, technical articles
sceneNarratives, personal stories, emotional content
flowchartTutorials, workflows, processes
comparisonSide-by-side, before/after, options
frameworkMethodologies, models, architecture
timelineHistory, progress, evolution

Styles

See references/styles.md for:

  • Core Styles: Simplified tier for quick selection (vector, minimal-flat, sci-fi, hand-drawn, editorial, scene)
  • Style Gallery: Full 20+ style options with descriptions
  • Auto Selection: Content signals → Type/Style recommendations
  • Compatibility Matrix: Type × Style combinations

Workflow

code
Progress:
- [ ] Step 1: Pre-check
  - [ ] 1.5 Load preferences (EXTEND.md) ⛔ BLOCKING
  - [ ] 1.0 Reference images ⚠️ (if provided)
  - [ ] 1.2-1.4 Config questions (1 AskUserQuestion, max 4 Qs)
- [ ] Step 2: Setup & Analyze
- [ ] Step 3: Confirm Settings (1 AskUserQuestion, max 4 Qs)
  - [ ] Q1: Type ⚠️
  - [ ] Q2: Density ⚠️ MUST ASK
  - [ ] Q3: Style ⚠️
- [ ] Step 4: Generate Outline
- [ ] Step 5: Generate Images
- [ ] Step 6: Finalize

Step 1: Pre-check

1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING

CRITICAL: If EXTEND.md not found, MUST complete first-time setup before ANY other steps.

bash
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user"
ResultAction
FoundRead, parse, display summary → Continue
Not found⛔ Run first-time setup (references/config/first-time-setup.md)

Supports: Watermark | Preferred type/style | Custom styles | Language | Output directory

1.0-1.4: Handle reference images, determine input type, ask config questions.

Full procedures: references/workflow.md


Step 2: Setup & Analyze

AnalysisDescription
Content typeTechnical / Tutorial / Methodology / Narrative
Illustration purposeinformation / visualization / imagination
Core arguments2-5 main points to visualize
Visual opportunitiesPositions where illustrations add value

CRITICAL: If article uses metaphors, do NOT illustrate literally. Visualize the underlying concept.

Full procedures: references/workflow.md


Step 3: Confirm Settings ⚠️

Do NOT skip. Use ONE AskUserQuestion call with max 4 questions. Q1, Q2, Q3 are ALL REQUIRED.

QuestionOptions
Q1: Type ⚠️[Recommended], infographic, scene, flowchart, comparison, framework, timeline, mixed
Q2: Density ⚠️minimal (1-2), balanced (3-5), per-section (Recommended), rich (6+)
Q3: Style ⚠️[Recommended], minimal-flat, sci-fi, hand-drawn, editorial, scene, Other
Q4: LanguageWhen article language ≠ EXTEND.md setting

Full procedures: references/workflow.md


Step 4: Generate Outline

Save as outline.md with frontmatter (type, density, style, image_count, references) and illustration entries:

yaml
## Illustration 1
**Position**: [section] / [paragraph]
**Purpose**: [why this helps]
**Visual Content**: [what to show]
**Filename**: 01-infographic-concept-name.png

Full template: references/workflow.md


Step 5: Generate Images

  1. Create Prompts: Follow references/prompt-construction.md
  2. Select Generation Skill: Check available skills
  3. Process References: Handle direct/style/palette usage
  4. Apply Watermark: If enabled in EXTEND.md
  5. Generate: Sequential, retry once on failure

Full procedures: references/workflow.md


Step 6: Finalize

Update Article: Insert ![description](path/NN-{type}-{slug}.png) after corresponding paragraphs.

Output Summary:

code
Article Illustration Complete!
Article: [path] | Type: [type] | Density: [level] | Style: [style]
Images: X/N generated
Positions:
- 01-xxx.png → After "[Section]"

Output Directory

code
illustrations/{topic-slug}/
├── source-{slug}.{ext}
├── references/                    # Only if references provided
│   └── NN-ref-{slug}.png
├── outline.md
├── prompts/
│   └── illustration-{slug}.md
└── NN-{type}-{slug}.png

Slug: 2-4 word topic in kebab-case. Conflict: Append -YYYYMMDD-HHMMSS if exists.

Modification

ActionSteps
EditUpdate prompt file FIRST → Regenerate → Update reference
AddIdentify position → Create prompt → Generate → Update outline → Insert
DeleteDelete files → Remove reference → Update outline

References

FileContent
references/workflow.mdDetailed workflow procedures
references/usage.mdCommand syntax and options
references/styles.mdStyle gallery & compatibility
references/prompt-construction.mdPrompt templates
references/styles/<style>.mdFull style specifications
references/config/preferences-schema.mdEXTEND.md schema
references/config/first-time-setup.mdFirst-time setup flow