Files
baoyu-skills/skills/baoyu-article-illustrator/references/prompt-construction.md
T
Jim Liu 宝玉 ec6781a231 feat(baoyu-article-illustrator): add reference image support
- Add reference image handling with direct/style/palette usage types
- Enhance first-time setup as blocking operation
- Update prompt construction with reference frontmatter format
2026-02-01 19:48:46 -06:00

3.6 KiB

Prompt Construction

Prompt File Format

Each prompt file uses YAML frontmatter + content:

---
illustration_id: 01
type: infographic
style: blueprint
references:                    # ⚠️ ONLY if files EXIST in references/ directory
  - ref_id: 01
    filename: 01-ref-diagram.png
    usage: direct              # direct | style | palette
---

[Type-specific template content below...]

⚠️ CRITICAL - When to include references field:

Situation Action
Reference file saved to references/ Include in frontmatter ✓
Style extracted verbally (no file) DO NOT include in frontmatter, append to prompt body instead
File path in frontmatter but file doesn't exist ERROR - remove references field

Reference Usage Types (only when file exists):

Usage Description Generation Action
direct Primary visual reference Pass to --ref parameter
style Style characteristics only Describe style in prompt text
palette Color palette extraction Include colors in prompt

If no reference file but style/palette extracted verbally, append directly to prompt body:

COLORS (from reference):
- Primary: #E8756D coral
- Secondary: #7ECFC0 mint
...

STYLE (from reference):
- Clean lines, minimal shadows
- Gradient backgrounds
...

Principles

Good prompts must include:

  1. Layout Structure First: Describe composition, zones, flow direction
  2. Specific Data/Labels: Use actual numbers, terms from article
  3. Visual Relationships: How elements connect
  4. Semantic Colors: Meaning-based color choices (red=warning, green=efficient)
  5. Style Characteristics: Line treatment, texture, mood
  6. Aspect Ratio: End with ratio and complexity level

Type-Specific Templates

Infographic

[Title] - Data Visualization

Layout: [grid/radial/hierarchical]

ZONES:
- Zone 1: [data point with specific values]
- Zone 2: [comparison with metrics]
- Zone 3: [summary/conclusion]

LABELS: [specific numbers, percentages, terms from article]
COLORS: [semantic color mapping]
STYLE: [style characteristics]
ASPECT: 16:9

Scene

[Title] - Atmospheric Scene

FOCAL POINT: [main subject]
ATMOSPHERE: [lighting, mood, environment]
MOOD: [emotion to convey]
COLOR TEMPERATURE: [warm/cool/neutral]
STYLE: [style characteristics]
ASPECT: 16:9

Flowchart

[Title] - Process Flow

Layout: [left-right/top-down/circular]

STEPS:
1. [Step name] - [brief description]
2. [Step name] - [brief description]
...

CONNECTIONS: [arrow types, decision points]
STYLE: [style characteristics]
ASPECT: 16:9

Comparison

[Title] - Comparison View

LEFT SIDE - [Option A]:
- [Point 1]
- [Point 2]

RIGHT SIDE - [Option B]:
- [Point 1]
- [Point 2]

DIVIDER: [visual separator]
STYLE: [style characteristics]
ASPECT: 16:9

Framework

[Title] - Conceptual Framework

STRUCTURE: [hierarchical/network/matrix]

NODES:
- [Concept 1] - [role]
- [Concept 2] - [role]

RELATIONSHIPS: [how nodes connect]
STYLE: [style characteristics]
ASPECT: 16:9

Timeline

[Title] - Chronological View

DIRECTION: [horizontal/vertical]

EVENTS:
- [Date/Period 1]: [milestone]
- [Date/Period 2]: [milestone]

MARKERS: [visual indicators]
STYLE: [style characteristics]
ASPECT: 16:9

What to Avoid

  • Vague descriptions ("a nice image")
  • Literal metaphor illustrations
  • Missing concrete labels/annotations
  • Generic decorative elements

Watermark Integration

If watermark enabled in preferences, append:

Include a subtle watermark "[content]" positioned at [position] with approximately [opacity*100]% visibility.