image-generationlisted
Install: claude install-skill puretechnyc/purebrain-skills
# Image Generation Skill
**Purpose**: Generate images using AI image generation APIs (Google Gemini, FLUX.2 via Replicate, DALL-E, or similar).
---
## PLATFORM-SPECIFIC REQUIREMENTS
| Platform | Aspect Ratio | Max Size | Format | Resolution |
|----------|--------------|----------|--------|------------|
| **Blog header** | 16:9 | No limit | PNG | 2K |
| **Bluesky** | 1:1 SQUARE | <976KB | JPEG | 1K |
| **Twitter** | 16:9 | ~5MB | PNG/JPEG | 2K |
| **LinkedIn** | 16:9 or 1:1 | No limit | PNG | 2K |
### Bluesky Compression (MANDATORY for posts)
Bluesky REJECTS images >976KB. Always compress:
```python
from PIL import Image
def compress_for_bluesky(input_path: str, output_path: str):
"""Compress image for Bluesky (<976KB requirement)."""
img = Image.open(input_path)
if img.mode in ('RGBA', 'P'):
img = img.convert('RGB')
img.save(output_path, "JPEG", quality=85, optimize=True)
print(f"Compressed: {output_path}")
```
---
## Quick Start (Google Gemini)
```python
from google import genai
from google.genai import types
import os
client = genai.Client(api_key=os.environ['GOOGLE_API_KEY'])
# Generate image
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents="A digital art piece showing interconnected nodes in a constellation pattern",
config=types.GenerateContentConfig(
response_modalities=['IMAGE'],
image_config=types.ImageConfig(
aspect_ratio="16:9",
image_s