image-gen
БесплатноБез исполняемых скриптовНе проверенModular image generation - supports local SDXL Lightning, OpenAI DALL-E, Replicate, or custom providers
от DNYoussef★ 34 звезды на GitHubОб этом скилле
Modular Image Generation Skill
LIBRARY-FIRST PROTOCOL (MANDATORY)
Before writing ANY code, you MUST check:
Step 1: Library Catalog
- Location:
.claude/library/catalog.json - If match >70%: REUSE or ADAPT
Step 2: Patterns Guide
- Location:
.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md - If pattern exists: FOLLOW documented approach
Step 3: Existing Projects
- Location:
D:\Projects\* - If found: EXTRACT and adapt
Decision Matrix
| Match | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern exists | FOLLOW pattern |
| In project | EXTRACT |
| No match | BUILD (add to library after) |
Purpose
Generate images using the best available provider - local models (free, private) or cloud APIs (fast, paid). Fully modular architecture allows plugging in any image generation backend.
Providers
| Provider | Type | Cost | Requirements | Quality |
|---|---|---|---|---|
| SDXL Lightning | Local | Free | 8GB VRAM, ~7GB disk | Excellent |
| OpenAI DALL-E 3 | API | ~$0.04/image | OPENAI_API_KEY | Excellent |
| Replicate | API | ~$0.01/image | REPLICATE_API_TOKEN | Good |
| Custom | Any | Varies | User-defined | Varies |
When to Use
Perfect For:
- Blog banners and social media images (LinkedIn: 1200x630)
- Documentation diagrams and illustrations
- UI mockups and wireframes
- Concept visualization
- Any image generation need
Provider Selection:
- Privacy required? -> Use local SDXL
- No GPU? -> Use OpenAI or Replicate API
- Batch generation? -> Use local (no API costs)
- Highest quality? -> DALL-E 3 or SDXL Lightning
Quick Start
1. Check Available Providers
python scripts/multi-model/image-gen/cli.py --list
2. Setup Local SDXL (Recommended)
# First-time setup (downloads ~7GB)
python scripts/multi-model/image-gen/cli.py --setup local
3. Generate Images
# Auto-selects best available provider
python scripts/multi-model/image-gen/cli.py "A sunset over mountains" output.png
# LinkedIn banner size
python scripts/multi-model/image-gen/cli.py "Tech concept" banner.png --width 1200 --height 630
# Specific provider
python scripts/multi-model/image-gen/cli.py "A cat" cat.png --provider openai
Integration with Visual Art Composition
For professional-quality images, combine with visual-art-composition:
Step 1: visual-art-composition (Structure the prompt)
|
+---> 13-dimension aesthetic framework
+---> Cross-cultural synthesis
+---> Productive tension resolution
|
v
Step 2: image-gen (Generate the image)
|
+---> Select best provider (local or API)
+---> Generate high-quality image
+---> Save to specified path
Example Pipeline
# 1. Get structured prompt from visual-art-composition
/visual-art-composition "tech dashboard for productivity app"
# 2. Generate with structured prompt
python scripts/multi-model/image-gen/cli.py \
"Dashboard UI with linear perspective depth, composed blues and warm golds,
focal hierarchy with clear primary metric, notan two-value contrast.
Modern professional aesthetic, clean geometric forms." \
docs/images/dashboard.png --width 1200 --height 630
Provider Setup
Local SDXL Lightning (Recommended)
Requirements:
- GPU with 8GB+ VRAM (or CPU with 16GB+ RAM, slower)
- ~7GB disk space on D: drive
- Python with diffusers, torch
Setup:
python scripts/multi-model/image-gen/cli.py --setup local
Environment Variables (optional):
export SDXL_MODEL_DIR="D:/AI-Models/sdxl-lightning"
OpenAI DALL-E 3
Requirements:
- OpenAI API key
- ~$0.04 per image
Setup:
export OPENAI_API_KEY="sk-..."
python scripts/multi-model/image-gen/cli.py --setup openai
Replicate
Requirements:
- Replicate API token
- ~$0.01 per image
Setup:
export REPLICATE_API_TOKEN="r8_..."
python scripts/multi-model/image-gen/cli.py --setup replicate
Adding Custom Providers
Create a new provider by implementing ImageGeneratorBase:
from base import ImageGeneratorBase, ImageProvider, ProviderRegistry
class MyCustomGenerator(ImageGeneratorBase):
provider = ImageProvider.CUSTOM
def is_available(self) -> bool:
# Check if provider is configured
return True
def setup(self) -> bool:
# Download models, verify API keys, etc.
return True
def generate(self, prompt, output_path, config=None):
# Generate image
# Return GeneratedImage
pass
# Register
ProviderRegistry.register(ImageProvider.CUSTOM, MyCustomGenerator)
Python API
from scripts.multi_model.image_gen.base import ProviderRegistry, ImageConfig
# Get best available provider
provider = ProviderRegistry.get_best_available()
# Configure
config = ImageConfig(
width=1200,
height=63
Установить image-gen в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteTaskTodoWriteGlobGrepFAQ
Что делает скилл image-gen?
Modular image generation - supports local SDXL Lightning, OpenAI DALL-E, Replicate, or custom providers
Как установить скилл image-gen?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл image-gen запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic