diff --git a/skills/baoyu-article-illustrator/SKILL.md b/skills/baoyu-article-illustrator/SKILL.md index 0449402..133fcf5 100644 --- a/skills/baoyu-article-illustrator/SKILL.md +++ b/skills/baoyu-article-illustrator/SKILL.md @@ -16,6 +16,16 @@ Analyze articles, identify illustration positions, generate images with Type × Type × Style can be freely combined. Example: `--type infographic --style blueprint` +## Illustration Purpose + +Auto-detected during content analysis. Influences type/style recommendations. + +| Purpose | Description | Best Types | +|---------|-------------|------------| +| **information** | Help understand abstract concepts | infographic, flowchart, comparison | +| **visualization** | Turn abstract ideas into concrete visuals | framework, comparison, infographic | +| **imagination** | Create atmosphere, spark imagination | scene, timeline | + ## Type Gallery | Type | Best For | @@ -27,45 +37,21 @@ Type × Style can be freely combined. Example: `--type infographic --style bluep | `framework` | Methodologies, models, architecture | | `timeline` | History, progress, evolution | -## Style Gallery +## Styles -| Style | Best For | -|-------|----------| -| `notion` (Default) | Knowledge sharing, SaaS, productivity | -| `elegant` | Business, thought leadership | -| `warm` | Personal growth, lifestyle, education | -| `minimal` | Philosophy, core concepts | -| `blueprint` | Architecture, system design | -| `watercolor` | Lifestyle, travel, creative | -| `editorial` | Tech explainers, journalism | -| `scientific` | Academic, technical research | - -Full styles: [references/styles.md](references/styles.md) - -## Auto Selection - -| Content Signals | Type | Style | -|-----------------|------|-------| -| API, metrics, data, numbers | infographic | blueprint, notion | -| Story, emotion, journey | scene | warm, watercolor | -| How-to, steps, workflow | flowchart | notion, minimal | -| vs, pros/cons, before/after | comparison | notion, elegant | -| Framework, model, architecture | framework | blueprint, notion | -| History, timeline, progress | timeline | elegant, warm | +See [references/styles.md](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 -Copy this checklist and track progress: - ``` Progress: - [ ] Step 1: Pre-check - - [ ] 1.5 Check preferences (EXTEND.md) ⛔ BLOCKING - - [ ] Found → load preferences → continue - - [ ] Not found → run first-time setup → MUST complete before other steps + - [ ] 1.5 Load preferences (EXTEND.md) ⛔ BLOCKING - [ ] 1.0 Reference images ⚠️ (if provided) - - [ ] File path given → saved to references/ ✓ - - [ ] No path → asked user OR extracted verbally - [ ] 1.2-1.4 Config questions (1 AskUserQuestion, max 4 Qs) - [ ] Step 2: Setup & Analyze - [ ] Step 3: Confirm Settings (1 AskUserQuestion, max 4 Qs) @@ -74,97 +60,14 @@ Progress: - [ ] Q3: Style ⚠️ - [ ] Step 4: Generate Outline - [ ] Step 5: Generate Images - - [ ] 5.1 Prompts created (references in frontmatter ONLY if files exist) - - [ ] 5.3 References verified before generation - [ ] Step 6: Finalize ``` ---- - ### Step 1: Pre-check -**1.0 Detect & Save Reference Images** ⚠️ REQUIRED if images provided - -Check if user provided reference images. Handle based on input type: - -| Input Type | Action | -|------------|--------| -| Image file path provided | Copy to `references/` subdirectory → can use `--ref` | -| Image in conversation (no path) | **ASK user for file path** with AskUserQuestion | -| User can't provide path | Extract style/palette verbally → append to prompts (NO frontmatter references) | - -**CRITICAL**: Only add `references` to prompt frontmatter if files are ACTUALLY SAVED to `references/` directory. - -**If user provides file path**: -1. Copy to `references/NN-ref-{slug}.png` -2. Create description: `references/NN-ref-{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 `references/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: NN-ref-{slug}.png ---- -[User's description or auto-generated description] -``` - -**Verification** (only for saved files): -``` -Reference Images Saved: -- 01-ref-{slug}.png ✓ (can use --ref) -- 02-ref-{slug}.png ✓ (can use --ref) -``` - -**Or for extracted style**: -``` -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 Determine Input Type** - -| Input | Output Directory | Next | -|-------|------------------|------| -| File path | Ask user (1.2) | → 1.2 | -| Pasted content | `illustrations/{topic-slug}/` | → 1.4 | - -**Backup rule for pasted content**: If `source.md` exists in target directory, rename to `source-backup-YYYYMMDD-HHMMSS.md` before saving. - -**1.2-1.4 Configuration** (file path input only) - -Check preferences and existing state, then ask ALL needed questions in ONE AskUserQuestion call (max 4 questions). - -**Questions to include** (skip if preference exists or not applicable): - -| Question | When to Ask | Options | -|----------|-------------|---------| -| Output directory | No `default_output_dir` in EXTEND.md | `{article-dir}/`, `{article-dir}/imgs/` (Recommended), `{article-dir}/illustrations/`, `illustrations/{topic-slug}/` | -| Existing images | Target dir has `.png/.jpg/.webp` files | `supplement`, `overwrite`, `regenerate` | -| Article update | Always (file path input) | `update`, `copy` | - -**Preference Values** (if configured, skip asking): - -| `default_output_dir` | Path | -|----------------------|------| -| `same-dir` | `{article-dir}/` | -| `imgs-subdir` | `{article-dir}/imgs/` | -| `illustrations-subdir` | `{article-dir}/illustrations/` | -| `independent` | `illustrations/{topic-slug}/` | - **1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING** -**CRITICAL**: If EXTEND.md not found, MUST complete first-time setup before ANY other questions or steps. Do NOT proceed to reference images, do NOT ask about content, do NOT ask about type/style — ONLY complete the preferences setup first. +**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" @@ -174,63 +77,28 @@ test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user" | Result | Action | |--------|--------| | Found | Read, parse, display summary → Continue | -| Not found | ⛔ **BLOCKING**: Run first-time setup ONLY ([references/config/first-time-setup.md](references/config/first-time-setup.md)) → Complete and save EXTEND.md → Then continue | +| Not found | ⛔ Run first-time setup ([references/config/first-time-setup.md](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](references/workflow.md#step-1-pre-check) + --- ### Step 2: Setup & Analyze -**2.1 Analyze Content** - | Analysis | Description | |----------|-------------| | Content type | Technical / Tutorial / Methodology / Narrative | +| Illustration purpose | information / visualization / imagination | | Core arguments | 2-5 main points to visualize | | Visual opportunities | Positions where illustrations add value | -| Recommended type | Based on content signals | -| Recommended density | Based on length and complexity | -**2.2 Extract Core Arguments** +**CRITICAL**: If article uses metaphors, do NOT illustrate literally. Visualize the **underlying concept**. -- Main thesis -- Key concepts reader needs -- Comparisons/contrasts -- Framework/model proposed - -**CRITICAL**: If article uses metaphors (e.g., "电锯切西瓜"), do NOT illustrate literally. Visualize the **underlying concept**. - -**2.3 Identify Positions** - -**Illustrate**: -- Core arguments (REQUIRED) -- Abstract concepts -- Data comparisons -- Processes, workflows - -**Do NOT Illustrate**: -- Metaphors literally -- Decorative scenes -- Generic illustrations - -**2.4 Analyze Reference Images** (if provided in Step 1.0) - -For each reference image: - -| Analysis | Description | -|----------|-------------| -| Visual characteristics | Style, colors, composition | -| Content/subject | What the reference depicts | -| Suitable positions | Which sections match this reference | -| Style match | Which illustration types/styles align | -| Usage recommendation | `direct` / `style` / `palette` | - -| Usage | When to Use | -|-------|-------------| -| `direct` | Reference matches desired output closely | -| `style` | Extract visual style characteristics only | -| `palette` | Extract color scheme only | +Full procedures: [references/workflow.md](references/workflow.md#step-2-setup--analyze) --- @@ -238,185 +106,56 @@ For each reference image: **Do NOT skip.** Use ONE AskUserQuestion call with max 4 questions. **Q1, Q2, Q3 are ALL REQUIRED.** -**Q1: Illustration Type** ⚠️ REQUIRED -- [Recommended based on analysis] (Recommended) -- infographic / scene / flowchart / comparison / framework / timeline / mixed +| Question | Options | +|----------|---------| +| **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: Language** | When article language ≠ EXTEND.md setting | -**Q2: Density** ⚠️ REQUIRED - DO NOT SKIP -- minimal (1-2) - Core concepts only -- balanced (3-5) - Major sections -- per-section - At least 1 per section/chapter (Recommended) -- rich (6+) - Comprehensive coverage - -**Q3: Style** ⚠️ REQUIRED (ALWAYS ask, even with preferred_style in EXTEND.md) - -If EXTEND.md has `preferred_style`: -- [Custom style name + brief description] (Recommended) -- [Top compatible built-in style 1] -- [Top compatible built-in style 2] -- [Top compatible built-in style 3] - -If no `preferred_style`: -- [Best compatible from matrix] (Recommended) -- [Other ✓✓ style 1] -- [Other ✓✓ style 2] -- [Other ✓ style] - -Style selection based on Type × Style compatibility matrix (references/styles.md). -Full specs: `references/styles/