Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate article cover images with 5-dimensional customization: type, palette, rendering, text level, and mood.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/workflow/reference-images.md
1# Reference Image Handling23Guide for processing user-provided reference images in cover generation.45## Input Detection67| Input Type | Action |8|------------|--------|9| Image file path provided | Copy to `refs/` → can use `--ref` |10| Image in conversation (no path) | **ASK user for file path** with AskUserQuestion |11| User can't provide path | Extract style/palette verbally → append to prompt (NO frontmatter references) |1213**CRITICAL**: Only add `references` to prompt frontmatter if files are ACTUALLY SAVED to `refs/` directory.1415## File Saving1617**If user provides file path**:181. Copy to `refs/ref-NN-{slug}.{ext}` (NN = 01, 02, ...)192. **Only** create description file `refs/ref-NN-{slug}.md` when model does NOT support `--ref` (see below)203. Verify image file exists before proceeding2122**When to create description file**:2324| Situation | Action |25|-----------|--------|26| Model supports `--ref` (Google, OpenAI, OpenRouter, Replicate, Seedream 4.0+) | Copy image only. **No description file needed.** Pass via `--ref` at generation. |27| Model does NOT support `--ref` (Jimeng, Seedream 3.0) | Copy image + create description file. Embed description in prompt text. |2829**Description File Format** (only when needed):30```yaml31---32ref_id: NN33filename: ref-NN-{slug}.{ext}34usage: direct | style | palette35---36[Character or style description to embed in prompt]37```3839| Usage | When to Use |40|-------|-------------|41| `direct` | Model sees reference image directly; required if people must appear in output |42| `style` | Extract visual style only (not for people who must appear) |43| `palette` | Extract color scheme only |4445## Verbal Extraction (No File)4647When user can't provide file path:481. Analyze image visually, extract: colors, style, composition492. Create `refs/extracted-style.md` with extracted info503. DO NOT add `references` to prompt frontmatter514. Append extracted style/colors directly to prompt text5253## Deep Analysis ⚠️ CRITICAL5455References are high-priority inputs. Extract **specific, concrete, reproducible** elements:5657| Analysis | Description | Example (good vs bad) |58|----------|-------------|----------------------|59| **Brand elements** | Logos, wordmarks, specific typography | Good: "Logo uses vertical parallel lines for 'm'" / Bad: "Has a logo" |60| **Signature patterns** | Unique decorative motifs, textures | Good: "Woven intersecting curves forming diamond grid" / Bad: "Has patterns" |61| **Color palette** | Exact hex values for key colors | Good: "#2D4A3E dark teal, #F5F0E0 cream" / Bad: "Dark and light colors" |62| **Layout structure** | Specific spatial arrangement | Good: "Bottom 30% dark banner with branding" / Bad: "Has a banner" |63| **Typography** | Font style, weight, spacing, case | Good: "Uppercase, wide letter-spacing" / Bad: "Has text" |64| **Content/subject** | What the reference depicts | Factual description |65| **Usage recommendation** | `direct` / `style` / `palette` | Based on analysis |6667**Output format**: List each element as bullet that can be copy-pasted into prompt as mandatory instruction.6869### Character Analysis ⚠️ If Reference Contains People7071Use `usage: direct` so model sees the reference image. Additionally describe per character: **appearance**, **pose**, **clothing** → with **transformation rules** (stylize to match rendering).7273| Extract | Good | Bad |74|---------|------|-----|75| Appearance | "Woman: long wavy blonde hair, friendly smile" | "A woman" |76| Pose | "Standing, facing camera, confident posture" | "Standing" |77| Clothing | "Dark T-shirt, business casual" | "Formal" |78| Transform | "Flat-vector cartoon, keep hair color & clothing" | "Make cartoon" |7980Use `usage: direct`. Output each character as MUST/REQUIRED prompt instruction.8182## Verification Output8384**For saved files**:85```86Reference Images Saved:87- ref-01-{slug}.png ✓ (can use --ref)88- ref-02-{slug}.png ✓ (can use --ref)89```9091**For extracted style**:92```93Reference Style Extracted (no file):94- Colors: #E8756D coral, #7ECFC0 mint...95- Style: minimal flat vector, clean lines...96→ Will append to prompt text (not --ref)97```9899## Priority Rules100101When user provides references, they are **HIGH PRIORITY**:102103- **References override defaults**: If reference conflicts with preferred palette/rendering, reference takes precedence104- **Concrete > abstract**: Extract specific elements — not vague "clean style"105- **Mandatory language**: Use "MUST", "REQUIRED" in prompt for reference elements106- **Visible in output**: Verify elements are present after generation; strengthen prompt if not107