oaustegard/claude-skills/invoking-gemini
Claude Code and agent skill by oaustegard/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Invokes Google Gemini models for structured outputs, image generation, text-to-speech narration, multi-modal tasks, and Google-specific features. Use when users request Gemini, image generation, Gemini TTS or a synthesized voice, structured JSON output, Google API integration, or cost-effective parallel processing.
Install
npx vskill@latest install oaustegard/claude-skills/invoking-geminiSKILL.md
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
Speech (TTS):
- Narration, voice-over, read-aloud with style direction per line
- A custom voice designed from a written description
- Two-speaker dialogue
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
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
Function Signature
Model Selection
| Alias | Model | Best For | Cost/image | |
|---|---|---|---|---|
"nano-banana-2" or "image" | gemini-3.1-flash-image-preview | Fast iteration, drafts | $0.067 | |
"image-pro" or "nano-banana-pro" | gemini-3-pro-image-preview | Published content, text rendering | $0.134 |
Complete Blog Header Example
Prompt Patterns
- Style prefix + subject: Prepend a style description, then describe the subject
- Be specific about style: "Risograph-inspired editorial illustration" not "a nice picture"
- Include composition: "Wide landscape format" / "centered, high contrast"
- Text rendering: "A poster with the text 'SALE' in bold red letters" (works well with image-pro)
- Negative constraints: "No photorealism, no glow effects" to avoid defaults
Custom Output Path
Speech Generation (TTS)
Gemini 3.8 Flash TTS and Flash-Lite TTS went GA on 2026-09-23. Output is WAV, 24 kHz mono 16-bit, SynthID-watermarked.
- Voices: 30 studio voices (
Charon,Kore,Algenib"gravelly",
Enceladus "breathy", ...) plus 2,059 persona voices with ids like en-gb-storyteller-4. list_voices() returns accent, pitch, gender and a description for each; the accent filter needs the exact string ("Winchester English"), so filter accents on the returned field.
- Style: pass
style=(aspeech_metadataannotation). Do not prefix the
text with "Style: ..." — the 3.8 models read the prefix aloud, and systemInstruction is rejected. Inline events go in the text: <laugh>, <sigh>, <breath>, <short pause>; CAPITALS stress a word.
- Designed voices are stored (1-year expiry, 200 per project). The
description sets baseline delivery too: "thoughtful pauses" in it produced 1–1.8 s mid-line pauses that no per-line style removed.
- The model can change words. Seen in a 29-line narration: "Hmm, I get
things wrong", "tell them" for "tell him". Anything with subtitles or a fixed script needs an ASR check (faster-whisper medium.en) and a retake.
- Cost: about 32 audio tokens per second of speech, $9/M through
2026-12-31 on 3.8 Flash TTS ($6/M Lite), so a minute is about $0.02.
- Voice replication (cloning from a 30 s sample plus a recorded consent clip) is
not wired in, and is unavailable in the EEA, UK, Switzerland, India, Illinois and Texas.
Basic Text Usage
Structured Output
Use Pydantic models for guaranteed JSON Schema compliance:
Nested models are supported. Gemini's responseSchema rejects $ref/$defs, which pydantic emits for every nested model, so the client inlines them before sending:
Budget output generously. Thinking tokens count against max_output_tokens (default 32768). Too low and the JSON truncates mid-object, which surfaces as a pydantic parse error rather than a length error — the client now detects finishReason=MAX_TOKENS and says so explicitly.
Parallel Invocation
Available Models
The current frontier Flash is gemini-3.8-flash (GA 2026-09-02), the default and the flash alias. Google shipped three Flash generations in six weeks: 3.6 (2026-07-21), 3.7 (2026-08-13), 3.8 (2026-09-02). Each stays callable under a pinned alias (flash-3.7, flash-3.6, flash-3.5, flash-3), and none has a shutdown date. gemini-3.1-flash-lite-preview from earlier docs is gone (shut down 2026-05-25).
The Pro tier is off routing. gemini-3.1-pro-preview costs 2.7× the input and 3.2× the output of 3.8 Flash at today's rates and loses to the 3.5+ Flash line on the coding and agentic benchmarks that matter here. Do not target it; the pro alias now resolves to gemini-3.8-flash, and "maximum reasoning" means thinking_level='high' on Flash.
Text / Reasoning Models
| Model | Alias | Input/1M | Output/1M | Context | Notes | |
|---|---|---|---|---|---|---|
| gemini-3.8-flash | flash | $0.75 → $1.50 | $3.75 → $7.50 | 1M in / 64K out | Default. GA 2026-09-02. Current frontier Flash. Vs 3.7: Terminal-Bench 2.1 90.8% vs 81.6%, SWE-Bench Pro 61.6% vs 60.4%, SWE-Atlas 51.9% vs 48.0%, HLE flat (45.4% vs 45.7%). Google says it "works harder" at higher effort, so expect more thinking tokens per task. thinking_level is low/medium/high only — minimal returns HTTP 400 and the client downgrades it to low. Default medium spent 79 thinking tokens on a one-word reply (measured 2026-09-03); pass low for non-reasoning tasks. | |
| gemini-3.7-flash | flash-3.7 | $0.75 → $1.50 | $3.75 → $7.50 | 1M / 64K | GA 2026-08-13. DeepSWE v1.1 65.3% vs 49.0% on 3.6, Terminal-Bench 2.1 85.8%. Same minimal restriction as 3.8. Google keeps it "fully supported for efficiency-first workloads". | |
| gemini-3.6-flash | flash-3.6 | $0.75 → $1.50 | $3.75 → $7.50 | 1M / 64K | GA 2026-07-21. ~17% fewer output tokens than 3.5 Flash. Last Flash that accepts thinking_level='minimal' (verified 2026-09-03). | |
| gemini-3.5-flash | flash-3.5 | $1.50 | $9.00 | 1M | GA 2026-05-19. Google's model list now labels it "legacy". Accepts minimal. Costs more on output than 3.6–3.8. | |
| gemini-3-flash-preview | flash-3 | $0.30 | $2.50 | 1M | Older preview Flash, kept for back compat. Google's listed migration target for it is gemini-3.6-flash; no shutdown date. | |
| — | $2.00 (≤200K) / $4.00 | $12.00 / $18.00 | 1M | DEPRECATED from routing (2026-09-03). Price/quality dominated by 3.6+ Flash; 3.5 Flash already beat it on most coding/agentic benchmarks. ID stays callable for pinned code. pro now resolves to gemini-3.8-flash. 3.5 Pro was announced at I/O 2026-05-19 for June and is still absent from the API as of 2026-09-03; it gets the same price/quality test before any alias points at it. | ||
| gemini-3.5-flash-lite | lite | $0.30 | $2.50 | 1M | Cheap/bulk tier. GA 2026-07-21. Fastest 3.5-class (350 output tok/sec); beats gemini-3-flash on SWE-Bench Pro and OSWorld-Verified. | |
stable-flash | $0.30 | $2.50 | 1M | DEPRECATED — 2025-era generation, do not route here. | ||
| — | $0.10 | $0.40 | 1M | DEPRECATED — cheaper, but a 2025-era generation. lite now resolves to gemini-3.5-flash-lite. | ||
stable-pro | $1.25 (≤200K) / $2.50 | $10.00 / $20.00 | 1M | DEPRECATED — 2025-era generation, do not route here. |
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginvoking-gemini/SKILL.md
Popularity
- Repository stars
- 113
- Repository forks
- 4
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/oaustegard/claude-skills/invoking-gemini)