
Baoyu Comic
- 40 installs
- 1 repo stars
- Updated February 21, 2026
- jackiexiao/jackie-skills-starter
Creates comic-style illustrations from a topic or story with configurable art style, tone, layout and aspect ratio.
About
Generates knowledge comics by combining art styles, moods and panel layouts from source content. A developer uses it to turn an article or story into an illustrated comic.
- Art x tone x layout options (ligne-claire, manga, cinematic, webtoon)
- Accepts a source file or pasted content
Baoyu Comic by the numbers
- 40 all-time installs (skills.sh)
- Ranked #929 of 1,337 Generative Media skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jackiexiao/jackie-skills-starter --skill baoyu-comicAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 40 |
|---|---|
| repo stars | ★ 1 |
| Last updated | February 21, 2026 |
| Repository | jackiexiao/jackie-skills-starter ↗ |
What it does
Creates comic-style illustrations from a topic or story with configurable art style, tone, layout and aspect ratio.
Files
Knowledge Comic Creator
Create original knowledge comics with flexible art style × tone combinations.
Usage
/baoyu-comic posts/turing-story/source.md
/baoyu-comic article.md --art manga --tone warm
/baoyu-comic # then paste contentOptions
Visual Dimensions
| Option | Values | Description |
|---|---|---|
--art | ligne-claire (default), manga, realistic, ink-brush, chalk | Art style / rendering technique |
--tone | neutral (default), warm, dramatic, romantic, energetic, vintage, action | Mood / atmosphere |
--layout | standard (default), cinematic, dense, splash, mixed, webtoon | Panel arrangement |
--aspect | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) | Page aspect ratio |
--lang | auto (default), zh, en, ja, etc. | Output language |
Partial Workflow Options
| Option | Description |
|---|---|
--storyboard-only | Generate storyboard only, skip prompts and images |
--prompts-only | Generate storyboard + prompts, skip images |
--images-only | Generate images from existing prompts directory |
--regenerate N | Regenerate specific page(s) only (e.g., 3 or 2,5,8) |
Details: references/partial-workflows.md
Art Styles (画风)
| Style | 中文 | Description |
|---|---|---|
ligne-claire | 清线 | Uniform lines, flat colors, European comic tradition (Tintin, Logicomix) |
manga | 日漫 | Large eyes, manga conventions, expressive emotions |
realistic | 写实 | Digital painting, realistic proportions, sophisticated |
ink-brush | 水墨 | Chinese brush strokes, ink wash effects |
chalk | 粉笔 | Chalkboard aesthetic, hand-drawn warmth |
Tones (基调)
| Tone | 中文 | Description |
|---|---|---|
neutral | 中性 | Balanced, rational, educational |
warm | 温馨 | Nostalgic, personal, comforting |
dramatic | 戏剧 | High contrast, intense, powerful |
romantic | 浪漫 | Soft, beautiful, decorative elements |
energetic | 活力 | Bright, dynamic, exciting |
vintage | 复古 | Historical, aged, period authenticity |
action | 动作 | Speed lines, impact effects, combat |
Preset Shortcuts
Presets with special rules beyond art+tone:
| Preset | Equivalent | Special Rules |
|---|---|---|
--style ohmsha | --art manga --tone neutral | Visual metaphors, NO talking heads, gadget reveals |
--style wuxia | --art ink-brush --tone action | Qi effects, combat visuals, atmospheric elements |
--style shoujo | --art manga --tone romantic | Decorative elements, eye details, romantic beats |
Compatibility Matrix
| Art Style | ✓✓ Best | ✓ Works | ✗ Avoid |
|---|---|---|---|
| ligne-claire | neutral, warm | dramatic, vintage, energetic | romantic, action |
| manga | neutral, romantic, energetic, action | warm, dramatic | vintage |
| realistic | neutral, warm, dramatic, vintage | action | romantic, energetic |
| ink-brush | neutral, dramatic, action, vintage | warm | romantic, energetic |
| chalk | neutral, warm, energetic | vintage | dramatic, action, romantic |
Details: references/auto-selection.md
Auto Selection
Content signals determine default art + tone + layout (or preset):
| Content Signals | Recommended |
|---|---|
| Tutorial, how-to, programming, educational | ohmsha preset |
| Pre-1950, classical, ancient | realistic + vintage |
| Personal story, mentor | ligne-claire + warm |
| Martial arts, wuxia | wuxia preset |
| Romance, school life | shoujo preset |
| Biography, balanced | ligne-claire + neutral |
When preset is recommended: Load references/presets/{preset}.md and apply all special rules.
Details: references/auto-selection.md
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions: 1. Determine this SKILL.md file's directory path as SKILL_DIR 2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts 3. Replace all ${SKILL_DIR} in this document with the actual path
Script Reference:
| Script | Purpose |
|---|---|
scripts/merge-to-pdf.ts | Merge comic pages into PDF |
File Structure
Output directory: comic/{topic-slug}/
- Slug: 2-4 words kebab-case from topic (e.g.,
alan-turing-bio) - Conflict: append timestamp (e.g.,
turing-story-20260118-143052)
Contents:
| File | Description |
|---|---|
source-{slug}.{ext} | Source files |
analysis.md | Content analysis |
storyboard.md | Storyboard with panel breakdown |
characters/characters.md | Character definitions |
characters/characters.png | Character reference sheet |
| `prompts/NN-{cover\ | page}-[slug].md` |
| `NN-{cover\ | page}-[slug].png` |
{topic-slug}.pdf | Final merged PDF |
Language Handling
Detection Priority: 1. --lang flag (explicit) 2. EXTEND.md language setting 3. User's conversation language 4. Source content language
Rule: Use user's input language or saved language preference for ALL interactions:
- Storyboard outlines and scene descriptions
- Image generation prompts
- User selection options and confirmations
- Progress updates, questions, errors, summaries
Technical terms remain in English.
Workflow
Progress Checklist
Comic Progress:
- [ ] Step 1: Setup & Analyze
- [ ] 1.1 Preferences (EXTEND.md) ⛔ BLOCKING
- [ ] Found → load preferences → continue
- [ ] Not found → run first-time setup → MUST complete before other steps
- [ ] 1.2 Analyze, 1.3 Check existing
- [ ] Step 2: Confirmation - Style & options ⚠️ REQUIRED
- [ ] Step 3: Generate storyboard + characters
- [ ] Step 4: Review outline (conditional)
- [ ] Step 5: Generate prompts
- [ ] Step 6: Review prompts (conditional)
- [ ] Step 7: Generate images ⚠️ CHARACTER REF REQUIRED
- [ ] 7.1 Generate character sheet FIRST → characters/characters.png
- [ ] 7.2 Generate pages WITH --ref characters/characters.png
- [ ] Step 8: Merge to PDF
- [ ] Step 9: Completion reportFlow
Input → [Preferences] ─┬─ Found → Continue
│
└─ Not found → First-Time Setup ⛔ BLOCKING
│
└─ Complete setup → Save EXTEND.md → Continue
│
┌─────────────────────────────────────────────────────────────────────┘
↓
Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard → [Review?] → Prompts → [Review?] → Images → PDF → CompleteStep Summary
| Step | Action | Key Output |
|---|---|---|
| 1.1 | Load EXTEND.md preferences ⛔ BLOCKING if not found | Config loaded |
| 1.2 | Analyze content | analysis.md |
| 1.3 | Check existing directory | Handle conflicts |
| 2 | Confirm style, focus, audience, reviews | User preferences |
| 3 | Generate storyboard + characters | storyboard.md, characters/ |
| 4 | Review outline (if requested) | User approval |
| 5 | Generate prompts | prompts/*.md |
| 6 | Review prompts (if requested) | User approval |
| 7.1 | Generate character sheet FIRST | characters/characters.png |
| 7.2 | Generate pages with character ref | *.png files |
| 8 | Merge to PDF | {slug}.pdf |
| 9 | Completion report | Summary |
Step 7: Image Generation ⚠️ CRITICAL
Character reference is MANDATORY for visual consistency.
7.1 Generate character sheet first:
- Backup rule: If
characters/characters.pngexists, rename tocharacters/characters-backup-YYYYMMDD-HHMMSS.png
# Use Reference Sheet Prompt from characters/characters.md
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
--promptfiles characters/characters.md \
--image characters/characters.png --ar 4:3Compress character sheet (recommended): Compress to reduce token usage when used as reference image:
- Use available image compression skill (if any)
- Or system tools:
pngquant,optipng,sips(macOS) - Keep PNG format, lossless compression preferred
7.2 Generate each page WITH character reference:
| Skill Capability | Strategy |
|---|---|
Supports --ref | Pass characters/characters.png with EVERY page |
No --ref support | Prepend character descriptions to EVERY prompt file |
Backup rules for page generation:
- If prompt file exists: rename to
prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md - If image file exists: rename to
NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png
# Example: ALWAYS include --ref for consistency
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
--promptfiles prompts/01-page-xxx.md \
--image 01-page-xxx.png --ar 3:4 \
--ref characters/characters.pngFull workflow details: references/workflow.md
EXTEND.md Paths ⛔ BLOCKING
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 art style, do NOT ask about tone — ONLY complete the preferences setup first.
| Path | Location |
|---|---|
.baoyu-skills/baoyu-comic/EXTEND.md | Project directory |
$HOME/.baoyu-skills/baoyu-comic/EXTEND.md | User home |
| Result | Action |
|---|---|
| Found | Read, parse, display summary → Continue |
| Not found | ⛔ BLOCKING: Run first-time setup ONLY (references/config/first-time-setup.md) → Complete and save EXTEND.md → Then continue |
EXTEND.md Supports: Watermark | Preferred art/tone/layout | Custom style definitions | Character presets | Language preference
Schema: references/config/preferences-schema.md
References
Core Templates:
- analysis-framework.md - Deep content analysis
- character-template.md - Character definition format
- storyboard-template.md - Storyboard structure
- ohmsha-guide.md - Ohmsha manga specifics
Style Definitions:
references/art-styles/- Art styles (ligne-claire, manga, realistic, ink-brush, chalk)references/tones/- Tones (neutral, warm, dramatic, romantic, energetic, vintage, action)references/presets/- Presets with special rules (ohmsha, wuxia, shoujo)references/layouts/- Layouts (standard, cinematic, dense, splash, mixed, webtoon)
Workflow:
- workflow.md - Full workflow details
- auto-selection.md - Content signal analysis
- partial-workflows.md - Partial workflow options
Config:
- config/preferences-schema.md - EXTEND.md schema
- config/first-time-setup.md - First-time setup
- config/watermark-guide.md - Watermark configuration
Page Modification
| Action | Steps |
|---|---|
| Edit | Update prompt file FIRST → --regenerate N → Regenerate PDF |
| Add | Create prompt at position → Generate with character ref → Renumber subsequent → Update storyboard → Regenerate PDF |
| Delete | Remove files → Renumber subsequent → Update storyboard → Regenerate PDF |
IMPORTANT: When updating pages, ALWAYS update the prompt file (prompts/NN-{cover|page}-[slug].md) FIRST before regenerating. This ensures changes are documented and reproducible.
Notes
- Image generation: 10-30 seconds per page
- Auto-retry once on generation failure
- Use stylized alternatives for sensitive public figures
- Maintain style consistency via session ID
- Step 2 confirmation required - do not skip
- Steps 4/6 conditional - only if user requested in Step 2
- Step 7.1 character sheet MUST be generated before pages - ensures consistency
- Step 7.2 EVERY page MUST reference characters - use
--refor embed descriptions - Watermark/language configured once in EXTEND.md
Comic Content Analysis Framework
Deep analysis framework for transforming source content into effective visual storytelling.
Purpose
Before creating a comic, thoroughly analyze the source material to:
- Identify the target audience and their needs
- Determine what value the comic will deliver
- Extract narrative potential for visual storytelling
- Plan character arcs and key moments
Analysis Dimensions
1. Core Content (Understanding "What")
Central Message
- What is the single most important idea readers should take away?
- Can you express it in one sentence?
Key Concepts
- What are the essential concepts readers must understand?
- How should these concepts be visualized?
- Which concepts need simplified explanations?
Content Structure
- How is the source material organized?
- What is the natural narrative arc?
- Where are the climax and turning points?
Evidence & Examples
- What concrete examples, data, or stories support the main ideas?
- Which examples translate well to visual panels?
- What can be shown rather than told?
2. Context & Background (Understanding "Why")
Source Origin
- Who created this content? What is their perspective?
- What was the original purpose?
- Is there bias to be aware of?
Historical/Cultural Context
- When and where does the story take place?
- What background knowledge do readers need?
- What period-specific visual elements are required?
Underlying Assumptions
- What does the source assume readers already know?
- What implicit beliefs or values are present?
- Should the comic challenge or reinforce these?
3. Audience Analysis
Primary Audience
- Who will read this comic?
- What is their existing knowledge level?
- What are their interests and motivations?
Secondary Audiences
- Who else might benefit from this comic?
- How might their needs differ?
Reader Questions
- What questions will readers have?
- What misconceptions might they bring?
- What "aha moments" can we create?
4. Value Proposition
Knowledge Value
- What will readers learn?
- What new perspectives will they gain?
- How will this change their understanding?
Emotional Value
- What emotions should readers feel?
- What connections will they make with characters?
- What will make this memorable?
Practical Value
- Can readers apply what they learn?
- What actions might this inspire?
- What conversations might it spark?
5. Narrative Potential
Story Arc Candidates
- What natural narratives exist in the content?
- Where is the conflict or tension?
- What transformations occur?
Character Potential
- Who are the key figures?
- What are their motivations and obstacles?
- How do they change throughout?
Visual Opportunities
- What scenes have strong visual potential?
- Where can abstract concepts become concrete images?
- What metaphors can be visualized?
Dramatic Moments
- What are the breakthrough/revelation moments?
- Where are the emotional peaks?
- What creates tension and release?
6. Adaptation Considerations
What to Keep
- Essential facts and ideas
- Key quotes or moments
- Core emotional beats
What to Simplify
- Complex explanations
- Dense technical details
- Lengthy descriptions
What to Expand
- Brief mentions that deserve more attention
- Implied emotions or relationships
- Visual details not in source
What to Omit
- Tangential information
- Redundant examples
- Content that doesn't serve the narrative
Output Format
Analysis results should be saved to analysis.md with:
1. YAML Front Matter: Metadata (title, topic, time_span, source_language, user_language, aspect_ratio, recommended_page_count, recommended_art, recommended_tone, recommended_layout) 2. Target Audience: Primary, secondary, tertiary audiences with their needs 3. Value Proposition: What readers will gain (knowledge, emotional, practical) 4. Core Themes: Table with theme, narrative potential, visual opportunity 5. Key Figures & Story Arcs: Character profiles with arcs, visual identity, key moments 6. Content Signals: Style and layout recommendations based on content type 7. Recommended Approaches: Narrative approaches ranked by suitability
YAML Front Matter Example
---
title: "Alan Turing: The Father of Computing"
topic: alan-turing-biography
time_span: 1912-1954
source_language: en
user_language: zh # From EXTEND.md or detected
aspect_ratio: "3:4"
recommended_page_count: 16
recommended_art: ligne-claire # ligne-claire|manga|realistic|ink-brush|chalk
recommended_tone: neutral # neutral|warm|dramatic|romantic|energetic|vintage|action
recommended_layout: mixed # standard|cinematic|dense|splash|mixed|webtoon
---Language Fields
| Field | Description |
|---|---|
source_language | Detected language of source content |
user_language | Output language for comic (from EXTEND.md > --lang > source_language) |
Analysis Checklist
Before proceeding to storyboard:
- [ ] Can I state the core message in one sentence?
- [ ] Do I know exactly who will read this comic?
- [ ] Have I identified at least 3 ways this comic provides value?
- [ ] Are there clear protagonists with compelling arcs?
- [ ] Have I found at least 5 visually powerful moments?
- [ ] Do I understand what to keep, simplify, expand, and omit?
- [ ] Have I identified the emotional peaks and valleys?
chalk
粉笔画风 - Chalkboard aesthetic with hand-drawn warmth
Overview
Classic classroom chalkboard aesthetic with hand-drawn chalk illustrations. Nostalgic educational feel with imperfect, sketchy lines that capture the warmth of traditional teaching.
Line Work
- Sketchy, imperfect hand-drawn lines
- Chalk texture on all strokes
- Varying line weight from chalk pressure
- Soft edges, no sharp digital lines
- Visible chalk dust effects
Character Design
- Simplified, friendly character designs
- Stick figures to semi-detailed range
- Expressive through simple gestures
- Approachable, non-intimidating
- Educational presenter style
Background
- Chalkboard Black (#1A1A1A) or Dark Green-Black (#1C2B1C)
- Realistic chalkboard texture
- Subtle scratches and dust particles
- Faint eraser marks for authenticity
- Wooden frame border optional
Typography
- Hand-drawn chalk lettering style
- Visible chalk texture on text
- Imperfect baseline adds authenticity
- White or bright colored chalk for emphasis
Visual Elements
- Hand-drawn chalk illustrations
- Chalk dust effects around elements
- Doodles: stars, arrows, underlines, circles
- Mathematical formulas and diagrams
- Eraser smudges and chalk residue
- Stick figures and simple icons
- Connection lines with hand-drawn feel
Default Color Palette
| Role | Color | Hex |
|---|---|---|
| Background | Chalkboard Black | #1A1A1A |
| Alt Background | Green-Black | #1C2B1C |
| Primary Text | Chalk White | #F5F5F5 |
| Accent 1 | Chalk Yellow | #FFE566 |
| Accent 2 | Chalk Pink | #FF9999 |
| Accent 3 | Chalk Blue | #66B3FF |
| Accent 4 | Chalk Green | #90EE90 |
| Accent 5 | Chalk Orange | #FFB366 |
Style Rules
Do
- Maintain authentic chalk texture on all elements
- Use imperfect, hand-drawn quality throughout
- Add subtle chalk dust and smudge effects
- Create visual hierarchy with color variety
- Include playful doodles and annotations
Don't
- Use perfect geometric shapes
- Create clean digital-looking lines
- Add photorealistic elements
- Use gradients or glossy effects
Quality Markers
- ✓ Authentic chalk texture throughout
- ✓ Imperfect, hand-drawn quality
- ✓ Readable despite sketchy style
- ✓ Nostalgic classroom feel
- ✓ Effective color hierarchy
- ✓ Playful educational aesthetic
Compatibility
| Tone | Fit | Notes |
|---|---|---|
| neutral | ✓✓ | Classic educational |
| warm | ✓✓ | Nostalgic feel |
| dramatic | ✗ | Style mismatch |
| vintage | ✓ | Old school feel |
| romantic | ✗ | Style mismatch |
| energetic | ✓✓ | Fun learning |
| action | ✗ | Style mismatch |
Best For
Educational content, tutorials, classroom themes, teaching materials, workshops, informal learning, knowledge sharing
ink-brush
水墨画风 - Chinese ink brush aesthetics with dynamic strokes
Overview
Traditional Chinese ink brush painting style adapted for comics. Combines calligraphic brush strokes with ink wash effects. Creates atmospheric, artistic visuals rooted in East Asian aesthetics.
Line Work
- 2-3px dynamic brush strokes with varying weight
- Ink wash effects, traditional Chinese brush feel
- Bold, confident strokes with sharp edges
- Flowing lines for fabric and hair
- Pressure-sensitive stroke variation
Character Design
- Realistic human proportions (7.5-8 head heights)
- Defined features with ink brush definition
- Dynamic poses capturing movement
- Flowing hair and clothing in motion
- Traditional attire options (robes, hanfu)
- Intense, expressive faces
Brush Techniques
| Technique | Usage |
|---|---|
| Bold strokes | Character outlines |
| Fine lines | Details, hair |
| Ink wash | Atmosphere, shadows |
| Dry brush | Texture, aging |
| Splatter | Impact, drama |
Background Treatment
- Dramatic landscapes: mountains, waterfalls, temples
- Ink wash atmospheric effects
- Misty, layered depth
- Traditional architecture elements
- High contrast silhouettes
- Negative space as design element
Color Approach
- Ink gradients as primary
- Limited accent colors
- Traditional Chinese palette
- Atmospheric color washes
- High contrast compositions
Default Color Palette
| Role | Color | Hex |
|---|---|---|
| Primary | Deep black ink | #1A1A1A |
| Accent | Crimson red | #8B0000 |
| Accent | Imperial gold | #D4AF37 |
| Skin | Natural tan | #D4A574 |
| Background | Misty gray | #9CA3AF |
| Background | Earth tone | #8B7355 |
| Wash | Ink gradient | #2D3748 |
Visual Elements
- Calligraphic text integration
- Seal stamps (optional)
- Ink splatter effects
- Flowing fabric trails
- Atmospheric mist
- Mountain silhouettes
Quality Markers
- ✓ Dynamic brush stroke quality
- ✓ Authentic ink wash atmosphere
- ✓ High contrast compositions
- ✓ Flowing movement in fabric/hair
- ✓ Traditional aesthetic elements
- ✓ Atmospheric depth
Compatibility
| Tone | Fit | Notes |
|---|---|---|
| neutral | ✓ | Contemplative stories |
| warm | ✓ | Nostalgic, gentle |
| dramatic | ✓✓ | High contrast |
| vintage | ✓✓ | Historical pieces |
| romantic | ✗ | Style mismatch |
| energetic | ✗ | Too refined |
| action | ✓✓ | Martial arts |
Best For
Chinese historical stories, martial arts, traditional tales, contemplative narratives, artistic adaptations
ligne-claire
清线画风 - Uniform lines, flat colors, European comic tradition
Overview
Classic European comic style originating from Hergé's Tintin. Characterized by clean, uniform outlines and flat color fills without gradients. Creates a timeless, accessible aesthetic suitable for educational and narrative content.
Line Work
- Uniform, clean outlines with consistent weight (2px)
- No hatching or cross-hatching for shading
- Sharp, precise edges on all elements
- Black ink outlines on all figures and objects
- Shadows indicated through flat color areas, not line techniques
Character Design
- Slightly stylized/cartoonish characters with realistic proportions
- Distinctive, recognizable facial features
- Expressive faces with clear emotions
- Period-appropriate clothing with attention to detail
- Consistent character appearance across panels
- 6-7 head height proportions
Background Treatment
- Detailed, realistic backgrounds with architectural accuracy
- Period-specific props and technology
- Clear spatial depth and perspective
- Environmental storytelling through details
- Contrast between simplified characters and detailed backgrounds
Color Approach
- Flat colors without gradients (true to Ligne Claire tradition)
- Limited palette per page for cohesion
- Colors support narrative mood
- Consistent lighting logic within scenes
Default Color Palette
| Role | Color | Hex |
|---|---|---|
| Primary Blue | Clean blue | #3182CE |
| Primary Red | Classic red | #E53E3E |
| Primary Yellow | Warm yellow | #ECC94B |
| Skin | Warm tan | #F7CFAE |
| Background Light | Light cream | #FFFAF0 |
| Background Sky | Sky blue | #BEE3F8 |
Quality Markers
- ✓ Clean, uniform line weight throughout
- ✓ Flat colors without gradients
- ✓ Detailed backgrounds, stylized characters
- ✓ Clear panel borders and reading flow
- ✓ Hand-drawn text style
- ✓ Proper perspective in environments
Compatibility
| Tone | Fit | Notes |
|---|---|---|
| neutral | ✓✓ | Classic combination |
| warm | ✓✓ | Nostalgic stories |
| dramatic | ✓ | Works with high contrast |
| vintage | ✓ | Period pieces |
| romantic | ✗ | Style mismatch |
| energetic | ✓ | Lighter stories |
| action | ✗ | Lacks dynamic lines |
Best For
Educational content, balanced narratives, biography comics, historical stories
manga
日漫画风 - Anime/manga aesthetics with expressive characters
Overview
Japanese manga art style characterized by large expressive eyes, dynamic poses, and visual emotion indicators. Versatile style that works across genres from educational to romantic to action.
Line Work
- Clean, smooth lines (1.5-2px)
- Expressive weight variation for emphasis
- Smooth curves, dynamic strokes
- Speed lines and motion effects available
- Screen tone effects for atmosphere
Character Design
- Anime/manga proportions: larger eyes, expressive faces
- 5-7 head height proportions (varies by sub-style)
- Clear emotional indicators (!, ?, sweat drops, sparkles)
- Dynamic poses and gestures
- Detailed hair with individual strands
- Fashionable clothing with natural folds
Eye Styles
| Type | Description |
|---|---|
| Standard | Medium-large, 2-3 highlights |
| Educational | Friendly, approachable eyes |
| Dramatic | Intense, detailed irises |
| Cute | Very large, sparkly eyes |
Background Treatment
- Simplified during dialogue/explanation
- Detailed for establishing shots
- Screen tone gradients for mood
- Abstract backgrounds for emotional moments
- Technical diagrams styled as displays
Color Approach
- Clean, bright anime colors
- Soft gradients on skin
- Vibrant palette options
- Light and shadow with soft transitions
- Color coding for character identification
Default Color Palette
| Role | Color | Hex |
|---|---|---|
| Primary Blue | Bright blue | #4299E1 |
| Primary Orange | Warm orange | #ED8936 |
| Primary Green | Soft green | #68D391 |
| Skin | Anime warm | #FEEBC8 |
| Background | Clean white | #FFFFFF |
| Highlight | Golden | #FFD700 |
Visual Elements
- Speech bubbles: rounded (normal), spiky (excitement)
- Sound effects integrated visually
- Emotion symbols (sweat drops, anger marks, hearts)
- Speed lines and motion blur
- Sparkle and glow effects
Quality Markers
- ✓ Expressive character faces
- ✓ Clean, consistent line work
- ✓ Dynamic poses and compositions
- ✓ Appropriate use of manga conventions
- ✓ Readable panel flow
- ✓ Consistent character designs
Compatibility
| Tone | Fit | Notes |
|---|---|---|
| neutral | ✓✓ | Educational manga |
| warm | ✓ | Slice of life |
| dramatic | ✓ | Intense moments |
| romantic | ✓✓ | Shoujo style |
| energetic | ✓✓ | Shonen style |
| vintage | ✗ | Style mismatch |
| action | ✓✓ | Battle manga |
Best For
Educational tutorials, romance, action, coming-of-age, technical explanations, youth-oriented content
realistic
写实画风 - Digital painting with realistic proportions and lighting
Overview
Full-color realistic manga style using digital painting techniques. Features anatomically accurate characters, rich gradients, and detailed environmental rendering. Sophisticated aesthetic for mature audiences.
Line Work
- Clean, precise outlines with clear contours
- Uniform line weight for character definition
- No excessive hatching - rely on color for depth
- Smooth curves and realistic anatomical lines
- Ligne Claire influence: clean but not simplified
Character Design
- Realistic human proportions (7-8 head heights)
- Anatomically accurate features and expressions
- Detailed facial structure without exaggeration
- Natural poses and body language
- Consistent appearance across panels
- Subtle expressions rather than manga-style
Rendering Style
- Full-color digital painting with rich gradients
- Soft shadow transitions on skin and fabric
- Realistic material textures (glass, liquid, fabric, wood)
- Detailed hair with natural shine and volume
- Environmental lighting affects all elements
- NOT flat cel-shading - smooth color blending
Background Treatment
- Highly detailed, realistic environments
- Accurate perspective and spatial depth
- Atmospheric lighting (warm indoor, cool outdoor)
- Professional settings rendered with precision
- Props and objects with realistic textures
Color Approach
- Rich gradients for depth and volume
- Realistic lighting with warm/cool contrast
- Material-specific rendering
- Subtle color temperature shifts
- Professional, sophisticated palette
Default Color Palette
| Role | Color | Hex |
|---|---|---|
| Skin Light | Natural warm | #F5D6C6 |
| Skin Shadow | Warm shadow | #E8C4B0 |
| Environment | Warm wood | #8B7355 |
| Environment Cool | Cool stone | #9CA3AF |
| Accent | Wine red | #722F37 |
| Accent Gold | Gold | #D4AF37 |
| Light Warm | Amber | #FFB347 |
| Light Cool | Cool blue | #B0C4DE |
Quality Markers
- ✓ Anatomically accurate proportions
- ✓ Smooth color gradients (not flat fills)
- ✓ Realistic material textures
- ✓ Detailed, atmospheric backgrounds
- ✓ Natural lighting with soft shadows
- ✓ Expressive but subtle expressions
- ✓ Professional aesthetic
- ✓ Clean speech bubbles
Compatibility
| Tone | Fit | Notes |
|---|---|---|
| neutral | ✓✓ | Professional content |
| warm | ✓✓ | Nostalgic stories |
| dramatic | ✓✓ | High drama |
| vintage | ✓✓ | Period pieces |
| romantic | ✗ | Style mismatch |
| energetic | ✗ | Too refined |
| action | ✓ | Serious action |
Best For
Professional topics (wine, food, business), lifestyle content, adult narratives, documentary-style, mature educational guides
Auto Selection
Content signals determine default art + tone + layout (or preset).
Content Signal Matrix
| Content Signals | Art Style | Tone | Layout | Preset |
|---|---|---|---|---|
| Tutorial, how-to, beginner | manga | neutral | webtoon | ohmsha |
| Computing, AI, programming | manga | neutral | dense | ohmsha |
| Technical explanation, educational | manga | neutral | webtoon | ohmsha |
| Pre-1950, classical, ancient | realistic | vintage | cinematic | - |
| Personal story, mentor | ligne-claire | warm | standard | - |
| Conflict, breakthrough | (inherit) | dramatic | splash | - |
| Wine, food, business, lifestyle | realistic | neutral | cinematic | - |
| Martial arts, wuxia, xianxia | ink-brush | action | splash | wuxia |
| Romance, love, school life | manga | romantic | standard | shoujo |
| Biography, balanced | ligne-claire | neutral | mixed | - |
Preset Recommendation Rules
When preset is recommended: Load presets/{preset}.md and apply all special rules.
ohmsha
- Triggers: Tutorial, technical, educational, computing, programming, how-to, beginner
- Special rules: Visual metaphors, NO talking heads, gadget reveals, Doraemon-style characters
- Base: manga + neutral + webtoon/dense
wuxia
- Triggers: Martial arts, wuxia, xianxia, cultivation, swordplay
- Special rules: Qi effects, combat visuals, atmospheric elements
- Base: ink-brush + action + splash
shoujo
- Triggers: Romance, love story, school life, emotional drama
- Special rules: Decorative elements, eye details, romantic beats
- Base: manga + romantic + standard
Compatibility Matrix
Art Style × Tone combinations work best when matched appropriately:
| Art Style | ✓✓ Best | ✓ Works | ✗ Avoid |
|---|---|---|---|
| ligne-claire | neutral, warm | dramatic, vintage, energetic | romantic, action |
| manga | neutral, romantic, energetic, action | warm, dramatic | vintage |
| realistic | neutral, warm, dramatic, vintage | action | romantic, energetic |
| ink-brush | neutral, dramatic, action, vintage | warm | romantic, energetic |
| chalk | neutral, warm, energetic | vintage | dramatic, action, romantic |
Note: Art Style × Tone × Layout can be freely combined. Incompatible combinations work but may produce unexpected results.
Priority Order
1. User-specified options (--art, --tone, --style) 2. EXTEND.md defaults 3. Content signal analysis → auto-selection 4. Fallback: ligne-claire + neutral + standard
Create a knowledge biography comic page following these guidelines:
Image Specifications
- Type: Comic book page with multiple panels
- Orientation: Portrait (vertical)
- Aspect Ratio: 2:3
- Style: See style-specific reference for visual guidelines
Panel Structure
Panel Borders
- Clean black lines (1-2px) around each panel
- White gutters between panels (8-12px)
- Panels arranged for clear reading flow
- Variety in panel sizes for visual rhythm
Panel Composition
- Clear focal points in each panel
- Proper use of foreground, midground, background
- Camera angles vary: eye level, bird's eye, low angle, close-up, wide shot
- Action flows logically between panels
- Negative space used intentionally
Text Elements
Speech Bubbles
- Dialogue: Oval/elliptical bubbles with pointed tails
- White fill with thin black outline
- Tail points clearly to speaker
- Hand-lettered style font (not computer-generated)
Narrator Boxes
- Fourth Wall/Narrator: Rectangular boxes
- Often positioned at panel edges (top or bottom)
- Slightly different fill color (cream or light yellow)
- Used for commentary, time jumps, explanations
Thought Bubbles
- Cloud-shaped with bubble trail leading to thinker
- Softer outline than speech bubbles
- For internal monologue
Caption Bars
- Rectangular bars at panel edges
- Time and place information
- "Meanwhile...", "Three years later..." type transitions
- Darker fill with white text, or vice versa
Typography
- Hand-drawn lettering style throughout
- Bold for emphasis and key terms
- Consistent letter sizing
- Chinese text: use full-width punctuation "",。!
- Clear hierarchy: titles > dialogue > captions
Scientific/Concept Visualization
When depicting abstract concepts:
| Concept | Visual Metaphor |
|---|---|
| Neural networks | Glowing nodes connected by clean lines |
| Data flow | Luminous particles along simple paths |
| Algorithms | Geometric patterns, building blocks |
| Logic/proof | Interlocking puzzle pieces |
| Discovery | Light breaking through darkness |
| Uncertainty | Forking paths, question marks |
| Time | Clock motifs, calendar pages |
- Integrate diagrams naturally into narrative panels
- Use inset panels or thought-bubble style for explanations
- Simplified iconography over realistic depiction
Fourth Wall / Narrator Character
When depicting narrator characters addressing the reader:
- Character may look directly out of panel
- Can appear in "present day" framing scenes
- Distinct visual treatment from main timeline
- Often at page edges or in dedicated panels
- May comment on or question the events shown
Historical Accuracy
- Research period-specific details: costumes, technology, architecture
- Show aging naturally for characters across time periods
- Iconic items and locations rendered recognizably
- Balance accuracy with stylization
Language
- All text in Chinese (中文) unless source material is in another language
- Use Chinese full-width punctuation: "",。!
---
Please generate the comic page based on the content provided below:
Character Definition Template
Character Document Format
Create characters/characters.md with the following structure:
# Character Definitions - [Comic Title]
**Style**: [selected style]
**Art Direction**: [Ligne Claire / Manga / etc.]
---
## Character 1: [Name]
**Role**: [Protagonist / Mentor / Antagonist / Narrator]
**Age**: [approximate age or age range in story]
**Appearance**:
- Face shape: [oval/square/round]
- Hair: [color, style, length]
- Eyes: [color, shape, distinctive features]
- Build: [height, body type]
- Distinguishing features: [glasses, beard, scar, etc.]
**Costume**:
- Default outfit: [detailed description]
- Color palette: [primary colors for this character]
- Accessories: [hat, bag, tools, etc.]
**Expression Range**:
- Neutral: [description]
- Happy/Excited: [description]
- Thinking/Confused: [description]
- Determined: [description]
**Visual Reference Notes**:
[Any specific artistic direction]
---
## Character 2: [Name]
...Reference Sheet Image Prompt
After character definitions, include a prompt for generating the reference sheet:
## Reference Sheet Prompt
Character reference sheet in [style] style, clean lines, flat colors:
[ROW 1 - Character Name]:
- Front view: [detailed description]
- 3/4 view: [description]
- Expression sheet: Neutral | Happy | Focused | Worried
[ROW 2 - Character Name]:
...
COLOR PALETTE:
- [Character 1]: [colors]
- [Character 2]: [colors]
White background, clear labels under each character.Example: Turing Biography
# Character Definitions - The Imitation Game
**Style**: classic (Ligne Claire)
**Art Direction**: Clean lines, muted colors, period-accurate details
---
## Character 1: Alan Turing
**Role**: Protagonist
**Age**: 25-40 (varies across story)
**Appearance**:
- Face shape: Oval, slightly angular
- Hair: Dark brown, wavy, slightly disheveled
- Eyes: Deep-set, intense gaze
- Build: Tall, lean, slightly awkward posture
- Distinguishing features: Prominent brow, thoughtful expression
**Costume**:
- Default outfit: Tweed jacket with elbow patches, white shirt, no tie
- Color palette: Muted browns, navy blue, cream
- Accessories: Occasionally a pipe, papers/notebooks
**Expression Range**:
- Neutral: Thoughtful, slightly distant
- Happy/Excited: Eureka moment, eyes bright, subtle smile
- Thinking/Confused: Furrowed brow, looking at abstract space
- Determined: Jaw set, focused eyes
---
## Character 2: The Bombe Machine
**Role**: Supporting (anthropomorphized)
**Appearance**:
- Large brass and wood cabinet
- Dial "eyes" that can express states
- Paper tape "mouth"
- Indicator lights for emotions
**Expression Range**:
- Processing: Spinning dials, humming
- Success: Lights up warmly
- Stuck: Smoke wisps, stuttering
---
## Reference Sheet Prompt
Character reference sheet in Ligne Claire style, clean lines, flat colors:
TOP ROW - Alan Turing:
- Front view: Young man, 30s, short dark wavy hair, thoughtful expression, wearing tweed jacket with elbow patches, white shirt
- 3/4 view: Same character, slight smile, showing profile of nose
- Expression sheet: Neutral | Excited (eureka moment) | Focused (working) | Worried
BOTTOM ROW - The Bombe Machine (anthropomorphized):
- Bombe machine as character: Large, brass and wood, dial "eyes", paper tape "mouth"
- Expressions: Processing (spinning dials) | Success (lights up) | Stuck (smoke wisps)
COLOR PALETTE:
- Turing: Muted browns (#8B7355), navy blue (#2C3E50), cream (#F5F5DC)
- Machine: Brass (#B5A642), mahogany (#4E2728), emerald indicators (#2ECC71)
White background, clear labels under each character.Handling Age Variants
For biographies spanning many years, define age variants:
## Alan Turing - Age Variants
### Young (1920s, age 10-18)
- Boyish features, round face
- School uniform (Sherborne)
- Curious, eager expression
### Adult (1930s-40s, age 25-35)
- Angular face, defined jaw
- Tweed jacket, rumpled appearance
- Intense, focused expression
### Later (1950s, age 40+)
- Slightly weathered
- More casual dress
- Thoughtful, sometimes melancholicBest Practices
| Practice | Description |
|---|---|
| Be specific | "Short dark wavy hair, parted left" not just "dark hair" |
| Use distinguishing features | Glasses, scars, accessories that identify character |
| Define color codes | Use specific color names or hex codes |
| Include age markers | Wrinkles, posture, clothing style matching era |
| Reference real people | For historical figures, note "based on 1940s photographs" |
Why Character Reference Matters
Without unified character definition, AI generates inconsistent appearances. The reference sheet provides: 1. Visual anchors for consistent features 2. Color palettes for consistent coloring 3. Expression documentation for emotional portrayals
First-Time Setup
Overview
When no EXTEND.md is found, guide user through preference setup.
⛔ BLOCKING OPERATION: This setup MUST complete before ANY other workflow steps. Do NOT:
- Ask about content/source material
- Ask about art style or tone
- Ask about layout preferences
- Proceed to content analysis
ONLY ask the questions in this setup flow, save EXTEND.md, then continue.
Setup Flow
No EXTEND.md found
│
▼
┌─────────────────────┐
│ AskUserQuestion │
│ (all questions) │
└─────────────────────┘
│
▼
┌─────────────────────┐
│ Create EXTEND.md │
└─────────────────────┘
│
▼
Continue to Step 1Questions
Language: Use user's input language or preferred language for all questions. Do not always use English.
Use single AskUserQuestion with multiple questions (AskUserQuestion auto-adds "Other" option):
Question 1: Watermark
header: "Watermark"
question: "Watermark text for generated comic pages? Type your watermark content (e.g., name, @handle)"
options:
- label: "No watermark (Recommended)"
description: "No watermark, can enable later in EXTEND.md"Position defaults to bottom-right.
Question 2: Preferred Art Style
header: "Art"
question: "Default art style preference? Or type another style name"
options:
- label: "Auto-select (Recommended)"
description: "Auto-select based on content analysis"
- label: "ligne-claire"
description: "Uniform lines, flat colors, European comic (Tintin style)"
- label: "manga"
description: "Japanese manga style, expressive eyes and emotions"
- label: "realistic"
description: "Digital painting, sophisticated and professional"Question 3: Preferred Tone
header: "Tone"
question: "Default tone/mood preference?"
options:
- label: "Auto-select (Recommended)"
description: "Auto-select based on content signals"
- label: "neutral"
description: "Balanced, rational, educational"
- label: "warm"
description: "Nostalgic, personal, comforting"
- label: "dramatic"
description: "High contrast, intense, powerful"Question 4: Language
header: "Language"
question: "Output language for comic text?"
options:
- label: "Auto-detect (Recommended)"
description: "Match source content language"
- label: "zh"
description: "Chinese (中文)"
- label: "en"
description: "English"Question 5: Save Location
header: "Save"
question: "Where to save preferences?"
options:
- label: "Project"
description: ".baoyu-skills/ (this project only)"
- label: "User"
description: "~/.baoyu-skills/ (all projects)"Save Locations
| Choice | Path | Scope |
|---|---|---|
| Project | .baoyu-skills/baoyu-comic/EXTEND.md | Current project |
| User | ~/.baoyu-skills/baoyu-comic/EXTEND.md | All projects |
After Setup
1. Create directory if needed 2. Write EXTEND.md with frontmatter 3. Confirm: "Preferences saved to [path]" 4. Continue to Step 1
EXTEND.md Template
---
version: 2
watermark:
enabled: [true/false]
content: "[user input or empty]"
position: bottom-right
opacity: 0.5
preferred_art: [selected art style or null]
preferred_tone: [selected tone or null]
preferred_layout: null
preferred_aspect: null
language: [selected or null]
character_presets: []
---Modifying Preferences Later
Users can edit EXTEND.md directly or run setup again:
- Delete EXTEND.md to trigger setup
- Edit YAML frontmatter for quick changes
- Full schema:
config/preferences-schema.md
Preferences Schema
Full Schema
---
version: 2
watermark:
enabled: false
content: ""
position: bottom-right # bottom-right|bottom-left|bottom-center|top-right
preferred_art: null # ligne-claire|manga|realistic|ink-brush|chalk
preferred_tone: null # neutral|warm|dramatic|romantic|energetic|vintage|action
preferred_layout: null # standard|cinematic|dense|splash|mixed|webtoon
preferred_aspect: null # 3:4|4:3|16:9
language: null # zh|en|ja|ko|auto
character_presets:
- name: my-characters
roles:
learner: "Name"
mentor: "Name"
challenge: "Name"
support: "Name"
---Field Reference
| Field | Type | Default | Description |
|---|---|---|---|
version | int | 2 | Schema version |
watermark.enabled | bool | false | Enable watermark |
watermark.content | string | "" | Watermark text (@username or custom) |
watermark.position | enum | bottom-right | Position on image |
preferred_art | string | null | Art style (ligne-claire, manga, realistic, ink-brush, chalk) |
preferred_tone | string | null | Tone (neutral, warm, dramatic, romantic, energetic, vintage, action) |
preferred_layout | string | null | Layout preference or null |
preferred_aspect | string | null | Aspect ratio (3:4, 4:3, 16:9) |
language | string | null | Output language (null = auto-detect) |
character_presets | array | [] | Preset character roles for styles like ohmsha |
Art Style Options
| Value | 中文 | Description |
|---|---|---|
ligne-claire | 清线 | Uniform lines, flat colors, European comic tradition |
manga | 日漫 | Large eyes, manga conventions, expressive emotions |
realistic | 写实 | Digital painting, realistic proportions |
ink-brush | 水墨 | Chinese brush strokes, ink wash effects |
chalk | 粉笔 | Chalkboard aesthetic, hand-drawn warmth |
Tone Options
| Value | 中文 | Description |
|---|---|---|
neutral | 中性 | Balanced, rational, educational |
warm | 温馨 | Nostalgic, personal, comforting |
dramatic | 戏剧 | High contrast, intense, powerful |
romantic | 浪漫 | Soft, beautiful, decorative elements |
energetic | 活力 | Bright, dynamic, exciting |
vintage | 复古 | Historical, aged, period authenticity |
action | 动作 | Speed lines, impact effects, combat |
Position Options
| Value | Description |
|---|---|
bottom-right | Lower right corner (default, works with most panel layouts) |
bottom-left | Lower left corner |
bottom-center | Bottom center (good for webtoon vertical scroll) |
top-right | Upper right corner (avoid - conflicts with page numbers) |
Character Preset Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Unique preset identifier |
roles.learner | No | Character representing the learner/protagonist |
roles.mentor | No | Character representing the teacher/guide |
roles.challenge | No | Character representing obstacles/antagonist |
roles.support | No | Character providing support/comic relief |
Example: Minimal Preferences
---
version: 2
watermark:
enabled: true
content: "@myusername"
preferred_art: ligne-claire
preferred_tone: neutral
---Example: Full Preferences
---
version: 2
watermark:
enabled: true
content: "@comicstudio"
position: bottom-right
preferred_art: manga
preferred_tone: neutral
preferred_layout: webtoon
preferred_aspect: "3:4"
language: zh
character_presets:
- name: tech-tutorial
roles:
learner: "小明"
mentor: "教授"
challenge: "难题怪"
support: "小助手"
- name: doraemon
roles:
learner: "大雄"
mentor: "哆啦A梦"
challenge: "胖虎"
support: "静香"
---Migration from v1
If you have a v1 preferences file with preferred_style, migrate as follows:
Old preferred_style.name | New preferred_art | New preferred_tone |
|---|---|---|
| classic | ligne-claire | neutral |
| dramatic | ligne-claire | dramatic |
| warm | ligne-claire | warm |
| sepia | realistic | vintage |
| vibrant | manga | energetic |
| ohmsha | manga | neutral |
| realistic | realistic | neutral |
| wuxia | ink-brush | action |
| shoujo | manga | romantic |
| chalkboard | chalk | neutral |
Watermark Guide
Position Diagram
┌─────────────────────────────┐
│ [top-right]│ ← Avoid (conflicts with page numbers)
│ │
│ │
│ COMIC PAGE CONTENT │
│ │
│ │
│[bottom-left][bottom-center][bottom-right]│
└─────────────────────────────┘Position Recommendations
| Position | Best For | Avoid When |
|---|---|---|
bottom-right | Default choice, works with most panel layouts | Key panel in bottom-right |
bottom-left | Right-heavy layouts | Key panel in bottom-left |
bottom-center | Webtoon vertical scroll, centered designs | Text-heavy bottom area |
top-right | Not recommended for comics | Always - conflicts with page numbers |
Content Format
| Format | Example | Style |
|---|---|---|
| Handle | @username | Social media style |
| Text | Studio Name | Professional branding |
| Chinese | 漫画工作室 | Chinese market |
| Initials | ABC | Minimal, clean |
Best Practices for Comics
1. Panel-aware placement: Avoid placing over speech bubbles or key action 2. Consistency: Use same watermark across all pages in comic 3. Size: Keep subtle - should not distract from storytelling 4. Style matching: Watermark style should complement comic's visual style 5. Webtoon special: Use bottom-center for vertical scroll format
Prompt Integration
When watermark is enabled, add to image generation prompt:
Include a subtle watermark "[content]" positioned at [position].
The watermark should be legible but not distracting from the comic panels
and storytelling. Ensure watermark does not overlap speech bubbles or key action.Common Issues
| Issue | Solution |
|---|---|
| Watermark invisible on dark panels | Adjust contrast or add subtle outline |
| Watermark overlaps speech bubble | Change position or lower on page |
| Watermark inconsistent across pages | Use session ID for consistency |
| Watermark too prominent | Change position or reduce size |
| Conflicts with page number | Never use top-right position |
cinematic
Wide panels, filmic feel
Panel Structure
- Panels per page: 2-4
- Structure: Horizontal emphasis, wide aspect panels
- Gutters: Generous spacing (12-15px)
Grid Configuration
- 1-2 columns, horizontal emphasis
- Panel sizes: Wide aspect ratios (3:1, 4:1)
- Reading flow: Horizontal sweep, filmic rhythm
Best For
Establishing shots, dramatic moments, landscapes
Best Style Pairings
dramatic, classic, sepia
dense
Information-rich, educational focus
Panel Structure
- Panels per page: 6-9
- Structure: Compact grid, smaller panels
- Gutters: Tight spacing (4-6px)
Grid Configuration
- 3 columns × 3 rows
- Panel sizes: Compact, uniform
- Reading flow: Rapid progression, information-rich
Best For
Technical explanations, complex narratives, timelines
Best Style Pairings
ohmsha, vibrant
mixed
Dynamic, varied rhythm
Panel Structure
- Panels per page: 3-7 (varies)
- Structure: Intentionally varied for pacing
- Gutters: Dynamic spacing
Grid Configuration
- Intentionally irregular
- Panel sizes: Varied for pacing and emphasis
- Reading flow: Guides eye through varied rhythm
Best For
Action sequences, emotional arcs, complex stories
Best Style Pairings
dramatic, vibrant, ohmsha
splash
Impact-focused, key moments
Panel Structure
- Panels per page: 1-2 large + 2-3 small
- Structure: Dominant splash with supporting panels
- Gutters: Varied for emphasis
Grid Configuration
- 1 dominant panel + 2-3 supporting
- Panel sizes: 50-70% splash, remainder small
- Reading flow: Splash dominates, supporting panels accent
Best For
Revelations, breakthroughs, chapter openings
Best Style Pairings
dramatic, classic, vibrant
standard
Classic comic grid, versatile
Panel Structure
- Panels per page: 4-6
- Structure: Regular grid with occasional variation
- Gutters: Consistent white space (8-10px)
Grid Configuration
- 2-3 columns × 2-3 rows
- Panel sizes: Mostly equal, occasional variation
- Reading flow: Left→right, top→bottom (Z-pattern)
Best For
Narrative flow, dialogue scenes
Best Style Pairings
classic, warm, sepia
webtoon
Vertical scrolling comic (竖版条漫)
Panel Structure
- Panels per page: 3-5 vertically stacked
- Structure: Single column, vertical flow optimized for scrolling
- Gutters: Generous vertical spacing (20-40px), panels often bleed horizontally
Grid Configuration
- Single column, vertical stack
- Panel sizes: Full width, variable height (1:1 to 1:2 aspect)
- Reading flow: Top→bottom continuous scroll
Special Features
- Panels can extend beyond frame for dramatic effect
- Generous whitespace between beats
- Character close-ups alternate with wide explanation panels
- "Float" effect - elements can exist between panels
Best For
Ohmsha-style tutorials, mobile reading, step-by-step guides
Best Style Pairings
ohmsha, vibrant
Ohmsha Manga Guide Style
Guidelines for --style ohmsha educational manga comics.
Character Setup
| Role | Default | Traits |
|---|---|---|
| Student (Role A) | 大雄 | Confused, asks basic but crucial questions, represents reader |
| Mentor (Role B) | 哆啦A梦 | Knowledgeable, patient, uses gadgets as technical metaphors |
| Antagonist (Role C, optional) | 胖虎 | Represents misunderstanding, or "noise" in the data |
Custom characters: --characters "Student:小明,Mentor:教授,Antagonist:Bug怪"
Character Reference Sheet Style
For Ohmsha style, use manga/anime style with:
- Exaggerated expressions for educational clarity
- Simple, distinctive silhouettes
- Bright, saturated color palettes
- Chibi/SD (super-deformed) variants for comedic reactions
Outline Spec Block
Every ohmsha outline must start with:
【漫画规格单】
- Language: [Same as input content]
- Style: Ohmsha (Manga Guide), Full Color
- Layout: Vertical Scrolling Comic (竖版条漫)
- Characters: [List character names and roles]
- Character Reference: characters/characters.png
- Page Limit: ≤20 pagesVisual Metaphor Rules (Critical)
NEVER create "talking heads" panels. Every technical concept must become:
1. A tangible gadget/prop - Something characters can hold, use, demonstrate 2. An action scene - Characters doing something that illustrates the concept 3. A visual environment - Stepping into a metaphorical space
Examples
| Concept | Bad (Talking Heads) | Good (Visual Metaphor) |
|---|---|---|
| Word embeddings | Characters discussing vectors | 哆啦A梦拿出"词向量压缩机",把书本压缩成彩色小球 |
| Gradient descent | Explaining math formula | 大雄在山谷地形上滚球,寻找最低点 |
| Neural network | Diagram on whiteboard | 角色走进由发光节点组成的网络迷宫 |
Page Title Convention
Avoid AI-style "Title: Subtitle" format. Use narrative descriptions:
- ❌ "Page 3: Introduction to Neural Networks"
- ✓ "Page 3: 大雄被海量单词淹没,哆啦A梦拿出'词向量压缩机'"
Ending Requirements
- NO generic endings ("What will you choose?", "Thanks for reading")
- End with: Technical summary moment OR character achieving a small goal
- Final panel: Sense of accomplishment, not open-ended question
Good Endings
- Student successfully applies learned concept
- Visual callback to opening problem, now solved
- Mentor gives summary while student demonstrates understanding
Bad Endings
- "What do you think?" open questions
- "Thanks for reading this tutorial"
- Cliffhanger without resolution
Layout Preference
Ohmsha style typically uses:
webtoon(vertical scrolling) - Primary choicedense- For information-heavy sectionsmixed- For varied pacing
Avoid cinematic and splash for educational content.
Partial Workflows
Options to run specific parts of the workflow.
Options Summary
| Option | Steps Executed | Output |
|---|---|---|
--storyboard-only | 1-3 | storyboard.md + characters/ |
--prompts-only | 1-5 | + prompts/*.md |
--images-only | 7-9 | + images + PDF |
--regenerate N | 7 (partial) | Specific page(s) + PDF |
---
Using --storyboard-only
Generate storyboard and characters without prompts or images:
/baoyu-comic content.md --storyboard-onlyWorkflow: Steps 1-3 only (stop after storyboard + characters)
Output:
analysis.mdstoryboard.mdcharacters/characters.md
Use case: Review and edit the storyboard before generating images. Useful for:
- Getting feedback on the narrative structure
- Making manual adjustments to panel layouts
- Defining custom characters
---
Using --prompts-only
Generate storyboard, characters, and prompts without images:
/baoyu-comic content.md --prompts-onlyWorkflow: Steps 1-5 (generate prompts, skip images)
Output:
analysis.mdstoryboard.mdcharacters/characters.mdprompts/*.md
Use case: Review and edit prompts before image generation. Useful for:
- Fine-tuning image generation prompts
- Ensuring visual consistency before committing to generation
- Making style adjustments at the prompt level
---
Using --images-only
Generate images from existing prompts (starts at Step 7):
/baoyu-comic comic/topic-slug/ --images-onlyWorkflow: Skip to Step 7, then 8-9
Prerequisites (must exist in directory):
prompts/directory with page prompt filesstoryboard.mdwith style informationcharacters/characters.mdwith character definitions
Output:
characters/characters.png(if not exists)NN-{cover|page}-[slug].pngimages{topic-slug}.pdf
Use case: Re-generate images after editing prompts. Useful for:
- Recovering from failed image generation
- Trying different image generation settings
- Regenerating after manual prompt edits
---
Using --regenerate
Regenerate specific pages only:
# Single page
/baoyu-comic comic/topic-slug/ --regenerate 3
# Multiple pages
/baoyu-comic comic/topic-slug/ --regenerate 2,5,8
# Cover page
/baoyu-comic comic/topic-slug/ --regenerate 0Workflow: 1. Read existing prompts for specified pages 2. Regenerate images only for those pages 3. Regenerate PDF
Prerequisites (must exist):
prompts/NN-{cover|page}-[slug].mdfor specified pagescharacters/characters.png(for reference)
Output:
- Regenerated
NN-{cover|page}-[slug].pngfor specified pages - Updated
{topic-slug}.pdf
Use case: Fix specific pages without regenerating entire comic. Useful for:
- Fixing a single problematic page
- Iterating on specific visuals
- Regenerating pages after prompt edits
Page numbering:
0= Cover page1-N= Content pages
ohmsha
Ohmsha预设 - Educational manga with visual metaphors
Base Configuration
| Dimension | Value |
|---|---|
| Art Style | manga |
| Tone | neutral |
| Layout | webtoon (default) |
Equivalent to: --art manga --tone neutral
Unique Rules
This preset includes special rules beyond the art+tone combination. When --style ohmsha is used, ALL rules below must be applied.
Visual Metaphor Requirements (CRITICAL)
Every technical concept MUST be visualized as a metaphor:
| Concept Type | Visualization Approach |
|---|---|
| Algorithm | Gadget/machine that demonstrates the process |
| Data structure | Physical space characters can enter/explore |
| Mathematical formula | Transformation visible in environment |
| Abstract process | Tangible flow of particles/objects |
Wrong approach: Character points at blackboard explaining Right approach: Character uses "Concept Visualizer" gadget, steps into metaphorical space
Visual Metaphor Examples
| Concept | Wrong (Talking Head) | Right (Visual Metaphor) |
|---|---|---|
| Attention mechanism | Character points at formula on blackboard | "Attention Flashlight" gadget illuminates key words in dark room |
| Gradient descent | "The algorithm minimizes loss" | Character rides ball rolling down mountain valley |
| Neural network | Diagram with arrows | Living network of glowing creatures passing messages |
| Overfitting | "The model memorized the data" | Character wearing clothes that fit only one specific pose |
Character Roles (Required)
DEFAULT: Use Doraemon characters unless user explicitly specifies --characters or has character presets in EXTEND.md.
| Role | Default Character | Visual | Traits |
|---|---|---|---|
| Student (Role A) | 大雄 (Nobita) | Boy, 10yo, round glasses, black hair, yellow shirt, navy shorts | Confused, asks basic but crucial questions, represents reader |
| Mentor (Role B) | 哆啦A梦 (Doraemon) | Blue robot cat, white belly, 4D pocket, red nose, golden bell | Knowledgeable, patient, uses gadgets as technical metaphors |
| Challenge (Role C) | 胖虎 (Gian) | Stocky boy, small eyes, orange shirt | Represents misunderstanding, or "noise" in the data |
| Support (Role D) | 静香 (Shizuka) | Cute girl, black short hair, pink dress | Asks clarifying questions, provides alternative perspectives |
IMPORTANT: These Doraemon characters ARE the default for ohmsha preset. Generate character definitions using these exact characters unless user requests otherwise.
To use custom characters: --characters "Student:小明,Mentor:教授" or define in EXTEND.md.
Page Title Convention
Every page MUST have a narrative title (not section header):
Wrong: "Chapter 1: Introduction to Transformers" Right: "The Day Nobita Couldn't Understand Anyone"
Gadget Reveal Pattern
When introducing a concept:
1. Student expresses confusion with visual indicator (?, spiral eyes) 2. Mentor dramatically produces gadget with sparkle effects 3. Gadget name announced in bold with explanation 4. Demonstration begins - student enters metaphorical space
Ending Requirements
Final page MUST include:
1. Student demonstrating understanding (applying the concept) 2. Callback to opening problem (now resolved) 3. Mentor's satisfied expression 4. Optional: hint at next topic
NO Talking Heads Rule
Critical: Characters must DO things, not just explain.
Every panel should show:
- Action being performed
- Metaphor being demonstrated
- Character interaction with concept-space
- NOT: two characters facing each other talking
Special Visual Elements
| Element | Usage |
|---|---|
| Gadget reveals | Dramatic unveiling with sparkle effects |
| Concept spaces | Rounded borders, glowing edges for "imagination mode" |
| Information displays | Holographic UI style for technical details |
| Aha moments | Radial lines, light burst effects |
| Confusion | Spiral eyes, question marks floating above head |
Quality Markers
- ✓ Every concept is a visual metaphor
- ✓ Characters are DOING things, not just talking
- ✓ Clear student/mentor dynamic
- ✓ Gadgets and props drive the explanation
- ✓ Expressive manga-style emotions
- ✓ Information density through visual design, not text walls
- ✓ Narrative page titles
Reference
For complete guidelines, see references/ohmsha-guide.md
shoujo
少女预设 - Classic shoujo manga with romantic aesthetics
Base Configuration
| Dimension | Value |
|---|---|
| Art Style | manga |
| Tone | romantic |
| Layout | standard (default) |
Equivalent to: --art manga --tone romantic
Unique Rules
This preset includes special rules beyond the art+tone combination. When --style shoujo is used, ALL rules below must be applied.
Decorative Elements (Required)
Every emotional moment must include decorative elements:
| Emotion | Required Decorations |
|---|---|
| Love | Floating hearts, sparkles, rose petals |
| Longing | Feathers, bubbles, distant sparkles |
| Joy | Flowers blooming, light bursts, stars |
| Sadness | Falling petals, fading sparkles |
| Shyness | Soft sparkles, floating bubbles |
| Realization | Radiating lines with sparkles |
Eye Detail Requirements
Eyes are critical in shoujo style:
| Aspect | Treatment |
|---|---|
| Size | Larger than standard manga (1.2x) |
| Highlights | Multiple (3-5), placed for emotion |
| Reflection | Scene reflection in emotional moments |
| Sparkle | Built-in sparkle effects |
| Tears | Crystalline, detailed teardrops |
Character Beauty Standards
| Feature | Treatment |
|---|---|
| Hair | Flowing, detailed strands, shine highlights |
| Skin | Porcelain, soft blush on cheeks |
| Lips | Soft, slightly glossy |
| Hands | Elegant, expressive gestures |
| Posture | Graceful, elegant poses |
Background Effects
Abstract backgrounds for emotional moments:
| Moment Type | Background |
|---|---|
| Love confession | Soft gradient + floating flowers |
| Shock | Screen tone speed lines + sparkles |
| Memory | Dreamy blur + scattered petals |
| Realization | Radial lines + light burst |
| Intimate | Soft focus + floating elements |
Panel Flow
- Overlap panels for intimate moments
- Break panel borders for emotional impact
- Float decorative elements between panels
- Use screen tone gradients for mood
- Irregular panel shapes for drama
Emotional Beat Timing
Slow down pacing for emotional impact:
| Scene Type | Panel Treatment |
|---|---|
| Confession | Multiple small panels, then splash |
| Eye contact | Close-up sequence |
| Touch | Slow-motion panel breakdown |
| Realization | Build-up panels then impact |
Color Palette Application
| Scene Type | Palette |
|---|---|
| Romantic | Pink, lavender, rose gold |
| Happy | Soft yellow, peach, sky blue |
| Sad | Pale blue, silver, gray lavender |
| Dramatic | Deep rose, purple, contrast |
Screen Tone Usage
| Mood | Tone Pattern |
|---|---|
| Neutral | Clean, minimal |
| Romantic | Soft gradient overlays |
| Dramatic | Heavy contrast tones |
| Dreamy | Soft dot patterns |
Quality Markers
- ✓ Large, sparkling detailed eyes
- ✓ Decorative elements in emotional moments
- ✓ Flowing, beautiful character designs
- ✓ Soft, pastel color palette
- ✓ Elegant panel compositions
- ✓ Screen tone mood effects
- ✓ Romantic atmosphere throughout
- ✓ Beautiful, expressive poses
Best For
Romance stories, coming-of-age, friendship narratives, school life, emotional drama, love stories
wuxia
武侠预设 - Hong Kong martial arts comic style
Base Configuration
| Dimension | Value |
|---|---|
| Art Style | ink-brush |
| Tone | action |
| Layout | splash (default) |
Equivalent to: --art ink-brush --tone action
Unique Rules
This preset includes special rules beyond the art+tone combination. When --style wuxia is used, ALL rules below must be applied.
Qi/Energy Effects (Required)
Martial arts power must be visible through qi effects:
| Effect Type | Visual Treatment |
|---|---|
| Internal qi | Glowing aura around character |
| External qi | Visible energy projection |
| Qi clash | Radiating impact waves |
| Qi absorption | Flowing particles toward character |
| Hidden power | Subtle glow in eyes/fists |
Energy Colors
| Qi Type | Color |
|---|---|
| Righteous | Blue (#4299E1), Gold (#FFD700) |
| Fierce | Red (#DC2626), Orange (#EA580C) |
| Evil | Purple (#7C3AED), Green (#16A34A) |
| Pure | White, Silver |
| Ancient | Gold with particles |
Combat Visual Language
Impact moments must include:
1. Speed lines radiating from impact point 2. Flying debris (stone, wood, cloth) 3. Shockwave rings 4. Dust/energy clouds 5. Hair and clothing blown back
Movement Depiction
| Speed Level | Visual Treatment |
|---|---|
| Normal | Standard pose |
| Fast | Motion blur, speed lines |
| Lightning | Afterimages, multiple positions |
| Teleport | Fade effect, particle trail |
Environmental Integration
Backgrounds must support action:
| Environment | Combat Enhancement |
|---|---|
| Mountains | Crumbling peaks from impacts |
| Forest | Exploding trees, flying leaves |
| Water | Dramatic splashes, walking on water |
| Temple | Breaking pillars, flying tiles |
| Cliff | Dramatic falls, wind effects |
Character Pose Guidelines
- Dynamic warrior stances with weight distribution
- Flowing robes and hair showing movement
- Muscle tension visible in action
- Feet planted or in dynamic motion
- Traditional martial arts postures
Weapon Effects
| Weapon | Visual Treatment |
|---|---|
| Sword | Trailing light arc, blade glow |
| Palm | Qi projection, wind effect |
| Staff | Spinning blur, impact ripples |
| Whip | Flowing energy trail |
Atmospheric Elements
Always include:
- Floating particles (leaves, petals, dust)
- Ink wash mist for depth
- Wind direction indicators
- Dramatic sky/weather when appropriate
Quality Markers
- ✓ Dynamic action poses with sense of motion
- ✓ Ink brush aesthetic in line work
- ✓ Visible qi/energy effects
- ✓ High contrast dramatic lighting
- ✓ Atmospheric backgrounds with Chinese elements
- ✓ Flowing fabric and hair movement
- ✓ Impactful combat moments
- ✓ Speed lines and impact effects
Best For
Martial arts stories, Chinese historical fiction, wuxia/xianxia adaptations, action-heavy narratives
Storyboard Template
Storyboard Document Format
---
title: "[Comic Title]"
topic: "[topic description]"
time_span: "[e.g., 1912-1954]"
narrative_approach: "[chronological/thematic/character-focused]"
recommended_style: "[style name]"
recommended_layout: "[layout name or varies]"
aspect_ratio: "3:4" # 3:4 (portrait), 4:3 (landscape), 16:9 (widescreen)
language: "[zh/en/ja/etc.]"
page_count: [N]
generated: "YYYY-MM-DD HH:mm"
---
# [Comic Title] - Knowledge Comic Storyboard
**Character Reference**: characters/characters.png
---
## Cover
**Filename**: 00-cover-[slug].png
**Core Message**: [one-liner]
**Visual Design**:
- Title typography style
- Main visual composition
- Color scheme
- Subtitle / time span notation
**Visual Prompt**:
[Detailed image generation prompt]
---
## Page 1 / N
**Filename**: 01-page-[slug].png
**Layout**: [standard/cinematic/dense/splash/mixed]
**Narrative Layer**: [Main narrative / Narrator layer / Mixed]
**Core Message**: [What this page conveys]
### Panel Layout
**Panel Count**: X
**Layout Type**: [grid/irregular/splash]
#### Panel 1 (Size: 1/3 page, Position: Top)
**Scene**: [Time, location]
**Image Description**:
- Camera angle: [bird's eye / low angle / eye level / close-up / wide shot]
- Characters: [pose, expression, action]
- Environment: [scene details, period markers]
- Lighting: [atmosphere description]
- Color tone: [palette reference]
**Text Elements**:
- Dialogue bubble (oval): "Character line"
- Narrator box (rectangular): 「Narrator commentary」
- Caption bar: [Background info text]
#### Panel 2...
**Page Hook**: [Cliffhanger or transition at page end]
**Visual Prompt**:
[Full page image generation prompt]
---
## Page 2 / N
...Cover Design Principles
- Academic gravitas with visual appeal
- Title typography reflecting knowledge/science theme
- Composition hinting at core theme (character silhouette, iconic symbol, concept diagram)
- Subtitle or time span for epic scope
Panel Composition Guidelines
| Panel Type | Recommended Count | Usage |
|---|---|---|
| Main narrative | 3-5 per page | Story progression |
| Concept diagram | 1-2 per page | Visualize abstractions |
| Narrator panel | 0-1 per page | Commentary, transition |
| Splash (full/half) | Occasional | Major moments |
Panel Size Reference
- Full page (Splash): Major moments, key breakthroughs
- Half page: Important scenes, turning points
- 1/3 page: Standard narrative panels
- 1/4 or smaller: Quick progression, sequential action
Concept Visualization Techniques
Transform abstract concepts into concrete visuals:
| Abstract Concept | Visual Approach |
|---|---|
| Neural network | Glowing nodes with connecting lines |
| Gradient descent | Ball rolling down valley terrain |
| Data flow | Luminous particles flowing through pipes |
| Algorithm iteration | Ascending spiral staircase |
| Breakthrough moment | Shattering barrier, piercing light |
| Logical proof | Building blocks assembling |
| Uncertainty | Forking paths, fog, multiple shadows |
Text Element Design
| Text Type | Style | Usage |
|---|---|---|
| Character dialogue | Oval speech bubble | Main narrative speech |
| Narrator commentary | Rectangular box | Explanation, commentary |
| Caption bar | Edge-mounted rectangle | Time, location info |
| Thought bubble | Cloud shape | Character inner monologue |
| Term label | Bold / special color | First appearance of technical terms |
Prompt Structure for Consistency
Each page prompt should include character reference:
[CHARACTER REFERENCE]
(Key details from characters.md for characters in this page)
[PAGE CONTENT]
(Specific scene, panel layout, and visual elements)
[CONSISTENCY REMINDER]
Maintain exact character appearances as defined in character reference.
- [Character A]: [key identifying features]
- [Character B]: [key identifying features]action
动作基调 - Speed, impact, power
Overview
High-impact action atmosphere with dynamic movement, combat effects, and powerful visual energy. Creates visceral, exciting sequences.
Mood Characteristics
- Speed and motion
- Power and impact
- Combat intensity
- Physical energy
- Visceral excitement
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | High contrast |
| Contrast | Maximum |
| Temperature | Variable per effect |
| Brightness | Dynamic range |
Action Effects
Combat/motion effects (apply liberally):
| Effect | Usage |
|---|---|
| Speed lines | Motion, velocity |
| Impact bursts | Hits, collisions |
| Shockwaves | Powerful impacts |
| Flying debris | Environmental destruction |
| Dust clouds | Ground impacts |
| Motion blur | Fast movement |
| Afterimages | Super speed |
Special Effects
| Effect Type | Visual Approach |
|---|---|
| Energy attacks | Glowing, radiating |
| Physical impacts | Radiating lines, debris |
| Movement | Speed lines, blur |
| Atmosphere | Flying particles, wind |
Effect Colors
| Effect | Color | Hex |
|---|---|---|
| Energy glow | Blue | #4299E1 |
| Fire/power | Gold | #FFD700 |
| Impact | White burst | #FFFFFF |
| Blood/intensity | Deep red | #8B0000 |
Lighting
- Dynamic, shifting
- Impact flashes
- Energy glow sources
- Rim lighting on figures
- Dramatic contrast
Emotional Range
| Emotion | Expression |
|---|---|
| Determination | Fierce focus |
| Rage | Intense, powerful |
| Triumph | Victorious pose |
| Struggle | Strained effort |
Composition
- Dynamic angles
- Extreme perspectives
- Panel-breaking layouts
- Asymmetric designs
- Impact-focused framing
Pose Guidelines
- Dynamic warrior poses
- Weight and momentum visible
- Muscle tension shown
- Flow of movement captured
- Impact points emphasized
Best For
- Martial arts combat
- Action sequences
- Sports moments
- Physical challenges
- Battle scenes
- Climactic confrontations
Combination Notes
Works especially well with:
- ink-brush: wuxia combat
- manga: shonen battles
Avoid with:
- chalk: style mismatch
- ligne-claire: style mismatch (too static)
dramatic
戏剧基调 - High contrast, intense, powerful moments
Overview
High-impact dramatic tone for pivotal moments, conflicts, and breakthroughs. Uses strong contrast and intense compositions to create emotional power.
Mood Characteristics
- Tension and intensity
- Pivotal moments
- Conflict and resolution
- Breakthrough discoveries
- Emotional climaxes
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | High (vibrant or deep) |
| Contrast | Maximum |
| Temperature | Varies for effect |
| Brightness | Strong highlights, deep shadows |
Contrast Approach
- Sharp light/dark divisions
- Minimal mid-tones
- Stark compositions
- Silhouette potential
- Rim lighting effects
Accent Colors
- Deep navy (#1A365D)
- Crimson (#9B2C2C)
- Stark white
- Heavy blacks
- Limited palette per scene
Lighting
- Dramatic single-source
- High contrast shadows
- Rim lighting on characters
- Spotlight effects
- Chiaroscuro influence
Emotional Range
| Emotion | Expression |
|---|---|
| Anger | Intense, defined features |
| Determination | Strong, focused gaze |
| Shock | Wide eyes, stark lighting |
| Triumph | Powerful, elevated pose |
Composition
- Angular, dynamic layouts
- Dramatic camera angles
- Low/high viewpoints
- Diagonal compositions
- Negative space for impact
Visual Elements
- Speed lines for tension
- Impact effects
- Dramatic backgrounds (storms, fire)
- Silhouettes
- Light burst effects
- Environmental drama
Best For
- Pivotal discoveries
- Conflict scenes
- Climactic moments
- Breakthrough realizations
- Emotional confrontations
- Historical turning points
Combination Notes
Works especially well with:
- realistic: powerful drama
- ink-brush: martial arts climax
- ligne-claire: historical pivots
- manga: shonen battles
Avoid with: chalk (style mismatch)
energetic
活力基调 - Bright, dynamic, exciting
Overview
High-energy atmosphere for exciting, discovery-filled content. Bright colors, dynamic compositions, and movement create engaging visuals for younger audiences.
Mood Characteristics
- Excitement and wonder
- Discovery and learning
- Energy and enthusiasm
- Movement and action
- Youthful spirit
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | High (vibrant) |
| Contrast | Medium-high |
| Temperature | Variable, punchy |
| Brightness | Bright, clean |
Color Palette
Shift toward vibrant tones:
| Role | Color | Hex |
|---|---|---|
| Primary Red | Bright red | #F56565 |
| Primary Yellow | Sunny yellow | #F6E05E |
| Primary Blue | Sky blue | #63B3ED |
| Accent 1 | Magenta | #D53F8C |
| Accent 2 | Lime green | #68D391 |
| Background | Clean white | #FFFFFF |
| Background Alt | Bright pastels | Various |
Lighting
- Bright, clear lighting
- Clean shadows
- High energy
- Spotlight effects for emphasis
- Dynamic light sources
Dynamic Elements
Energy effects (add to compositions):
| Element | Usage |
|---|---|
| Speed lines | Motion, excitement |
| Sparkles | Discoveries |
| Burst effects | Aha moments |
| Motion blur | Fast action |
| Star bursts | Emphasis |
| Sweat drops | Effort/surprise |
Emotional Range
| Emotion | Expression |
|---|---|
| Excitement | Wide eyes, big smile |
| Surprise | Dramatic reaction |
| Determination | Intense focus |
| Wonder | Sparkling eyes |
Composition
- Dynamic angles
- Action-oriented layouts
- Movement emphasis
- Clean, punchy designs
- Energy flows
Visual Style
- Expressive, animated characters
- Wide eyes, big reactions
- Dynamic poses
- Motion and action focus
- Simplified backgrounds for energy
Best For
- Science explanations
- "Aha" moments
- Young audience content
- Discovery narratives
- Learning adventures
- Action tutorials
Combination Notes
Works especially well with:
- manga: shonen energy
- chalk: fun education
Avoid with:
- realistic: style mismatch
- ink-brush: style mismatch
neutral
中性基调 - Balanced, rational, educational
Overview
Default balanced tone suitable for educational and informative content. Neither overly emotional nor cold - creates accessible, professional atmosphere.
Mood Characteristics
- Balanced emotional register
- Clear, rational presentation
- Educational focus
- Professional but approachable
- Objective storytelling
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | Standard (no shift) |
| Contrast | Balanced |
| Temperature | Neutral |
| Brightness | Slightly bright |
Lighting
- Even, clear lighting
- Minimal dramatic shadows
- Consistent across panels
- Natural light sources
- No extreme contrast
Emotional Range
| Emotion | Expression Level |
|---|---|
| Joy | Moderate smile |
| Concern | Thoughtful expression |
| Surprise | Mild widening of eyes |
| Frustration | Slight frown |
Composition
- Balanced panel layouts
- Clear focal points
- Readable hierarchies
- Standard framing
- Functional compositions
Best For
- Educational content
- Technical tutorials
- Informative biographies
- Documentary style
- Professional topics
Usage Notes
Neutral is the default tone. Combine with any art style for baseline professional output. Most versatile tone option.
romantic
浪漫基调 - Soft, beautiful, emotionally delicate
Overview
Soft, dreamy atmosphere for romantic and emotionally delicate content. Features decorative elements, sparkles, and beautiful compositions that emphasize feeling and beauty.
Mood Characteristics
- Romance and love
- Beauty and elegance
- Emotional delicacy
- Dreams and hopes
- Youth and idealism
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | Soft pastels |
| Contrast | Low, gentle |
| Temperature | Slightly warm pink |
| Brightness | Soft, glowing |
Color Palette
Shift toward romantic tones:
| Role | Color | Hex |
|---|---|---|
| Primary | Soft pink | #FFB6C1 |
| Secondary | Lavender | #E6E6FA |
| Accent | Rose | #FF69B4 |
| Highlight | Pearl white | #FFFAF0 |
| Gold | Gold sparkle | #FFD700 |
| Skin | Porcelain | #FFF5EE |
| Blush | Soft blush | #FFE4E1 |
| Background | Soft cream | #FFF8DC |
Lighting
- Soft, diffused light
- Glowing effects
- Backlighting halos
- Sparkle highlights
- Dreamy atmospheres
Decorative Elements
Essential decorations (add to compositions):
| Element | Usage |
|---|---|
| Flower petals | Floating, framing |
| Sparkles | Emotional highlights |
| Bubbles | Dreamy moments |
| Feathers | Gentle floating |
| Stars | Night scenes, wonder |
| Hearts | Love emphasis |
| Light halos | Character highlights |
Emotional Range
| Emotion | Expression |
|---|---|
| Love | Soft gaze, blush |
| Longing | Distant, beautiful sadness |
| Joy | Radiant smile, sparkles |
| Shyness | Downcast eyes, blush |
Composition
- Elegant, flowing layouts
- Soft focus backgrounds
- Characters framed by decorations
- Beautiful angles (3/4 profiles)
- Screen tone gradients
Best For
- Romance stories
- Coming-of-age
- Friendship narratives
- Emotional drama
- School life
- Beautiful moments
Combination Notes
Works especially well with:
- manga: classic shoujo style
Avoid with:
- realistic: style mismatch
- ink-brush: style mismatch
- ligne-claire: style mismatch
- chalk: style mismatch
vintage
复古基调 - Historical, aged, period authenticity
Overview
Historical atmosphere with aged paper effects and period-appropriate aesthetics. Creates sense of time, authenticity, and historical distance.
Mood Characteristics
- Historical authenticity
- Period distance
- Archival quality
- Time and memory
- Classical elegance
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | Reduced, muted |
| Contrast | Medium, aged |
| Temperature | Sepia shift |
| Brightness | Slightly faded |
Color Palette
Shift toward aged tones:
| Role | Color | Hex |
|---|---|---|
| Primary | Sepia brown | #8B7355 |
| Background | Aged paper | #F5E6D3 |
| Accent 1 | Faded teal | #6B8E8E |
| Accent 2 | Muted burgundy | #7B3F3F |
| Ink | Aged black | #3D3D3D |
| Yellowed | Paper yellow | #F5DEB3 |
Visual Effects
Aging effects (apply subtly):
| Effect | Application |
|---|---|
| Paper aging | Background texture |
| Faded edges | Vignette effect |
| Dust specks | Subtle overlay |
| Yellowing | Color shift |
| Wear marks | Corner/edge details |
Period Elements
- Historical typography
- Period-accurate details
- Archival presentation
- Classical compositions
- Formal framing
Lighting
- Natural, period-appropriate
- Oil lamp/candle warmth
- Soft, diffused light
- Indoor historical lighting
- Photographic quality
Emotional Range
| Emotion | Expression |
|---|---|
| Dignity | Formal, composed |
| Sorrow | Restrained, elegant |
| Pride | Classical posture |
| Wisdom | Aged grace |
Composition
- Classical framing
- Formal compositions
- Period-appropriate staging
- Documentary style
- Historical accuracy priority
Best For
- Pre-1950s stories
- Classical science history
- Historical biographies
- Period pieces
- Documentary comics
- Archival narratives
Combination Notes
Works especially well with:
- realistic: period drama
- ligne-claire: historical adventure
- ink-brush: classical Asian stories
Avoid with:
- manga: style mismatch (too modern)
- chalk: style mismatch (modern educational)
warm
温馨基调 - Nostalgic, personal, comforting
Overview
Warm, inviting atmosphere for personal stories and nostalgic content. Creates emotional connection through cozy aesthetics and comforting visuals.
Mood Characteristics
- Nostalgic feeling
- Personal, intimate atmosphere
- Comforting and healing
- Memory and reflection
- Gentle emotional warmth
Color Modifiers
When applied to any art style:
| Adjustment | Direction |
|---|---|
| Saturation | Slightly reduced |
| Contrast | Softer |
| Temperature | Warm shift (+15%) |
| Brightness | Soft, golden |
Color Temperature
Shift palette toward warm tones:
| Original | Warm Shift |
|---|---|
| Cool blue | Soft teal |
| Pure white | Cream |
| Gray | Warm gray |
| Black | Soft charcoal |
Accent Colors
- Golden yellow (#D69E2E)
- Soft orange (#DD6B20)
- Warm brown (#8B6F47)
- Sunset tones
Lighting
- Golden hour lighting
- Soft, diffused light
- Warm indoor glow
- Candle/lamp warmth
- Gentle shadows
Emotional Range
| Emotion | Expression |
|---|---|
| Joy | Genuine warm smile |
| Sadness | Gentle melancholy |
| Love | Soft, tender expressions |
| Memory | Distant, reflective gaze |
Composition
- Intimate framing
- Cozy environments
- Soft focus backgrounds
- Welcoming spaces
- Personal moments highlighted
Visual Elements
- Warm light rays
- Soft edges
- Nostalgic props (old photos, keepsakes)
- Comfort objects (blankets, tea cups)
- Nature elements (autumn leaves, sunset)
Best For
- Personal stories
- Childhood memories
- Mentorship narratives
- Family histories
- Gentle biographies
- Healing journeys
Combination Notes
Works especially well with:
- ligne-claire: nostalgic European comics
- realistic: touching human stories
- manga: slice-of-life warmth
- chalk: nostalgic education
Complete Workflow
Full workflow for generating knowledge comics.
Progress Checklist
Copy and track progress:
Comic Progress:
- [ ] Step 1: Setup & Analyze
- [ ] 1.1 Load preferences
- [ ] 1.2 Analyze content
- [ ] 1.3 Check existing ⚠️ REQUIRED
- [ ] Step 2: Confirmation 1 - Style & options ⚠️ REQUIRED
- [ ] Step 3: Generate storyboard + characters
- [ ] Step 4: Review outline (conditional)
- [ ] Step 5: Generate prompts
- [ ] Step 6: Review prompts (conditional)
- [ ] Step 7: Generate images
- [ ] Step 8: Merge to PDF
- [ ] Step 9: Completion reportFlow Diagram
Input → Preferences → Analyze → [Check Existing?] → [Confirm 1: Style + Reviews] → Storyboard → [Review Outline?] → Prompts → [Review Prompts?] → Images → PDF → Complete---
Step 1: Setup & Analyze
1.1 Load Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .baoyu-skills/baoyu-comic/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-comic/EXTEND.md" && echo "user"| Path | Location |
|---|---|
.baoyu-skills/baoyu-comic/EXTEND.md | Project directory |
$HOME/.baoyu-skills/baoyu-comic/EXTEND.md | User home |
When EXTEND.md Found → Read, parse, output summary to user:
📋 Loaded preferences from [full path]
├─ Watermark: [enabled/disabled] [content if enabled]
├─ Art Style: [style name or "auto-select"]
├─ Tone: [tone name or "auto-select"]
├─ Layout: [layout or "auto-select"]
├─ Language: [language or "auto-detect"]
└─ Character presets: [count] definedMUST output this summary so user knows their current configuration. Do not skip or silently load.
When EXTEND.md Not Found → First-time setup:
1. Inform user: "No preferences found. Let's set up your defaults." 2. Use AskUserQuestion to collect preferences (see config/first-time-setup.md) 3. Create EXTEND.md at user-chosen location 4. Confirm: "✓ Preferences saved to [path]"
EXTEND.md Supports: Watermark | Preferred art/tone/layout | Custom style definitions | Character presets | Language preference
Schema: config/preferences-schema.md
Important: Once EXTEND.md exists, watermark, language, and style defaults are NOT asked again in Confirmation 1 or 2. These are session-persistent settings.
1.2 Analyze Content → analysis.md
Read source content, save it if needed, and perform deep analysis.
Actions: 1. Save source content (if not already a file):
- If user provides a file path: use as-is
- If user pastes content: save to
source.mdin target directory - Backup rule: If
source.mdexists, rename tosource-backup-YYYYMMDD-HHMMSS.md
2. Read source content 3. Deep analysis following analysis-framework.md:
- Target audience identification
- Value proposition for readers
- Core themes and narrative potential
- Key figures and their story arcs
4. Detect source language 5. Determine language:
- If EXTEND.md has
language→ use it - Else if
--langoption provided → use it - Else → use detected source language
6. Determine recommended page count:
- Short story: 5-8 pages
- Medium complexity: 9-15 pages
- Full biography: 16-25 pages
7. Analyze content signals for art/tone/layout recommendations 8. Save to `analysis.md`
analysis.md Format: YAML front matter (title, topic, time_span, source_language, user_language, aspect_ratio, recommended_page_count, recommended_art, recommended_tone) + sections for Target Audience, Value Proposition, Core Themes, Key Figures & Story Arcs, Content Signals, Recommended Approaches. See analysis-framework.md for full template.
1.3 Check Existing Content ⚠️ REQUIRED
MUST execute before proceeding to Step 2.
Use Bash to check if output directory exists:
test -d "comic/{topic-slug}" && echo "exists"If directory exists, use AskUserQuestion:
header: "Existing"
question: "Existing content found. How to proceed?"
options:
- label: "Regenerate storyboard"
description: "Keep images, regenerate storyboard and characters only"
- label: "Regenerate images"
description: "Keep storyboard, regenerate images only"
- label: "Backup and regenerate"
description: "Backup to {slug}-backup-{timestamp}, then regenerate all"
- label: "Exit"
description: "Cancel, keep existing content unchanged"Save result and handle accordingly:
- Regenerate storyboard: Skip to Step 3, preserve
prompts/and images - Regenerate images: Skip to Step 7, use existing prompts
- Backup and regenerate: Move directory, start fresh from Step 2
- Exit: End workflow immediately
---
Step 2: Confirmation 1 - Style & Options ⚠️
Purpose: Select visual style + decide whether to review outline before generation. Do NOT skip.
Note: Watermark and language already configured in EXTEND.md (Step 1).
Display summary:
- Content type + topic identified
- Key figures extracted
- Time span detected
- Recommended page count
- Language: [from EXTEND.md or detected]
- Recommended style: [art] + [tone] (based on content signals)
Use AskUserQuestion for:
Question 1: Visual Style
If a preset is recommended (see auto-selection.md), show it first:
header: "Style"
question: "Which visual style for this comic?"
options:
- label: "[preset name] preset (Recommended)" # If preset recommended
description: "[preset description] - includes special rules"
- label: "[recommended art] + [recommended tone] (Recommended)" # If no preset
description: "Best match for your content based on analysis"
- label: "ligne-claire + neutral"
description: "Classic educational, Logicomix style"
- label: "ohmsha preset"
description: "Educational manga with visual metaphors, gadgets, NO talking heads"
- label: "Custom"
description: "Specify your own art + tone or preset"Preset vs Art+Tone: Presets include special rules beyond art+tone. ohmsha = manga + neutral + visual metaphor rules + character roles + NO talking heads. Plain manga + neutral does NOT include these rules.
Question 2: Narrative Focus (multiSelect: true)
header: "Focus"
question: "What should the comic emphasize? (Select all that apply)"
options:
- label: "Biography/life story"
description: "Follow a person's journey through key life events"
- label: "Concept explanation"
description: "Break down complex ideas visually"
- label: "Historical event"
description: "Dramatize important historical moments"
- label: "Tutorial/how-to"
description: "Step-by-step educational guide"Question 3: Target Audience
header: "Audience"
question: "Who is the primary reader?"
options:
- label: "General readers"
description: "Broad appeal, accessible content"
- label: "Students/learners"
description: "Educational focus, clear explanations"
- label: "Industry professionals"
description: "Technical depth, domain knowledge"
- label: "Children/young readers"
description: "Simplified language, engaging visuals"Question 4: Outline Review
header: "Review"
question: "Do you want to review the outline before image generation?"
options:
- label: "Yes, let me review (Recommended)"
description: "Review storyboard and characters before generating images"
- label: "No, generate directly"
description: "Skip outline review, start generating immediately"Question 5: Prompt Review
header: "Prompts"
question: "Review prompts before generating images?"
options:
- label: "Yes, review prompts (Recommended)"
description: "Review image generation prompts before generating"
- label: "No, skip prompt review"
description: "Proceed directly to image generation"After response: 1. Update analysis.md with user preferences 2. Store `skip_outline_review` flag based on Question 4 response 3. Store `skip_prompt_review` flag based on Question 5 response 4. → Step 3
---
Step 3: Generate Storyboard + Characters
Create storyboard and character definitions using the confirmed style from Step 2.
Loading Style References:
- Art style:
art-styles/{art}.md - Tone:
tones/{tone}.md - If preset (ohmsha/wuxia/shoujo): also load
presets/{preset}.md
Generate:
1. Storyboard (storyboard.md):
- YAML front matter with art_style, tone, layout, aspect_ratio
- Cover design
- Each page: layout, panel breakdown, visual prompts
- Written in user's preferred language (from Step 1)
- Reference:
storyboard-template.md - If using preset: Load and apply preset rules from
presets/
2. Character definitions (characters/characters.md):
- Visual specs matching the art style (in user's preferred language)
- Include Reference Sheet Prompt for later image generation
- Reference:
character-template.md - If using ohmsha preset: Use default Doraemon characters (see below)
Ohmsha Default Characters (use these unless user specifies --characters):
| Role | Character | Visual Description |
|---|---|---|
| Student | 大雄 (Nobita) | Japanese boy, 10yo, round glasses, black hair parted in middle, yellow shirt, navy shorts |
| Mentor | 哆啦A梦 (Doraemon) | Round blue robot cat, big white eyes, red nose, whiskers, white belly with 4D pocket, golden bell, no ears |
| Challenge | 胖虎 (Gian) | Stocky boy, rough features, small eyes, orange shirt |
| Support | 静香 (Shizuka) | Cute girl, black short hair, pink dress, gentle expression |
These are the canonical ohmsha-style characters. Do NOT create custom characters for ohmsha unless explicitly requested.
After generation:
- If
skip_outline_reviewis true → Skip Step 4, go directly to Step 5 - If
skip_outline_reviewis false → Continue to Step 4
---
Step 4: Review Outline (Conditional)
Skip this step if user selected "No, generate directly" in Step 2.
Purpose: User reviews and confirms storyboard + characters before generation.
Display:
- Page count and structure
- Art style + Tone combination
- Page-by-page summary (Cover → P1 → P2...)
- Character list with brief descriptions
Use AskUserQuestion:
header: "Confirm"
question: "Ready to generate images with this outline?"
options:
- label: "Yes, proceed (Recommended)"
description: "Generate character sheet and comic pages"
- label: "Edit storyboard first"
description: "I'll modify storyboard.md before continuing"
- label: "Edit characters first"
description: "I'll modify characters/characters.md before continuing"
- label: "Edit both"
description: "I'll modify both files before continuing"After response: 1. If user wants to edit → Wait for user to finish editing, then ask again 2. If user confirms → Continue to Step 5
---
Step 5: Generate Prompts
Create image generation prompts for all pages.
Style Reference Loading:
- Read
art-styles/{art}.mdfor rendering guidelines - Read
tones/{tone}.mdfor mood/color adjustments - If preset: Read
presets/{preset}.mdfor special rules
For each page (cover + pages): 1. Create prompt following art style + tone guidelines 2. Include character visual descriptions for consistency 3. Save to prompts/NN-{cover|page}-[slug].md
- Backup rule: If prompt file exists, rename to
prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md
Prompt File Format:
# Page NN: [Title]
## Visual Style
Art: [art style] | Tone: [tone] | Layout: [layout type]
## Character Reference
[Character descriptions from characters/characters.md]
## Panel Breakdown
[From storyboard.md - panel descriptions, actions, dialogue]
## Generation Prompt
[Combined prompt for image generation skill]Watermark Application (if enabled in preferences): Add to each prompt:
Include a subtle watermark "[content]" positioned at [position]
with approximately [opacity*100]% visibility. The watermark should
be legible but not distracting from the comic panels and storytelling.
Ensure watermark does not overlap speech bubbles or key action.Reference: config/watermark-guide.md
After generation:
- If
skip_prompt_reviewis true → Skip Step 6, go directly to Step 7 - If
skip_prompt_reviewis false → Continue to Step 6
---
Step 6: Review Prompts (Conditional)
Skip this step if user selected "No, skip prompt review" in Step 2.
Purpose: User reviews and confirms prompts before image generation.
Display prompt summary table:
| Page | Title | Key Elements |
|---|---|---|
| Cover | [title] | [main visual] |
| P1 | [title] | [key elements] |
| ... | ... | ... |
Use AskUserQuestion:
header: "Confirm"
question: "Ready to generate images with these prompts?"
options:
- label: "Yes, proceed (Recommended)"
description: "Generate all comic page images"
- label: "Edit prompts first"
description: "I'll modify prompts/*.md before continuing"
- label: "Regenerate prompts"
description: "Regenerate all prompts with different approach"After response: 1. If user wants to edit → Wait for user to finish editing, then ask again 2. If user wants to regenerate → Go back to Step 5 3. If user confirms → Continue to Step 7
---
Step 7: Generate Images
With confirmed prompts from Step 5/6:
7.1 Generate Character Reference Sheet (first)
1. Use Reference Sheet Prompt from characters/characters.md 2. Backup rule: If characters/characters.png exists, rename to characters/characters-backup-YYYYMMDD-HHMMSS.png 3. Generate → characters/characters.png 4. This ensures visual consistency for all subsequent pages
7.2 Generate Comic Pages
CRITICAL: Character Reference is MANDATORY for visual consistency across all pages.
Before generating any page: 1. Read the image generation skill's SKILL.md 2. Check if it supports reference image input (--ref, --reference, etc.) 3. Choose the appropriate strategy below
Character Reference Strategy:
| Skill Capability | Strategy | Action |
|---|---|---|
Supports --ref | Strategy A | Pass characters/characters.png with EVERY page |
Does NOT support --ref | Strategy B | Prepend character descriptions to EVERY prompt |
Strategy A: Using `--ref` parameter (e.g., baoyu-image-gen)
# Each page generation MUST include --ref
npx -y bun ${SKILL_DIR}/../baoyu-image-gen/scripts/main.ts \
--promptfiles prompts/01-page-xxx.md \
--image 01-page-xxx.png \
--ar 3:4 \
--ref characters/characters.pngStrategy B: Embedding character descriptions in prompt
When skill does NOT support reference images, create combined prompt files:
# prompts/01-page-xxx.md (with embedded character reference)
## Character Reference (maintain consistency)
[Copy relevant sections from characters/characters.md here]
- 大雄: Japanese boy, round glasses, yellow shirt, navy shorts...
- 哆啦A梦: Round blue robot cat, white belly, red nose, golden bell...
## Page Content
[Original page prompt here]For each page (cover + pages): 1. Read prompt from prompts/NN-{cover|page}-[slug].md 2. Backup rule: If image file exists, rename to NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png 3. Generate image using Strategy A or B (based on skill capability) 4. Save to NN-{cover|page}-[slug].png 5. Report progress after each generation: "Generated X/N: [page title]"
Session Management: If image generation skill supports --sessionId: 1. Generate unique session ID: comic-{topic-slug}-{timestamp} 2. Use same session ID for all pages 3. Ensures visual consistency across generated images
---
Step 8: Merge to PDF
After all images generated:
npx -y bun ${SKILL_DIR}/scripts/merge-to-pdf.ts <comic-dir>Creates {topic-slug}.pdf with all pages as full-page images.
---
Step 9: Completion Report
Comic Complete!
Title: [title] | Art: [art] | Tone: [tone] | Pages: [count] | Aspect: [ratio] | Language: [lang]
Watermark: [enabled/disabled]
Location: [path]
✓ analysis.md
✓ characters.png
✓ 00-cover-[slug].png ... NN-page-[slug].png
✓ {topic-slug}.pdf---
Page Modification
| Action | Steps |
|---|---|
| Edit | Update prompt → Regenerate image → Regenerate PDF |
| Add | Create prompt at position → Generate image → Renumber subsequent (NN+1) → Update storyboard → Regenerate PDF |
| Delete | Remove files → Renumber subsequent (NN-1) → Update storyboard → Regenerate PDF |
File naming: NN-{cover|page}-[slug].png (e.g., 03-page-enigma-machine.png)
- Slugs: kebab-case, unique, derived from content
- Renumbering: Update NN prefix only, slugs unchanged
import { existsSync, readdirSync, readFileSync } from "fs";
import { join, basename } from "path";
import { PDFDocument } from "pdf-lib";
interface PageInfo {
filename: string;
path: string;
index: number;
promptPath?: string;
}
function parseArgs(): { dir: string; output?: string } {
const args = process.argv.slice(2);
let dir = "";
let output: string | undefined;
for (let i = 0; i < args.length; i++) {
if (args[i] === "--output" || args[i] === "-o") {
output = args[++i];
} else if (!args[i].startsWith("-")) {
dir = args[i];
}
}
if (!dir) {
console.error("Usage: bun merge-to-pdf.ts <comic-dir> [--output filename.pdf]");
process.exit(1);
}
return { dir, output };
}
function findComicPages(dir: string): PageInfo[] {
if (!existsSync(dir)) {
console.error(`Directory not found: ${dir}`);
process.exit(1);
}
const files = readdirSync(dir);
const pagePattern = /^(\d+)-(cover|page)(-[\w-]+)?\.(png|jpg|jpeg)$/i;
const promptsDir = join(dir, "prompts");
const hasPrompts = existsSync(promptsDir);
const pages: PageInfo[] = files
.filter((f) => pagePattern.test(f))
.map((f) => {
const match = f.match(pagePattern);
const baseName = f.replace(/\.(png|jpg|jpeg)$/i, "");
const promptPath = hasPrompts ? join(promptsDir, `${baseName}.md`) : undefined;
return {
filename: f,
path: join(dir, f),
index: parseInt(match![1], 10),
promptPath: promptPath && existsSync(promptPath) ? promptPath : undefined,
};
})
.sort((a, b) => a.index - b.index);
if (pages.length === 0) {
console.error(`No comic pages found in: ${dir}`);
console.error("Expected format: 00-cover-slug.png, 01-page-slug.png, etc.");
process.exit(1);
}
return pages;
}
async function createPdf(pages: PageInfo[], outputPath: string) {
const pdfDoc = await PDFDocument.create();
pdfDoc.setAuthor("baoyu-comic");
pdfDoc.setSubject("Generated Comic");
for (const page of pages) {
const imageData = readFileSync(page.path);
const ext = page.filename.toLowerCase();
const image = ext.endsWith(".png")
? await pdfDoc.embedPng(imageData)
: await pdfDoc.embedJpg(imageData);
const { width, height } = image;
const pdfPage = pdfDoc.addPage([width, height]);
pdfPage.drawImage(image, {
x: 0,
y: 0,
width,
height,
});
console.log(`Added: ${page.filename}${page.promptPath ? " (prompt available)" : ""}`);
}
const pdfBytes = await pdfDoc.save();
await Bun.write(outputPath, pdfBytes);
console.log(`\nCreated: ${outputPath}`);
console.log(`Total pages: ${pages.length}`);
}
async function main() {
const { dir, output } = parseArgs();
const pages = findComicPages(dir);
const dirName = basename(dir) === "comic" ? basename(join(dir, "..")) : basename(dir);
const outputPath = output || join(dir, `${dirName}.pdf`);
console.log(`Found ${pages.length} pages in: ${dir}\n`);
await createPdf(pages, outputPath);
}
main().catch((err) => {
console.error("Error:", err.message);
process.exit(1);
});