Skip to main content

gemini-image-skill

Generate document and slide images with Google Gemini or Imagen models, including style selection, aspect ratios, and approval workflow guidance.

Source facts

Repository
jykim/ai4pkm-vault
Last source activity
April 14, 2026 at 22:51
Detected SKILL.md language
Korean
Stars
12
Forks
5

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
3 files

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
gemini-image-skill
description
Generate document and slide images with Google Gemini or Imagen models, including style selection, aspect ratios, and approval workflow guidance.
# Gemini Image Generation Skill Google Gemini API๋ฅผ ์‚ฌ์šฉํ•œ ์ด๋ฏธ์ง€ ์ƒ์„ฑ ์Šคํ‚ฌ. ์Šฌ๋ผ์ด๋“œ ๋ฐ ๋ฌธ์„œ์šฉ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ## Purpose Gemini 2.0 Flash ๋˜๋Š” Imagen 3 ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฌธ์„œ/์Šฌ๋ผ์ด๋“œ์— ํ•„์š”ํ•œ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ํ•ด์ƒ๋„์™€ ์ข…ํšก๋น„ ์„ ํƒ์„ ์ง€์›ํ•˜๋ฉฐ, ์‚ฌ์šฉ์ž ์Šน์ธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค. ## When to Use This Skill - "Gemini๋กœ ์ด๋ฏธ์ง€ ์ƒ์„ฑํ•ด์ค˜" - "์Šฌ๋ผ์ด๋“œ์šฉ ๊ทธ๋ฆผ์„ Gemini API๋กœ ๋งŒ๋“ค์–ด์ค˜" - "ํ”„๋ ˆ์  ํ…Œ์ด์…˜์— ๋„ฃ์„ ์ผ๋Ÿฌ์ŠคํŠธ ์ƒ์„ฑ" - ๋ฌด๋ฃŒ ํ‹ฐ์–ด ์ด๋ฏธ์ง€ ์ƒ์„ฑ์ด ํ•„์š”ํ•  ๋•Œ (Gemini 2.0 Flash) - ํŠน์ • ์ข…ํšก๋น„๊ฐ€ ํ•„์š”ํ•  ๋•Œ (16:9, 9:16 ๋“ฑ) ## Environment Setup ```bash # 1. API ํ‚ค ์„ค์ • export GEMINI_API_KEY="your-api-key" # 2. ์˜์กด์„ฑ ์„ค์น˜ pip install google-genai Pillow ``` ## Workflow ### Phase 1: Analysis 1. ๋Œ€์ƒ ๋ฌธ์„œ/์Šฌ๋ผ์ด๋“œ ์ฝ๊ธฐ 2. ์ด๋ฏธ์ง€๊ฐ€ ํ•„์š”ํ•œ ์„น์…˜/์Šฌ๋ผ์ด๋“œ ์‹๋ณ„ 3. ๊ฐ ์„น์…˜์˜ ํ•ต์‹ฌ ์ปจ์…‰ ์ถ”์ถœ ### Phase 2: Style & Configuration Selection **์Šคํƒ€์ผ ์˜ต์…˜:** | # | ์Šคํƒ€์ผ | ์„ค๋ช… | ์ ํ•ฉํ•œ ์šฉ๋„ | |---|--------|------|-------------| | 1 | **Infographic (๊ธฐ๋ณธ)** | ๋ ˆ์ด๋ธ”/ํ…์ŠคํŠธ ํฌํ•จ, dense | **๋ฌธ์„œ, ๋ฐœํ‘œ** | | 2 | Technical Diagram | ๊น”๋”ํ•œ ์„ , ํ”Œ๋กœ์šฐ์ฐจํŠธ | ๊ธฐ์ˆ  ๋ฌธ์„œ | | 3 | Vibrant Modern Cartoon | ๋ฐ์€ ๊ทธ๋ผ๋ฐ์ด์…˜, ํ”Œ๋žซ | ๋น„์ฆˆ๋‹ˆ์Šค, ๊ต์œก | | 4 | Professional Minimalist | ์ ˆ์ œ๋œ ์ƒ‰์ƒ, ๊ธฐํ•˜ํ•™ | ๊ณต์‹ ๋ฐœํ‘œ | | 5 | Bold Graphic | ๊ณ ๋Œ€๋น„, ํŒ์•„ํŠธ | ๋งˆ์ผ€ํŒ… | | 6 | Custom | ์‚ฌ์šฉ์ž ์ง€์ • | ์ž์œ  | > **๊ธฐ๋ณธ๊ฐ’**: Infographic ์Šคํƒ€์ผ (ํ…์ŠคํŠธ/๋ ˆ์ด๋ธ” ํฌํ•จ) **๋ชจ๋ธ ์„ ํƒ:** | ๋ชจ๋ธ | ๋น„์šฉ | ํŠน์ง• | |------|------|------| | gemini-3-pro-image-preview | $0.06/์žฅ | **๊ธฐ๋ณธ๊ฐ’**, ํ•œ๊ธ€ ์™„๋ฒฝ, ์ตœ๊ณ  ํ’ˆ์งˆ | | gemini-2.5-flash-image | $0.039/์žฅ | ์ข…ํšก๋น„ ์ง€์›, ๋น ๋ฆ„ | | gemini-2.0-flash-exp | ๋ฌด๋ฃŒ | ๋น ๋ฆ„, ๋ฐ˜๋ณต์šฉ (ํ•œ๊ธ€ ๊นจ์ง) | | imagen-4.0-generate-001 | $0.03/์žฅ | Imagen 4.0, ๊ณ ํ’ˆ์งˆ | **์ข…ํšก๋น„ ์˜ต์…˜:** `1:1`, `9:16`, `16:9`, `3:4`, `4:3`, `3:2`, `2:3`, `21:9` > **์Šฌ๋ผ์ด๋“œ์šฉ**: `--aspect-ratio 16:9` (๊ธฐ๋ณธ ๋ชจ๋ธ์ด gemini-3-pro-image-preview) ### Phase 3: Image Generation ```bash python3 "generate_gemini_image.py" \ "[์ƒ์„ธ ์„ค๋ช…]" \ --output-path "[๊ฒฝ๋กœ]" \ --style "[์Šคํƒ€์ผ]" \ --model "[๋ชจ๋ธ]" \ --aspect-ratio "[์ข…ํšก๋น„]" \ --auto-approve ``` ### Phase 4: Integration **์Šฌ๋ผ์ด๋“œ:** ```markdown ![right fit](_files_/filename.png) ``` **๋ฌธ์„œ:** ```markdown ![](path/to/image.png) ``` ## Style Descriptions for Script | ์Šคํƒ€์ผ | --style ๊ฐ’ | |--------|------------| | **Infographic (๊ธฐ๋ณธ)** | `"clean infographic with labeled sections, icons, and visual hierarchy"` | | Technical Diagram | `"technical diagram with flowchart elements, arrows, and labeled components"` | | Vibrant Modern Cartoon | `"vibrant modern minimalist cartoon illustration"` | | Professional Minimalist | `"professional minimalist illustration with muted colors and clean geometric shapes"` | | Bold Graphic | `"bold graphic illustration with high contrast colors and strong geometric shapes"` | **ํ”„๋กฌํ”„ํŠธ ์ž‘์„ฑ ํŒ**: - โœ… "4๋‹จ๊ณ„ ํ”„๋กœ์„ธ์Šค๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ์ธํฌ๊ทธ๋ž˜ํ”ฝ, ๊ฐ ๋‹จ๊ณ„์— ์•„์ด์ฝ˜๊ณผ ๋ ˆ์ด๋ธ”" - โœ… "๋น„๊ต ์ฐจํŠธ: A vs B, ์žฅ๋‹จ์  ํ‘œ์‹œ" - โŒ "๋‘ ์‚ฌ๋žŒ์ด ์—ฐ๊ฒฐ๋œ ์ถ”์ƒ์  ์ผ๋Ÿฌ์ŠคํŠธ" (์˜๋ฏธ ์ „๋‹ฌ ์–ด๋ ค์›€) ## File Naming Convention **์Šฌ๋ผ์ด๋“œ:** `[slide-topic-slug].png` - ์˜ˆ: `ai-changes-game.png`, `team-collaboration.png` - ์œ„์น˜: ์Šฌ๋ผ์ด๋“œ์™€ ๊ฐ™์€ `_files_/` ๋””๋ ‰ํ† ๋ฆฌ **๋ฌธ์„œ:** `[section-number]-[topic-slug].png` - ์˜ˆ: `01-introduction.png`, `03-methodology.png` ## Cost Estimation ์ƒ์„ฑ ์ „ ๋น„์šฉ ์•ˆ๋‚ด: - Gemini 2.0 Flash: ๋ฌด๋ฃŒ - Imagen 3: $0.03/์žฅ - ์˜ˆ: "10์žฅ ์ƒ์„ฑ ์‹œ $0.30 (Imagen 3 ๊ธฐ์ค€)" ## Error Handling | ์—๋Ÿฌ | ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• | |------|-----------| | API ํ‚ค ์—†์Œ | `GEMINI_API_KEY` ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ • | | ์•ˆ์ „ ํ•„ํ„ฐ ์ฐจ๋‹จ | ํ”„๋กฌํ”„ํŠธ ์ˆ˜์ • ํ›„ ์žฌ์‹œ๋„ | | ๋ชจ๋ธ ๋ฏธ์ง€์› | ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ๋กœ ๋ณ€๊ฒฝ | | ๋„คํŠธ์›Œํฌ ์˜ค๋ฅ˜ | ์žฌ์‹œ๋„ | ## Example Invocation ### ๊ธฐ๋ณธ ์‚ฌ์šฉ ```bash python3 generate_gemini_image.py "AI ์ง€์‹ ๋…ธ๋™์ž๊ฐ€ ์ฑ…์ƒ์—์„œ ์ž‘์—…ํ•˜๋Š” ๋ชจ์Šต" \ --output-path "_files_/knowledge-worker.png" ``` ### 16:9 ์Šฌ๋ผ์ด๋“œ์šฉ (๊ถŒ์žฅ) ```bash python3 generate_gemini_image.py "ํŒ€ ํ˜‘์—… ๋ฏธํŒ…" \ --output-path "_files_/team-meeting.png" \ --model "gemini-2.5-flash-image" \ --aspect-ratio "16:9" \ --style "professional minimalist illustration" ``` ### ๊ณ ํ’ˆ์งˆ ์ด๋ฏธ์ง€ (Imagen 4.0) ```bash python3 generate_gemini_image.py "์ œํ’ˆ ์‡ผ์ผ€์ด์Šค" \ --output-path "_files_/product.png" \ --model "imagen-4.0-generate-001" ``` ### ๋ฐฐ์น˜ ์ฒ˜๋ฆฌ (์ž๋™ ์Šน์ธ) ```bash python3 generate_gemini_image.py "ํ˜์‹  ์ปจ์…‰" \ --output-path "_files_/innovation.png" \ --auto-approve ``` ## Best Practices 1. **์ธํฌ๊ทธ๋ž˜ํ”ฝ ์Šคํƒ€์ผ ์„ ํ˜ธ**: ํ…์ŠคํŠธ/๋ ˆ์ด๋ธ” ํฌํ•จ๋œ denseํ•œ ์ •๋ณด ์‹œ๊ฐํ™” 2. **์Šคํƒ€์ผ ์ผ๊ด€์„ฑ**: ๊ฐ™์€ ๋ฌธ์„œ/์Šฌ๋ผ์ด๋“œ ๋‚ด์—์„œ ๋™์ผ ์Šคํƒ€์ผ ์œ ์ง€ 3. **์ƒ์„ธํ•œ ํ”„๋กฌํ”„ํŠธ**: ๊ตฌ์ฒด์ ์ธ ์‹œ๊ฐ์  ๋ฉ”ํƒ€ํฌ์™€ ์ปจ์…‰ ํฌํ•จ 4. **๋ฐฐ์น˜ ์ƒ์„ฑ**: ๋ชจ๋“  ์ด๋ฏธ์ง€ ๋จผ์ € ์ƒ์„ฑ ํ›„ ์ผ๊ด„ ์‚ฝ์ž… 5. **๋น„์šฉ ํ™•์ธ**: ์ƒ์„ฑ ์ „ ์˜ˆ์ƒ ๋น„์šฉ ํ™•์ธ > โš ๏ธ **ํ”ผํ•ด์•ผ ํ•  ๊ฒƒ**: ์ถ”์ƒ์ ์ธ ์ผ๋Ÿฌ์ŠคํŠธ (์˜ˆ: ์‚ฌ๋žŒ๋“ค์ด ์—ฐ๊ฒฐ๋œ ๋ชจํ˜ธํ•œ ๊ทธ๋ฆผ) > โœ… **์„ ํ˜ธ**: ๋‹ค์ด์–ด๊ทธ๋žจ, ํ”Œ๋กœ์šฐ์ฐจํŠธ, ๋ ˆ์ด๋ธ”์ด ์žˆ๋Š” ์ธํฌ๊ทธ๋ž˜ํ”ฝ ## Comparison with DALL-E Skill | ๊ธฐ๋Šฅ | DALL-E | Gemini | |------|--------|--------| | ๋ฌด๋ฃŒ ํ‹ฐ์–ด | X | O (Flash) | | ์ข…ํšก๋น„ | ์ •์‚ฌ๊ฐํ˜•๋งŒ | 5๊ฐ€์ง€ ์˜ต์…˜ | | ์ถœ๋ ฅ ํฌ๋งท | JPEG | PNG/JPEG | | ๋น„์šฉ | $0.04 | $0~$0.03 | **์„ ํƒ ๊ธฐ์ค€:** - **DALL-E**: ๊ฒ€์ฆ๋œ ํ’ˆ์งˆ, ๊ธฐ์กด ์›Œํฌํ”Œ๋กœ์šฐ - **Gemini**: ๋ฌด๋ฃŒ ์˜ต์…˜ ํ•„์š”, ๋‹ค์–‘ํ•œ ์ข…ํšก๋น„ ํ•„์š”
View on GitHub