google-gemini-api
Google Gemini API with @google/genai SDK. Use for multimodal AI, thinking mode, function calling, or encountering SDK deprecation warnings, context errors, multimodal format errors.
npx skills add majiayu000/claude-skill-registry --skill google-gemini-api-secondsky-claude-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Google Gemini API - Complete Guide **Package**: @google/genai@1.27.0 (⚠️ NOT @google/generative-ai) **Last Updated**: 2025-11-21 --- ## ⚠️ CRITICAL SDK MIGRATION WARNING **DEPRECATED SDK**: `@google/generative-ai` (sunset November 30, 2025) **CURRENT SDK**: `@google/genai` v1.27+ **If you see code using `@google/generative-ai`, it's outdated!** **Load `references/sdk-migration-guide.md` for complete migration steps.** --- ## Quick Start ### Installation **✅ CORRECT SDK:** ```bash bun add @google/genai@1.27.0 ``` **❌ WRONG (DEPRECATED):** ```bash bun add @google/generative-ai # DO NOT USE! ``` ### Environment Setup ```bash export GEMINI_API_KEY="your-api-key" ``` ### First Text Generation ```typescript import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }); const response = await ai.models.generateContent({ model: 'gemini-2.5-flash', contents: 'Explain quantum computing in simple terms' }); console.log(response.text); ``` **See Full Template**: `templates/basic-usage.ts` --- ## Current Models (2025) ### gemini-2.5-flash ⭐ RECOMMENDED - **Best for**: General-purpose AI, high-volume production, agentic workflows - **Input toke
- ⚠️ CRITICAL SDK MIGRATION WARNING
- Quick Start
- Installation
- Environment Setup
- First Text Generation
- Current Models (2025)
- gemini-2.5-flash ⭐ RECOMMENDED
- gemini-2.5-pro
- gemini-2.5-flash-lite
- Text Generation
- Basic Generation
- With Configuration
- Streaming
- Multimodal Inputs
bun add @google/genai@1.27.0 bun add @google/generative-ai # DO NOT USE! export GEMINI_API_KEY="your-api-key" npm uninstall @google/generative-ai export GEMINI_API_KEY="your-key"
What does the google-gemini-api skill do?
Google Gemini API with @google/genai SDK. Use for multimodal AI, thinking mode, function calling, or encountering SDK deprecation warnings, context errors, multimodal format errors.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill google-gemini-api-secondsky-claude-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
