Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add oaustegard/claude-skills --skill invoking-geminigit clone --depth 1 https://github.com/oaustegard/claude-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/oaustegard/claude-skills/invoking-gemini)<a href="https://agentmods.dev/skills/oaustegard/claude-skills/invoking-gemini"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/invoking-gemini/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/invoking-gemini"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/invoking-gemini.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 46 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00064 | $0.04464 |
| Opus 5.5 | $0.00026 | $0.01786 |
| Sonnet 5.5 | $0.00013 | $0.00893 |
| Haiku 4.5 | $0.00006 | $0.00446 |
Grade A, and why
invoking-gemini scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 390 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
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
import sys
sys.path.append('/mnt/skills/user/invoking-gemini/scripts')
from gemini_client import generate_image
# One call — returns {"path": "...", "caption": "..."} or None
result = generate_image("A watercolor painting of a mountain lake at sunset")
print(result["path"]) # /mnt/user-data/outputs/gemini_image_1740000000.png
Function Signature
generate_image(
prompt: str, # The image description
output_path: str = None, # Auto-generates if omitted
model: str = "nano-banana-2.1", # Default: fast. Use "image-pro" for quality
temperature: float = 0.7, # 0.5-0.7 for diagrams, 0.7-0.8 for illustrations
) -> dict | None
# Returns: {"path": "/mnt/user-data/outputs/gemini_image_*.png", "caption": str|None}
# Returns None on failure
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago Changed · +7 lines 7f09fa6bac02
- 2mo ago Changed · +57 lines · +14 tokens per session a19e6e6179d4
- 2mo ago Changed · +24 lines cb6bc3b61bea
- 3mo ago First seen · 302 lines · 50 tokens per session scan A 1ac9bf0cb870
invoking-gemini is a skill published in the GitHub repository oaustegard/claude-skills (423 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 4,464 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
invoking-gemini compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| invoking-geminioaustegard/claude-skills | Skill | 423 | today | MIT | A | 64 | Claude Code, Codex |
| recsys-pipeline-architectmturac/recsys-pipeline-architect | Skill | 2 | 6mo ago | none | A | 166 | Claude Code, Codex |
| prompt-engineeringkongyo2/prompt-engineering-skill | Skill | 3 | 1y ago | none | A | 60 | Claude Code, Codex |
| optimize-for-gpuK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 151 | Claude Code, Codex |
| umap-learnK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 52 | Claude Code, Codex |
| shapK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 46 | Claude Code |
| arboretoK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 55 | Claude Code, Codex |