mcpField
G
gemini-guide

gemini-guide

github.com/jezwebDevelopment1.1k149 installsUpdated 3w ago
Repository

About gemini-guide

gemini-guide is a skill for Claude to look up Gemini API documentation and SDK patterns; it does not call Gemini. It consults code-generation instructions, Google AI documentation, and optional local documentation caches in priority order.

Key features

  1. 01Look up Gemini API documentation
  2. 02Find JavaScript and Python SDK patterns
  3. 03Check for deprecated usage first
  4. 04Locate documentation by topic
  5. 05Use local caches or online docs

Use cases

  1. 01Write Gemini API integration code
  2. 02Verify SDK initialization and calls
  3. 03Find model and API topic details

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jezweb/claude-skills --skill gemini-guide

After installing, type/gemini-guidein Claude Code to confirm it loaded.

Bundled filesreferences/deprecated-patterns.mdreferences/topic-index.md

Details

From the project README

Gemini Guide

Look up Gemini API documentation and SDK patterns when building with Google Gemini. This skill brings Gemini docs TO Claude — it does not call Gemini.

SkillDirectionTool
gemini-guide (this)Gemini docs -> ClaudeWebFetch, local docs
gemini-peer-reviewCode -> GeminiDirect Gemini API

Documentation Sources

Check in this priority order:

PrioritySourceBest For
1GitHub codegen_instructionsAlways-current SDK patterns — fetch https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/codegen_instructions.md
2Google AI docs via WebFetchOfficial docs — https://ai.google.dev/gemini-api/docs/{topic} (append .md.txt for markdown)
3Local cached docs (if available at ~/Documents/google-gemini-context/)Pre-fetched topics — 24 JS, 24 Python, 7 common

Lookup Workflow

When the user asks about a Gemini topic:

  1. Check corrections first: Read references/deprecated-patterns.md — know what NOT to suggest before writing any code
  2. Fetch latest SDK patterns: Get the GitHub codegen_instructions.md for always-current patterns
  3. Map the query to a topic: Read references/topic-index.md — if local docs exist at ~/Documents/google-gemini-context/, read the matching file; otherwise use WebFetch on https://ai.google.dev/gemini-api/docs/{topic}.md.txt
  4. Synthesise: Combine the documentation into a clear answer with working code examples. Always use the CORRECT patterns from step 1.

Quick Corrections

These are the most common mistakes. Apply these even without reading the full references:

Claude Might SuggestCorrect
@google/generative-ai@google/genai
google-generativeai (Python)google-genai
GoogleGenerativeAIGoogleGenAI
genAI.getGenerativeModel()ai.models.generateContent()
model.startChat() / chat.sendMessage()ai.chats.create() / chat.send()
generationConfigconfig
stream=True (method param)config={"stream": True}
gemini-progemini-2.5-flash
gemini-pro-visiongemini-2.5-flash (unified multimodal)
4 safety categories5 categories (include HARM_CATEGORY_CIVIC_INTEGRITY)
HARM_CATEGORY_DANGEROUS_CONTENTHARM_CATEGORY_DANGEROUS (no _CONTENT)
X-Goog-Api-Key (capitalised)x-goog-api-key (lowercase)
Daily rate limitsNo daily limits — only per-minute (RPM, TPM)
Correct Initialisation (JS)
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});  // auto-reads GEMINI_API_KEY env var
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash",
  contents: "Your prompt"
});
Correct Initialisation (Python)
from google import genai
client = genai.Client()  # auto-reads GEMINI_API_KEY env var
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Your prompt"
)

Local Docs (Optional)

If you have a local cache at ~/Documents/google-gemini-context/, it contains:

DirectoryContents
javascript/24 topic files — quickstart, function-calling, streaming, structured-output, etc.
python/24 topic files — same topics as JavaScript
common/7 cross-language files — safety, pricing, rate-limits, errors, auth, regions, openai-compat
rest-api/REST endpoint docs
MODELS.mdCurrent model IDs, capabilities, token limits, rate limits
googlegenai-gemini-api.mdComprehensive SDK guide (608 lines, JS + Python)

If not available, fall back to WebFetch on Google AI docs (append .md.txt for markdown format).

Current Models

ModelIDBest For
Gemini 2.5 Progemini-2.5-proComplex reasoning, advanced coding
Gemini 2.5 Flashgemini-2.5-flashMost tasks (recommended default)
Gemini 2.5 Flash-Litegemini-2.5-flash-lite-preview-06-17Budget, low latency
Gemini 2.0 Flashgemini-2.0-flashFast inference
Text Embeddingtext-embedding-004Semantic search, RAG (768 dims)

For full model details, check ~/Documents/google-gemini-context/MODELS.md (if available) or https://ai.google.dev/gemini-api/docs/models.

Maintenance

When information seems wrong or outdated:

  1. Check the GitHub codegen_instructions.md (always current)
  2. Verify model IDs against https://ai.google.dev/gemini-api/docs/models
  3. Flag stale docs to the user

Reference Files

WhenRead
Mapping a query to a documentation filereferences/topic-index.md
Checking for deprecated patterns before writing codereferences/deprecated-patterns.md

Comments

Markdown supported