AgentSkillsCN

baoyu-cover-image

以五维要素(类型、调色板、渲染方式、文字、情绪)生成文章封面图,融合9种色彩调色板与6种渲染风格。支持电影宽银幕(2.35:1)、宽屏(16:9),以及正方形(1:1)等多种画面比例。当用户提出“生成封面图”、“制作文章封面”,或“打造封面”时,可使用此技能。

SKILL.md
--- frontmatter
name: baoyu-cover-image
description: Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 9 color palettes and 6 rendering styles. Supports cinematic (2.35:1), widescreen (16:9), and square (1:1) aspects. Use when user asks to "generate cover image", "create article cover", or "make cover".

Cover Image Generator

Generate elegant cover images for articles with 5-dimensional customization.

Usage

bash
# Auto-select all dimensions based on content
/baoyu-cover-image path/to/article.md

# Quick mode: skip confirmation, use auto-selection
/baoyu-cover-image article.md --quick

# Specify dimensions (new 5D system)
/baoyu-cover-image article.md --type conceptual --palette warm --rendering flat-vector
/baoyu-cover-image article.md --text title-subtitle --mood bold

# Style presets (backward-compatible shorthand for palette + rendering)
/baoyu-cover-image article.md --style blueprint
/baoyu-cover-image article.md --style blueprint --rendering hand-drawn  # override rendering

# Visual only (no title text)
/baoyu-cover-image article.md --no-title

# Direct content input
/baoyu-cover-image
[paste content]

# Direct input with options
/baoyu-cover-image --palette mono --rendering digital --aspect 1:1 --quick
[paste content]

# With reference images
/baoyu-cover-image article.md --ref style-ref.png
/baoyu-cover-image article.md --ref ref1.png ref2.png --quick

Options

OptionDescription
--type <name>Cover type: hero, conceptual, typography, metaphor, scene, minimal
--palette <name>Color palette: warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name>Rendering style: flat-vector, hand-drawn, painterly, digital, pixel, chalk
--style <name>Preset shorthand (expands to palette + rendering, see Style Presets)
--text <level>Text density: none, title-only, title-subtitle, text-rich
--mood <level>Emotional intensity: subtle, balanced, bold
--aspect <ratio>16:9 (default), 2.35:1, 4:3, 3:2, 1:1, 3:4
--lang <code>Title language (en, zh, ja, etc.)
--no-titleAlias for --text none
--quickSkip confirmation, use auto-selection for missing dimensions
--ref <files...>Reference images for style/composition guidance

Five Dimensions

DimensionControlsValuesDefault
TypeVisual composition, information structurehero, conceptual, typography, metaphor, scene, minimalauto
PaletteColors, color scheme, decorative hintswarm, elegant, cool, dark, earth, vivid, pastel, mono, retroauto
RenderingLine quality, texture, depth, element styleflat-vector, hand-drawn, painterly, digital, pixel, chalkauto
TextText density, information hierarchynone, title-only, title-subtitle, text-richtitle-only
MoodEmotional intensity, visual weightsubtle, balanced, boldbalanced

Dimensions can be freely combined. Auto-selection rules: references/auto-selection.md

Type Gallery

TypeDescriptionBest For
heroLarge visual impact, title overlayProduct launch, brand promotion, major announcements
conceptualConcept visualization, abstract core ideasTechnical articles, methodology, architecture design
typographyText-focused layout, prominent titleOpinion pieces, quotes, insights
metaphorVisual metaphor, concrete expressing abstractPhilosophy, growth, personal development
sceneAtmospheric scene, narrative feelStories, travel, lifestyle
minimalMinimalist composition, generous whitespaceZen, focus, core concepts

Type composition details: references/types.md

Palette Gallery

PaletteVibePrimary Colors
warmFriendly, approachableOrange, golden yellow, terracotta
elegantSophisticated, refinedSoft coral, muted teal, dusty rose
coolTechnical, professionalEngineering blue, navy, cyan
darkCinematic, premiumElectric purple, cyan, magenta
earthNatural, organicForest green, sage, earth brown
vividEnergetic, boldBright red, neon green, electric blue
pastelGentle, whimsicalSoft pink, mint, lavender
monoClean, focusedBlack, near-black, white
retroNostalgic, vintageMuted orange, dusty pink, maroon

Palette definitions: references/palettes/

Rendering Gallery

RenderingDescriptionKey Characteristics
flat-vectorClean modern vectorUniform outlines, flat fills, geometric icons
hand-drawnSketchy organic illustrationImperfect strokes, paper texture, doodles
painterlySoft watercolor/paintBrush strokes, color bleeds, soft edges
digitalPolished modern digitalPrecise edges, subtle gradients, UI components
pixelRetro 8-bit pixel artPixel grid, dithering, chunky shapes
chalkChalk on blackboardChalk strokes, dust effects, board texture

Rendering definitions: references/renderings/

Text & Mood

Text LevelTitleSubtitleTagsUse Case
none---Pure visual, no text
title-only--Simple headline (default)
title-subtitle-Title + supporting context
text-rich✓ (2-4)Information-dense
MoodContrastSaturationWeightUse Case
subtleLowMutedLightCorporate, thought leadership
balancedMediumNormalMediumGeneral articles (default)
boldHighVividHeavyAnnouncements, promotions

Full guides: references/dimensions/text.md | references/dimensions/mood.md

Style Presets & Compatibility

  • Style Presets: --style X expands to palette + rendering. See references/style-presets.md
  • Compatibility Matrices: Palette×Rendering, Type×Rendering, Type×Text, Type×Mood. See references/compatibility.md
    • ✓✓ = highly recommended | ✓ = compatible | ✗ = not recommended

File Structure

Output directory depends on default_output_dir preference:

PreferenceOutput Path
same-dir{article-dir}/
imgs-subdir{article-dir}/imgs/
independent (default)cover-image/{topic-slug}/
Pasted contentcover-image/{topic-slug}/ (always)
code
<output-dir>/
├── source-{slug}.{ext}    # Source files (text, images, etc.)
├── refs/                  # Reference images (if provided)
│   ├── ref-01-{slug}.{ext}
│   ├── ref-01-{slug}.md   # Description file (optional)
│   ├── ref-02-{slug}.{ext}
│   ├── ref-02-{slug}.md   # Description file (optional)
│   └── extracted-style.md # Verbally extracted style (if no file path)
├── prompts/cover.md       # Generation prompt
└── cover.png              # Output image

Slug: Extract main topic (2-4 words, kebab-case). Example: "The Future of AI" → future-of-ai Conflict: If directory exists, append timestamp: {topic-slug}-YYYYMMDD-HHMMSS Source Files: Copy all sources with naming source-{slug}.{ext} (multiple supported)

Workflow

Progress Checklist

code
Cover Image 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 + determine output directory
  - [ ] 1.1 Reference images ⚠️ (if provided)
    - [ ] File path given → saved to refs/ ✓
    - [ ] No path → asked user OR extracted verbally
  - [ ] 1.2 Output directory determined
- [ ] Step 2: Confirm options (5 dimensions) ⚠️ REQUIRED unless --quick or all specified
- [ ] Step 3: Create prompt
  - [ ] References in prompt ONLY if files exist in refs/
  - [ ] Extracted style/palette appended to prompt body (if no file)
- [ ] Step 4: Generate image
  - [ ] 4.1 References verified before generation
  - [ ] 4.2 Pass refs via --ref if skill supports AND files exist
- [ ] Step 5: Completion report

Flow

code
Input → [Step 0: Preferences] ─┬─ Found → Continue
                               │
                               └─ Not found → First-Time Setup ⛔ BLOCKING
                                              │
                                              └─ Complete setup → Save EXTEND.md → Continue
                                                                                      │
        ┌───────────────────────────────────────────────────────────────────────────┘
        ↓
Analyze + Save Refs → [Output Dir ⚠️] → [Confirm: 5 Dimensions] → Prompt → Generate → Complete
                                                 ↓
                                        (skip if --quick or all specified)

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 reference images, do NOT ask about dimensions — ONLY complete the preferences setup first.

Use Bash to check EXTEND.md existence (priority order):

bash
# Check project-level first
test -f .baoyu-skills/baoyu-cover-image/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md" && echo "user"
ResultAction
FoundRead, parse, display preferences summary → Continue to Step 1
Not foundBLOCKING: Run first-time setup ONLY (references/config/first-time-setup.md) → Complete and save EXTEND.md → Then continue to Step 1

Preferences Summary (when found):

code
Preferences loaded from [project/user]:
• Watermark: [enabled/disabled] [content if enabled]
• Type/Palette/Rendering: [value or "auto"]
• Text: [value or "title-only"] | Mood: [value or "balanced"]
• Aspect: [default_aspect] | Output: [dir or "not set — will ask in Step 1.5"]
• Quick mode: [enabled/disabled] | Language: [value or "auto"]

EXTEND.md Supports: Watermark | Preferred type | Preferred palette | Preferred rendering | Preferred text | Preferred mood | Default aspect ratio | Default output directory | Quick mode | Custom palette definitions | Language preference

Schema: references/config/preferences-schema.md

Step 1: Analyze Content

1.0 Detect & Save Reference Images ⚠️ REQUIRED if images provided

Check if user provided reference images. Handle based on input type:

Input TypeAction
Image file path providedCopy to refs/ subdirectory → can use --ref
Image in conversation (no path)ASK user for file path with AskUserQuestion
User can't provide pathExtract style/palette verbally → append to prompt (NO frontmatter references)

CRITICAL: Only add references to prompt frontmatter if files are ACTUALLY SAVED to refs/ directory.

If user provides file path:

  1. Copy to refs/ref-NN-{slug}.{ext} (NN = 01, 02, ...)
  2. Create description: refs/ref-NN-{slug}.md
  3. Verify files exist before proceeding

If user can't provide path (extracted verbally):

  1. Analyze image visually, extract: colors, style, composition
  2. Create refs/extracted-style.md with extracted info
  3. DO NOT add references to prompt frontmatter
  4. Instead, append extracted style/colors directly to prompt text

Description File Format (only when file saved):

yaml
---
ref_id: NN
filename: ref-NN-{slug}.{ext}
usage: direct | style | palette
---
[User's description or auto-generated description]
UsageWhen to Use
directReference matches desired output closely
styleExtract visual style characteristics only
paletteExtract color scheme only

Verification (only for saved files):

code
Reference Images Saved:
- ref-01-{slug}.png ✓ (can use --ref)
- ref-02-{slug}.png ✓ (can use --ref)

Or for extracted style:

code
Reference Style Extracted (no file):
- Colors: #E8756D coral, #7ECFC0 mint...
- Style: minimal flat vector, clean lines...
→ Will append to prompt text (not --ref)

1.1 Save Source Content

  • If pasted, save to source.md in target directory; if file path, use as-is
  • Backup rule: If source.md exists, rename to source-backup-YYYYMMDD-HHMMSS.md

1.2 Content Analysis

  • Extract topic, core message, tone, keywords
  • Identify visual metaphors
  • Detect content type

1.3 Reference Image Analysis (if provided in Step 1.0)

For each reference image:

AnalysisDescription
Visual characteristicsStyle, colors, composition
Content/subjectWhat the reference depicts
Style matchWhich type/palette/rendering align
Usage recommendationdirect / style / palette

1.4 Language Detection

  • Detect source language
  • Note user's input language
  • Compare with EXTEND.md preference

1.5 Determine Output Directory

  • Per File Structure rules
  • If no default_output_dir preference + file path input, include in Step 2 Q4

Step 2: Confirm Options ⚠️

Validate all 5 dimensions + aspect ratio. Full confirmation flow: references/workflow/confirm-options.md

Skip Conditions:

ConditionSkippedStill Asked
--quick or quick_mode: true5 dimensionsAspect ratio (unless --aspect)
All 5 + --aspect specifiedAllNone

Step 3: Create Prompt

Backup rule: If prompts/cover.md exists, rename to prompts/cover-backup-YYYYMMDD-HHMMSS.md

Save to prompts/cover.md. Full template: references/workflow/prompt-template.md

CRITICAL - References in YAML Frontmatter:

When reference files are saved to refs/, MUST add references field in frontmatter:

yaml
---
type: cover
palette: warm
rendering: flat-vector
references:
  - ref_id: 01
    filename: refs/ref-01-podcast-thumbnail.jpg
    usage: style
---
RuleAction
Files saved to refs/Add to frontmatter references list
Style extracted verbally (no file)Omit references field, describe in body
Before writingVerify: test -f refs/ref-NN-{slug}.{ext}

Reference Embedding:

SituationFrontmatterBody
Reference file saved to refs/Add to referencesBrief style note
Style extracted verbally (no file)Omit referencesFull style description
File in frontmatter but doesn't existERROR - fix or remove

Step 4: Generate Image

4.1 Backup existing cover.pngcover-backup-YYYYMMDD-HHMMSS.png (if regenerating)

4.2 Check available image generation skills; if multiple, ask user preference

4.3 Process References ⚠️ REQUIRED if references in frontmatter

Read references from prompt frontmatter and process each entry:

  1. Parse frontmatter to get references list:

    yaml
    references:
      - ref_id: 01
        filename: refs/ref-01-podcast-thumbnail.jpg
        usage: style
    
  2. VERIFY each file exists:

    bash
    test -f refs/ref-NN-{slug}.{ext} && echo "exists" || echo "MISSING"
    
    • If file MISSING → ERROR, fix prompt or remove from references
    • If file exists → proceed with processing
  3. Process based on usage type:

UsageActionExample
directAdd reference path to --ref parameter--ref refs/ref-01-brand.png
styleAnalyze reference, append style traits to prompt"Style: clean lines, gradient backgrounds..."
paletteExtract colors from reference, append to prompt"Colors: #E8756D coral, #7ECFC0 mint..."
  1. Check image generation skill capability:
Skill Supports --refAction
Yes (e.g., baoyu-image-gen with Google)Pass reference images via --ref
NoConvert to text description, append to prompt

Verification: Before generating, confirm reference processing:

code
Reference Processing:
- ref-01-brand.png: using as direct reference ✓
- ref-02-style.png: extracted palette ✓

4.4 Generate

  1. Call selected skill with prompt file path, output path (cover.png), aspect ratio
  2. If references with direct usage AND skill supports --ref: include --ref parameter
  3. On failure: auto-retry once before reporting error

Step 5: Completion Report

code
Cover Generated!

Topic: [topic]
Type: [type] | Palette: [palette] | Rendering: [rendering]
Text: [text] | Mood: [mood] | Aspect: [ratio]
Title: [title text or "visual only"]
Language: [lang] | Watermark: [enabled/disabled]
References: [N images (direct/style/palette) or "extracted style" or "none"]
Location: [directory path]

Files:
✓ source-{slug}.{ext}
[✓ refs/ref-01-{slug}.{ext} ... (if references saved)]
[✓ refs/ref-01-{slug}.md ... (description files)]
[✓ refs/extracted-style.md (if style extracted verbally)]
✓ prompts/cover.md
✓ cover.png
[✓ cover-backup-{timestamp}.png (if regenerated)]

Image Modification

ActionSteps
RegenerateBackup existing → Update prompt file FIRST → Regenerate with same settings
Change dimensionBackup existing → Confirm new value → Update prompt file FIRST → Regenerate

IMPORTANT: When regenerating, ALWAYS update the prompt file (prompts/cover.md) FIRST before regenerating. This ensures changes are documented and reproducible.

All modifications automatically backup existing cover.png before regenerating.

Notes

  • Cover must be readable at small preview sizes
  • Visual metaphors > literal representations
  • Title: readable, impactful
  • Two confirmation points: Step 0 (first-time setup) + Step 2 (options) - skip Step 2 with --quick
  • Use confirmed language for title text
  • Maintain watermark consistency if enabled
  • Check compatibility matrices when selecting combinations
  • --no-title is alias for --text none
  • --style presets are backward-compatible; explicit --palette/--rendering override preset values

Composition Principles

  • Generous whitespace: 40-60% breathing room; avoid cluttered layouts
  • Visual anchor: Main element centered or offset left (reserve right for title)
  • Character handling: Simplified silhouettes or icon-style figures; NO realistic humans
  • Icon vocabulary: Use simple, recognizable symbols (see references/visual-elements.md)

Title Handling

  • Source: Use the exact title provided by user, or extract from source content
  • Do NOT invent titles: Stay faithful to the original
  • If no title in source and user doesn't provide one, ask user to specify

References

Dimensions: text.md | mood.md Palettes: references/palettes/ Renderings: references/renderings/ Auto-Selection: references/auto-selection.md Style Presets: references/style-presets.md Compatibility: references/compatibility.md Types: references/types.md Visual Elements: references/visual-elements.md Workflow: confirm-options.md | prompt-template.md Config: preferences-schema.md | first-time-setup.md | watermark-guide.md