gemini-guide by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill gemini-guide在使用 Google Gemini 进行构建时,查阅 Gemini API 文档和 SDK 模式。此技能将 Gemini 文档带给 Claude —— 它不会调用 Gemini。
| 技能 | 方向 | 工具 |
|---|---|---|
| gemini-guide (本技能) | Gemini 文档 -> Claude | WebFetch, 本地文档 |
| gemini-peer-review | 代码 -> Gemini | 直接 Gemini API |
按此优先级顺序检查:
| 优先级 | 来源 | 最佳用途 |
|---|---|---|
| 1 | GitHub codegen_instructions | 始终最新的 SDK 模式 —— 获取 https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/codegen_instructions.md |
| 2 | 通过 WebFetch 获取的 Google AI 文档 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
官方文档 —— https://ai.google.dev/gemini-api/docs/{topic} (对于 markdown 格式,追加 .md.txt) |
| 3 | 本地缓存的文档 (如果存在于 ~/Documents/google-gemini-context/) | 预获取的主题 —— 24 个 JS,24 个 Python,7 个通用 |
当用户询问关于 Gemini 的主题时:
~/Documents/google-gemini-context/,则读取匹配的文件;否则在 https://ai.google.dev/gemini-api/docs/{topic}.md.txt 上使用 WebFetch这些是最常见的错误。即使没有阅读完整的参考资料,也要应用这些修正:
| Claude 可能建议 | 正确 |
|---|---|
@google/generative-ai | @google/genai |
google-generativeai (Python) | google-genai |
GoogleGenerativeAI | GoogleGenAI |
genAI.getGenerativeModel() | ai.models.generateContent() |
model.startChat() / chat.sendMessage() | ai.chats.create() / chat.send() |
generationConfig | config |
stream=True (方法参数) | config={"stream": True} |
gemini-pro | gemini-2.5-flash |
gemini-pro-vision | gemini-2.5-flash (统一的多模态) |
| 4 个安全类别 | 5 个类别 (包含 HARM_CATEGORY_CIVIC_INTEGRITY) |
HARM_CATEGORY_DANGEROUS_CONTENT | HARM_CATEGORY_DANGEROUS (没有 _CONTENT) |
X-Goog-Api-Key (大写) | x-goog-api-key (小写) |
| 每日速率限制 | 无每日限制 —— 只有每分钟限制 (RPM, TPM) |
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({}); // 自动读取 GEMINI_API_KEY 环境变量
const response = await ai.models.generateContent({
model: "gemini-2.5-flash",
contents: "Your prompt"
});
from google import genai
client = genai.Client() # 自动读取 GEMINI_API_KEY 环境变量
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Your prompt"
)
如果你在 ~/Documents/google-gemini-context/ 有本地缓存,它包含:
| 目录 | 内容 |
|---|---|
javascript/ | 24 个主题文件 —— 快速入门、函数调用、流式传输、结构化输出等。 |
python/ | 24 个主题文件 —— 与 JavaScript 相同的主题 |
common/ | 7 个跨语言文件 —— 安全性、定价、速率限制、错误、认证、区域、openai 兼容性 |
rest-api/ | REST 端点文档 |
MODELS.md | 当前模型 ID、能力、令牌限制、速率限制 |
googlegenai-gemini-api.md | 综合 SDK 指南 (608 行,JS + Python) |
如果不可用,则回退到在 Google AI 文档上使用 WebFetch (对于 markdown 格式,追加 .md.txt)。
| 模型 | ID | 最佳用途 |
|---|---|---|
| Gemini 2.5 Pro | gemini-2.5-pro | 复杂推理、高级编码 |
| Gemini 2.5 Flash | gemini-2.5-flash | 大多数任务 (推荐默认) |
| Gemini 2.5 Flash-Lite | gemini-2.5-flash-lite-preview-06-17 | 预算、低延迟 |
| Gemini 2.0 Flash | gemini-2.0-flash | 快速推理 |
| 文本嵌入 | text-embedding-004 | 语义搜索、RAG (768 维) |
有关完整的模型详细信息,请检查 ~/Documents/google-gemini-context/MODELS.md (如果可用) 或 https://ai.google.dev/gemini-api/docs/models。
当信息看起来错误或过时时:
https://ai.google.dev/gemini-api/docs/models 验证模型 ID| 何时 | 阅读 |
|---|---|
| 将查询映射到文档文件时 | references/topic-index.md |
| 在编写代码前检查已弃用的模式时 | references/deprecated-patterns.md |
每周安装数
149
仓库
GitHub 星标数
652
首次出现
2026年2月24日
安全审计
安装于
gemini-cli129
codex129
opencode128
github-copilot128
kimi-cli127
cursor127
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.
| Skill | Direction | Tool |
|---|---|---|
| gemini-guide (this) | Gemini docs -> Claude | WebFetch, local docs |
| gemini-peer-review | Code -> Gemini | Direct Gemini API |
Check in this priority order:
| Priority | Source | Best For |
|---|---|---|
| 1 | GitHub codegen_instructions | Always-current SDK patterns — fetch https://raw.githubusercontent.com/googleapis/js-genai/refs/heads/main/codegen_instructions.md |
| 2 | Google AI docs via WebFetch | Official docs — https://ai.google.dev/gemini-api/docs/{topic} (append .md.txt for markdown) |
| 3 | Local cached docs (if available at ~/Documents/google-gemini-context/) | Pre-fetched topics — 24 JS, 24 Python, 7 common |
When the user asks about a Gemini topic:
~/Documents/google-gemini-context/, read the matching file; otherwise use WebFetch on https://ai.google.dev/gemini-api/docs/{topic}.md.txtThese are the most common mistakes. Apply these even without reading the full references:
| Claude Might Suggest | Correct |
|---|---|
@google/generative-ai | @google/genai |
google-generativeai (Python) | google-genai |
GoogleGenerativeAI | GoogleGenAI |
genAI.getGenerativeModel() | ai.models.generateContent() |
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"
});
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"
)
If you have a local cache at ~/Documents/google-gemini-context/, it contains:
| Directory | Contents |
|---|---|
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.md | Current model IDs, capabilities, token limits, rate limits |
googlegenai-gemini-api.md |
If not available, fall back to WebFetch on Google AI docs (append .md.txt for markdown format).
| Model | ID | Best For |
|---|---|---|
| Gemini 2.5 Pro | gemini-2.5-pro | Complex reasoning, advanced coding |
| Gemini 2.5 Flash | gemini-2.5-flash | Most tasks (recommended default) |
| Gemini 2.5 Flash-Lite | gemini-2.5-flash-lite-preview-06-17 | Budget, low latency |
| Gemini 2.0 Flash | gemini-2.0-flash | Fast inference |
| Text Embedding | text-embedding-004 |
For full model details, check ~/Documents/google-gemini-context/MODELS.md (if available) or https://ai.google.dev/gemini-api/docs/models.
When information seems wrong or outdated:
https://ai.google.dev/gemini-api/docs/models| When | Read |
|---|---|
| Mapping a query to a documentation file | references/topic-index.md |
| Checking for deprecated patterns before writing code | references/deprecated-patterns.md |
Weekly Installs
149
Repository
GitHub Stars
652
First Seen
Feb 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli129
codex129
opencode128
github-copilot128
kimi-cli127
cursor127
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
47,800 周安装
model.startChat() / chat.sendMessage() | ai.chats.create() / chat.send() |
generationConfig | config |
stream=True (method param) | config={"stream": True} |
gemini-pro | gemini-2.5-flash |
gemini-pro-vision | gemini-2.5-flash (unified multimodal) |
| 4 safety categories | 5 categories (include HARM_CATEGORY_CIVIC_INTEGRITY) |
HARM_CATEGORY_DANGEROUS_CONTENT | HARM_CATEGORY_DANGEROUS (no _CONTENT) |
X-Goog-Api-Key (capitalised) | x-goog-api-key (lowercase) |
| Daily rate limits | No daily limits — only per-minute (RPM, TPM) |
| Comprehensive SDK guide (608 lines, JS + Python) |
| Semantic search, RAG (768 dims) |