refactor(baoyu-article-illustrator): optimize SKILL.md from 197 to 150 lines

This commit is contained in:
Jim Liu 宝玉 2026-02-06 16:21:58 -06:00
parent b53a5db60a
commit 38a1b90db3
1 changed files with 51 additions and 98 deletions

View File

@ -11,55 +11,34 @@ Analyze articles, identify illustration positions, generate images with Type ×
| Dimension | Controls | Examples | | Dimension | Controls | Examples |
|-----------|----------|----------| |-----------|----------|----------|
| **Type** | Information structure, layout | infographic, scene, flowchart, comparison, framework, timeline | | **Type** | Information structure | infographic, scene, flowchart, comparison, framework, timeline |
| **Style** | Visual aesthetics, mood | notion, warm, minimal, blueprint, watercolor, elegant | | **Style** | Visual aesthetics | notion, warm, minimal, blueprint, watercolor, elegant |
Type × Style can be freely combined. Example: `--type infographic --style blueprint` Combine freely: `--type infographic --style blueprint`
## Illustration Purpose ## Types
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 | | Type | Best For |
|------|----------| |------|----------|
| `infographic` | Data, metrics, technical articles | | `infographic` | Data, metrics, technical |
| `scene` | Narratives, personal stories, emotional content | | `scene` | Narratives, emotional |
| `flowchart` | Tutorials, workflows, processes | | `flowchart` | Processes, workflows |
| `comparison` | Side-by-side, before/after, options | | `comparison` | Side-by-side, options |
| `framework` | Methodologies, models, architecture | | `framework` | Models, architecture |
| `timeline` | History, progress, evolution | | `timeline` | History, evolution |
## Styles ## Styles
See [references/styles.md](references/styles.md) for: See [references/styles.md](references/styles.md) for Core Styles, full gallery, and Type × Style compatibility.
- **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 ## Workflow
``` ```
Progress: - [ ] Step 1: Pre-check (EXTEND.md, references, config)
- [ ] Step 1: Pre-check - [ ] Step 2: Analyze content
- [ ] 1.5 Load preferences (EXTEND.md) ⛔ BLOCKING - [ ] Step 3: Confirm settings (AskUserQuestion)
- [ ] 1.0 Reference images ⚠️ (if provided) - [ ] Step 4: Generate outline
- [ ] 1.2-1.4 Config questions (1 AskUserQuestion, max 4 Qs) - [ ] Step 5: Generate images
- [ ] 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 6: Finalize
``` ```
@ -67,8 +46,6 @@ Progress:
**1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING** **1.5 Load Preferences (EXTEND.md) ⛔ BLOCKING**
**CRITICAL**: If EXTEND.md not found, MUST complete first-time setup before ANY other steps.
```bash ```bash
test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project" test -f .baoyu-skills/baoyu-article-illustrator/EXTEND.md && echo "project"
test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user" test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user"
@ -76,122 +53,98 @@ test -f "$HOME/.baoyu-skills/baoyu-article-illustrator/EXTEND.md" && echo "user"
| Result | Action | | Result | Action |
|--------|--------| |--------|--------|
| Found | Read, parse, display summary → Continue | | Found | Read, parse, display summary |
| Not found | ⛔ Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) | | 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](references/workflow.md#step-1-pre-check) Full procedures: [references/workflow.md](references/workflow.md#step-1-pre-check)
--- ### Step 2: Analyze
### Step 2: Setup & Analyze | Analysis | Output |
|----------|--------|
| Analysis | Description |
|----------|-------------|
| Content type | Technical / Tutorial / Methodology / Narrative | | Content type | Technical / Tutorial / Methodology / Narrative |
| Illustration purpose | information / visualization / imagination | | Purpose | information / visualization / imagination |
| Core arguments | 2-5 main points to visualize | | Core arguments | 2-5 main points |
| Visual opportunities | Positions where illustrations add value | | Positions | Where illustrations add value |
**CRITICAL**: If article uses metaphors, do NOT illustrate literally. Visualize the **underlying concept**. **CRITICAL**: Metaphors → visualize underlying concept, NOT literal image.
Full procedures: [references/workflow.md](references/workflow.md#step-2-setup--analyze) Full procedures: [references/workflow.md](references/workflow.md#step-2-setup--analyze)
---
### Step 3: Confirm Settings ⚠️ ### Step 3: Confirm Settings ⚠️
**Do NOT skip.** Use ONE AskUserQuestion call with max 4 questions. **Q1, Q2, Q3 are ALL REQUIRED.** **ONE AskUserQuestion, max 4 Qs. Q1-Q3 REQUIRED.**
| Question | Options | | Q | Options |
|----------|---------| |---|---------|
| **Q1: Type** ⚠️ | [Recommended], infographic, scene, flowchart, comparison, framework, timeline, mixed | | **Q1: Type** | [Recommended], infographic, scene, flowchart, comparison, framework, timeline, mixed |
| **Q2: Density** ⚠️ | minimal (1-2), balanced (3-5), per-section (Recommended), rich (6+) | | **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 | | **Q3: Style** | [Recommended], minimal-flat, sci-fi, hand-drawn, editorial, scene, Other |
| **Q4: Language** | When article language ≠ EXTEND.md setting | | Q4: Language | When article language ≠ EXTEND.md setting |
Full procedures: [references/workflow.md](references/workflow.md#step-3-confirm-settings-) Full procedures: [references/workflow.md](references/workflow.md#step-3-confirm-settings-)
---
### Step 4: Generate Outline ### Step 4: Generate Outline
Save as `outline.md` with frontmatter (type, density, style, image_count, references) and illustration entries: Save `outline.md` with frontmatter (type, density, style, image_count) and entries:
```yaml ```yaml
## Illustration 1 ## Illustration 1
**Position**: [section] / [paragraph] **Position**: [section/paragraph]
**Purpose**: [why this helps] **Purpose**: [why]
**Visual Content**: [what to show] **Visual Content**: [what]
**Filename**: 01-infographic-concept-name.png **Filename**: 01-infographic-concept-name.png
``` ```
Full template: [references/workflow.md](references/workflow.md#step-4-generate-outline) Full template: [references/workflow.md](references/workflow.md#step-4-generate-outline)
---
### Step 5: Generate Images ### Step 5: Generate Images
1. **Create Prompts**: Follow [references/prompt-construction.md](references/prompt-construction.md) 1. Create prompts per [references/prompt-construction.md](references/prompt-construction.md)
2. **Select Generation Skill**: Check available skills 2. Select generation skill from available skills
3. **Process References**: Handle `direct`/`style`/`palette` usage 3. Process references (`direct`/`style`/`palette`)
4. **Apply Watermark**: If enabled in EXTEND.md 4. Apply watermark if EXTEND.md enabled
5. **Generate**: Sequential, retry once on failure 5. Generate sequentially, retry once on failure
Full procedures: [references/workflow.md](references/workflow.md#step-5-generate-images) Full procedures: [references/workflow.md](references/workflow.md#step-5-generate-images)
---
### Step 6: Finalize ### Step 6: Finalize
**Update Article**: Insert `![description](path/NN-{type}-{slug}.png)` after corresponding paragraphs. Insert `![description](path/NN-{type}-{slug}.png)` after paragraphs.
**Output Summary**:
``` ```
Article Illustration Complete! Article Illustration Complete!
Article: [path] | Type: [type] | Density: [level] | Style: [style] Article: [path] | Type: [type] | Density: [level] | Style: [style]
Images: X/N generated Images: X/N generated
Positions:
- 01-xxx.png → After "[Section]"
``` ```
---
## Output Directory ## Output Directory
``` ```
illustrations/{topic-slug}/ illustrations/{topic-slug}/
├── source-{slug}.{ext} ├── source-{slug}.{ext}
├── references/ # Only if references provided ├── references/ # if provided
│ └── NN-ref-{slug}.png
├── outline.md ├── outline.md
├── prompts/ ├── prompts/
│ └── illustration-{slug}.md
└── NN-{type}-{slug}.png └── NN-{type}-{slug}.png
``` ```
**Slug**: 2-4 word topic in kebab-case. **Slug**: 2-4 words, kebab-case. **Conflict**: append `-YYYYMMDD-HHMMSS`.
**Conflict**: Append `-YYYYMMDD-HHMMSS` if exists.
## Modification ## Modification
| Action | Steps | | Action | Steps |
|--------|-------| |--------|-------|
| **Edit** | Update prompt file FIRST → Regenerate → Update reference | | Edit | Update prompt → Regenerate → Update reference |
| **Add** | Identify position → Create prompt → Generate → Update outline → Insert | | Add | Position → Prompt → Generate → Update outline → Insert |
| **Delete** | Delete files → Remove reference → Update outline | | Delete | Delete files → Remove reference → Update outline |
## References ## References
| File | Content | | File | Content |
|------|---------| |------|---------|
| [references/workflow.md](references/workflow.md) | Detailed workflow procedures | | [references/workflow.md](references/workflow.md) | Detailed procedures |
| [references/usage.md](references/usage.md) | Command syntax and options | | [references/usage.md](references/usage.md) | Command syntax |
| [references/styles.md](references/styles.md) | Style gallery & compatibility | | [references/styles.md](references/styles.md) | Style gallery |
| [references/prompt-construction.md](references/prompt-construction.md) | Prompt templates | | [references/prompt-construction.md](references/prompt-construction.md) | Prompt templates |
| `references/styles/<style>.md` | Full style specifications | | [references/config/first-time-setup.md](references/config/first-time-setup.md) | First-time setup |
| `references/config/preferences-schema.md` | EXTEND.md schema |
| `references/config/first-time-setup.md` | First-time setup flow |