Generate consistent medieval manuscript-style illustrations for the Scholastic Bible using Gemini Imagen...
Generate beautiful, consistent medieval illuminated manuscript-style artwork for the Scholastic Bible project using Google's Imagen model.
site/src/data/bible.jsonsite/src/data/bible.jsoncat .claude/skills/gemini-illustrations/style-guide.mdIMPORTANT: Always read the actual Bible content before generating images.
# Extract book introduction from bible.json
node -e "const b = require('./site/src/data/bible.json'); const book = b.books.find(x => x.id === 'BOOK_ID'); console.log('Introduction:', book.introduction);"
Or read the full bible.json and find the book's introduction field.
# Extract chapter summary from bible.json
node -e "const b = require('./site/src/data/bible.json'); const book = b.books.find(x => x.id === 'BOOK_ID'); const ch = book.chapters.find(c => c.number === CHAPTER_NUM); console.log('Summary:', ch.summary);"
Or read the full bible.json and find the chapter's summary field.
The introductions and summaries contain:
This ensures generated images actually reflect the content rather than generic biblical imagery.
Use lib/generate-image.js to generate images:
# Generate with custom prompt and output path
PROMPT="Your prompt here" OUTPUT="site/public/images/my-image.png" node lib/generate-image.js
# Use Gemini 3 for better faces and quality (recommended)
MODEL="gemini-3-pro-image-preview" PROMPT="..." OUTPUT="..." node lib/generate-image.js
Environment variables:
PROMPT - The image generation prompt (required if not using default)OUTPUT - Output file path (default: site/public/header.png)ASPECT - Aspect ratio: "1:1", "3:4", "4:3", "9:16", "16:9" (default: "16:9")MODEL - Model to use (default: gemini-3-pro-image-preview)CRITICAL: Always use gemini-3-pro-image-preview for all image generation.
MODEL="gemini-3-pro-image-preview" PROMPT="..." OUTPUT="..." node lib/generate-image.js
DO NOT switch to alternative models (imagen, gemini-flash, etc.) without explicit user permission. If quota is exhausted:
The style consistency of the project depends on using a single model throughout.
Use lib/edit-image.js to fix or modify existing images without regenerating from scratch. This is useful for:
# Edit an existing image
INPUT="site/public/images/books/image.png" PROMPT="Edit instruction here" node lib/edit-image.js
# Save to different file (for comparison)
INPUT="site/public/images/books/image.png" OUTPUT="site/public/images/books/image-edit.png" PROMPT="..." node lib/edit-image.js
Environment variables:
INPUT - Path to existing image (required)OUTPUT - Output path (default: overwrites input)PROMPT - Edit instructionKeep edit prompts simple and specific:
# Good - specific and focused
"Change the halo to be a simple plain gold circular disc. Keep everything else the same."
# Good - targeted fix
"Remove the text/lettering from the image. Keep everything else identical."
# Bad - too vague
"Make it better"
Use editing when:
Regenerate when:
Always include these elements in order:
CRITICAL HALO RULES:
Prompting strategy for halos:
edit-image.js to fix it rather than complex promptingIMPORTANT: Always exclude text from images. Imagen is unreliable at spelling and lettering. Even requests for labels, names, or decorative text often produce gibberish or misspelled words. Use purely visual storytelling instead.
Creation of the world with light separating from darkness, medieval illuminated manuscript style.
Features: ornate golden Celtic knotwork border, divine light rays in gold leaf, swirling cosmos.
Colors: deep midnight blue, brilliant gold, cream highlights.
Composition: wide banner format. No text, no labels, no words, no lettering.
The return of the prodigal son embraced by his father, medieval illuminated manuscript style.
Features: Byzantine-influenced figures, pastoral background, ornate border.
Colors: rich burgundy robes, gold leaf accents, earth tones.
Composition: square vignette with decorative corner flourishes.
Saint Paul writing an epistle in prison, medieval illuminated manuscript style.
Features: Byzantine-influenced figure, writing implements, chains, divine light through window, Celtic knotwork border.
Colors: burgundy and gold robes, aged parchment, warm stone textures.
Composition: wide banner format.
Decorative illuminated border frame with empty center, medieval manuscript style.
Features: intricate Celtic interlace patterns, vine scrollwork, small symbolic animals in corners.
Colors: deep burgundy, forest green, burnished gold, aged parchment background.
Composition: square format, suitable as decorative element. No text, no letters, no writing.
Save generated images to:
site/public/images/books/ - Book header images (named {book-id}.png, e.g., genesis.png)site/public/images/chapters/ - Chapter illustrationssite/public/images/parables/ - Parable and narrative scenessite/public/images/decorative/ - Borders, initials, flourishesIMPORTANT: After generating an image, you MUST integrate it into the site.
Book pages automatically display header images if they exist at site/public/images/books/{book-id}.png.
The [book]/index.astro template checks for the image and renders a hero section:
Naming convention: Use the book's URL ID (e.g., genesis.png, 1-corinthians.png, acts.png)
Chapter pages automatically display header images if they exist at site/public/images/chapters/{book-id}-{chapter}.png.
The [book]/[chapter].astro template checks for the image and renders a hero section:
Naming convention: Use {book-id}-{chapter-number}.png (e.g., philemon-1.png, genesis-3.png, psalms-23.png)
If adding images to other pages, use this pattern:
<img src={`${import.meta.env.BASE_URL}images/books/genesis.png`} alt="Genesis" />
After generating an image:
Before generating, verify your prompt includes:
Halo Warning: The cruciform halo is reserved for Christ alone. For saints/apostles, keep halo prompts minimal (e.g., "golden halo") and use edit-image.js to fix any incorrect results rather than over-specifying in prompts.
Text Warning: Never request text, labels, names, banners, scrolls with writing, or any lettering. Imagen produces unreliable spelling and gibberish. Convey meaning through imagery alone.
See style-guide.md for complete visual reference.