invoking-geminilisted
Install: claude install-skill oaustegard/claude-skills
# Invoking Gemini
Delegate tasks to Google's Gemini models when they offer advantages over Claude.
## When to Use Gemini
**Image generation:**
- Blog header images, illustrations, diagrams
- Style-guided image creation (risograph, editorial, etc.)
- Text rendering in images
**Structured outputs:**
- JSON Schema validation with property ordering guarantees
- Pydantic model compliance
- Strict schema adherence (enum values, required fields)
**Cost optimization:**
- Parallel batch processing (Gemini 3 Flash is lightweight)
- High-volume simple tasks
**Multi-modal tasks:**
- Image analysis with JSON output
- Video processing
- Audio transcription with structure
## Setup
```bash
uv pip install requests pydantic
```
**Credentials — Option A (recommended): Cloudflare AI Gateway**
Source `/mnt/project/proxy.env` with `CF_ACCOUNT_ID`, `CF_GATEWAY_ID`, `CF_API_TOKEN`.
Requests route through Cloudflare AI Gateway, bypassing IP blocks. Google API key stored in gateway via BYOK.
**Credentials — Option B: Direct Google API**
If no `proxy.env`, falls back to direct: `GOOGLE_API_KEY.txt` or `API_CREDENTIALS.json`.
## Image Generation
Generate images using Gemini's native image models. This is the primary way to create illustrations, blog headers, diagrams, and visual content.
### Quick Start
```python
import sys
sys.path.append('/mnt/skills/user/invoking-gemini/scripts')
from gemini_client import generate_image
# One call — returns {"path": "...", "caption": "..."} or None
r