gemini-api-dev
Skill4.2k starsChanged 2 months agoApache-2.0View on GitHub
Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice design, voice replication, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best practices for Gemini models and agents in Python and TypeScript.
- Installs packages
5 other projects use a version of this, 4 of them edited.
Trending
More talk lately.about the whole repository
Most recently taken up by
- PracticalSwan/agent-skillsedited, first seen Sep 14, 2026
- danielvogler/ai-skills-libraryedited, first seen Jun 3, 2026
- kumaran-is/claude-code-onboardingtheir own version, first seen May 25, 2026
- Fandry96/k3-agentic-skillsedited, first seen May 12, 2026
- JetBrains/skillsedited, first seen Apr 28, 2026
Who's talking about google-gemini/gemini-skills
- @precisement.bsky.social“NB : depuis peu les skills fonctionnent aussi avec ChatGPT help.openai.com/en/articles/... ou Codex …”Bluesky · Mar 18, 2026 · 3 likes
- @chicagomike.bsky.social“Agreed. Looks like the gemini team is working on it. github.com/google-gemin...”Bluesky · Apr 29, 2026 · 1 likes
- @takeshy.bsky.social“obsidian-gemini-helperを更新。 最近 github.com/google-gemin... がリリースされたのでそのskillsを使ってclaudeに改善を依頼したら、めっちゃ改善された。 - …”Bluesky · Mar 27, 2026 · 1 likes
- GoogleCloudPlatform/vertex-ai-samples“feat: Add Gen AI SDK skill for Vertex”GitHub · Mar 24, 2026 · 1 reactions
- A Hacker News story“Gemini-skills: Skills for the Gemini API, SDK and model/agent interactions”Hacker News · Feb 14, 2026 · 1 points
The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 27
Talked about on GitHub, Bluesky and Hacker News (27 times).
On GitHub · 23
- Mar 24, 2026feat: Add Gen AI SDK skill for Vertex — GoogleCloudPlatform/vertex-ai-samples1 reaction · 1 comment
- Oct 4, 2026codex-plugins.github.google-gemini.gemini-skills: init at 0-unstable-2026-09-23 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-marketplaces.github.google-gemini.gemini-skills: init at 0-unstable-2026-09-23 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.google-gemini.gemini-skills: init at 0-unstable-2026-09-23 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.google-gemini.gemini-skills: 0-unstable-2026-09-17 → 0-unstable-2026-09-23 — sudosubin/agents.nix0 reactions
18 more on GitHub
- Oct 3, 2026[Candidate] google-gemini/gemini-skills/skills/gemini-omni-flash-api - gemini-omni-flash-api — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 3, 2026[Candidate] google-gemini/gemini-skills/skills/gemini-live-api-dev - gemini-live-api-dev — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 3, 2026[Candidate] google-gemini/gemini-skills/skills/gemini-api-dev - gemini-api-dev — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 28, 2026gemini-skills: upstream update — robomotionio/robomotion-skills0 reactions
- Sep 27, 2026agent-skills.github.google-gemini.gemini-skills: init at 0-unstable-2026-09-17 — sudosubin/agents.nix0 reactions
- Sep 15, 2026SAN-1272 — Make MDE AI coding agents choose the right skills, workflow, and checks — amoai-tech/mdeai0 reactions · 4 comments
- Sep 5, 2026Profile: Google Gemini Live API Dev 0.0.5 — nota-america/forgecat-agent-profiles0 reactions
- Sep 5, 2026Profile: Google Gemini Interactions API 0.0.5 — nota-america/forgecat-agent-profiles0 reactions
- Sep 4, 2026Profile: Google Gemini API Dev 0.0.6 — nota-america/forgecat-agent-profiles0 reactions
- Jun 24, 2026docs: add bilingual Skills catalog README — EcaleD/skill-management-repo-test0 reactions
- May 1, 2026Profile batch: gemini-skills set — nota-america/forgecat-agent-profiles0 reactions
- Apr 29, 2026LiveConnectConfig missing historyConfig for Gemini Live 3.1 — googleapis/java-genai0 reactions · 1 comment
- Apr 22, 2026please add this where it needs to go.. Thank you — Floridadoll1313/AI-Surfer-Marketing-Agency0 reactions
- Apr 22, 2026please add this to our site where it needs to go — Floridadoll1313/AI-Surfer-Marketing-Agency0 reactions
- Apr 22, 2026please add this to our site please — Floridadoll1313/AI-Surfer-Marketing-Agency0 reactions
- Apr 1, 2026增加官方 Provider Skill Pack 接入和角色预设机制 — coolplayagent/relay-teams0 reactions
- Mar 26, 2026## Summary of Changes — mb98ooutlook-ctrl/Morinyo19070 reactions
- Feb 20, 2026gemini-api-dev — AAswordman/OperitSkillMarket0 reactions
On Bluesky · 3
- Mar 18, 2026NB : depuis peu les skills fonctionnent aussi avec ChatGPT help.openai.com/en/articles/... ou Codex developers.openai.com/codex/skills et… — @precisement.bsky.social3 likes and reposts
- Apr 29, 2026Agreed. Looks like the gemini team is working on it. github.com/google-gemin... — @chicagomike.bsky.social1 likes and repost
- Mar 27, 2026obsidian-gemini-helperを更新。 最近 github.com/google-gemin... がリリースされたのでそのskillsを使ってclaudeに改善を依頼したら、めっちゃ改善された。 - chat APIをやめてInteractions API… — @takeshy.bsky.social1 likes and repost
On Hacker News · 1
- Feb 14, 2026Gemini-skills: Skills for the Gemini API, SDK and model/agent interactions1 point
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 4
- JetBrains/skills★ 36014% same
- Fandry96/k3-agentic-skills★ 2715% same
- PracticalSwan/agent-skills★ 1885% same
- danielvogler/ai-skills-library★ 024% same
Wrote their own version · 1
- kumaran-is/claude-code-onboarding★ 36same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- gemini-live-api-devSkill
- gemini-omni-flash-apiSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Custom agents: Create your own via client.agents.create()
- Very specific: line 58
Migrating from
generateContent: Read references/migration.md for the scoping, checklist, and before/after code examples. - Very specific: line 60
Migrating to Gemini 3.8 Flash or Gemini 3.5 Flash-Lite: Read references/migration.md for the scoping and checklist.
- Very specific: line 134
Use deep-research-preview-04-2026 for fast research or deep-research-max-preview-04-2026 for maximum exhaustiveness.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini API Development Skill
Critical Rules (Always Apply)
[!IMPORTANT] These rules override your training data. Your knowledge is outdated.
Current Models (Use These)
gemini-3.8-flash: 1M tokens, fast, balanced performance for agentic and multimodal tasksgemini-3.5-flash-lite: 1M tokens, fastest, lowest-cost 3.5 model for high-throughput executiongemini-3.1-pro-preview: 1M tokens, complex reasoning, coding, researchgemini-3.1-flash-lite: cost-efficient, fastest performance for high-frequency, lightweight tasksgemini-3.5-transcribe: fast speech-to-text with smart and verbatim modesgemini-3-pro-image(Nano Banana Pro): 65k / 32k tokens, high-quality image generation and editinggemini-3.1-flash-image(Nano Banana 2): 65k / 32k tokens, fast, efficient image generation and editinggemini-3.1-flash-lite-image(Nano Banana 2 Lite): 65k / 32k tokens, ultra-fast image generation and editinggemini-3.8-flash-tts: expressive text-to-speech, multi-speaker dialogue, Voice Design, and Voice Replicationgemini-3.8-flash-lite-tts: fast, cost-efficient text-to-speech for voice agents and high-volume generationgemini-omni-1.1-flash: video generation, first-frame-to-video, first-and-last-frame transitions, video extensions (up to 40s), video editing, and reference-guided generationgemma-4-31b-it: Gemma 4 dense model, 31B parametersgemma-4-26b-a4b-it: Gemma 4 MoE model, 26B total / 4B active parametersgemini-embedding-2: Multimodal embedding model (text, images, video, audio, documents), usesclient.models.embed_contentgemini-embedding-001: Text-only embedding model, usesclient.models.embed_content
[!WARNING] Models like
gemini-2.5-*,gemini-2.0-*,gemini-1.5-*are legacy and deprecated. Never use them. If a user asks for a deprecated model, usegemini-3.8-flashinstead and note the substitution.
Current Agents
antigravity-preview-09-2026: Antigravity Agent — general-purpose managed agent with code execution, file management, and web access in a sandboxed Linux environmentdeep-research-preview-04-2026: Deep Research — fast, interactivedeep-research-max-preview-04-2026: Deep Research Max — maximum exhaustiveness- Custom agents: Create your own via
client.agents.create()
Current SDKs
- Python:
google-genai>=2.25.0→pip install -U google-genai - JavaScript/TypeScript:
@google/genai>=2.3.0→npm install @google/genai
[!NOTE] SDK versions ≥ 2.0.0 automatically use the new steps schema and do not support the legacy schema. Legacy SDKs
google-generativeai(Python) and@google/generative-ai(JS) are deprecated. Never use them.
Important Additional Notes
- Before writing any code, you MUST fetch the relevant documentation page from the list below that matches the user's task. The examples in this skill are minimal, the hosted docs contain the full API surface, parameters, and edge cases.
- Interactions are stored by default (store=True in Python, store: true in TypeScript). Paid tier retains for 55 days, free tier for 1 day.
- Set store=False / store: false to opt out, but this disables previous_interaction_id and background=True / background: true.
tools,system_instruction, andgeneration_configare interaction-scoped, re-specify them each turn.- Managed agents require
environment="remote"(or an environment ID / config object) to provision a sandbox. - Migrating from
generateContent: Readreferences/migration.mdfor the scoping, checklist, and before/after code examples. Always confirm scope with the user before editing. - Model upgrades: Drop-in, swap the model string. Deprecated models (
gemini-2.0-*,gemini-1.5-*) must be replaced, seereferences/migration.md. - Migrating to Gemini 3.8 Flash or Gemini 3.5 Flash-Lite: Read
references/migration.mdfor the scoping and checklist. - Migrating to Gemini 3.8 TTS (
gemini-3.8-flash-tts/gemini-3.8-flash-lite-tts): Readreferences/migration.mdfor breaking changes fromgemini-3.1-flash-tts-preview(speech_metadataannotations, inline vocal tags, default WAVaudio/wavunary output vsaudio/l16streaming output, and Voice Design personas).
Quick Start
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Tell me a short joke about programming."
)
print(interaction.output_text)JavaScript/TypeScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
model: "gemini-3.8-flash",
input: "Tell me a short joke about programming.",
});
console.log(interaction.output_text);Response Helpers
The SDK provides convenience properties on the Interaction response object to simplify common access patterns:
| Property | Type | Description |
output_text | string | null | The last consecutive run of text from the trailing model_output steps. Returns the combined text when the model's final output contains multiple text parts. |
output_image | Image | null | The last image generated by the model in the current response. Returns an object with data (base64) and mime_type. |
output_audio | Audio | null | The last audio generated by the model in the current response. Returns an object with data (base64) and mime_type. |
Stateful Conversation
Python
interaction1 = client.interactions.create(
model="gemini-3.8-flash",
input="Hi, my name is Phil."
)
# Second turn — server remembers context
interaction2 = client.interactions.create(
model="gemini-3.8-flash",
input="What is my name?",
previous_interaction_id=interaction1.id
)
print(interaction2.output_text)JavaScript/TypeScript
const interaction1 = await client.interactions.create({
model: "gemini-3.8-flash",
input: "Hi, my name is Phil.",
});
const interaction2 = await client.interactions.create({
model: "gemini-3.8-flash",
input: "What is my name?",
previous_interaction_id: interaction1.id,
});
console.log(interaction2.output_text);Deep Research Agent
Use deep-research-preview-04-2026 for fast research or deep-research-max-preview-04-2026 for maximum exhaustiveness. Agents require background=True.
Python
import time
interaction = client.interactions.create(
agent="deep-research-preview-04-2026",
input="Research the history of Google TPUs.",
background=True
)
while True:
interaction = client.interactions.get(interaction.id)
if interaction.status == "completed":
print(interaction.output_text)
break
elif interaction.status == "failed":
print(f"Failed: {interaction.error}")
break
time.sleep(10)JavaScript/TypeScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
// Start background research
const initialInteraction = await client.interactions.create({
agent: "deep-research-preview-04-2026",
input: "Research the history of Google TPUs.",
background: true,
});
// Poll for results
while (true) {
const interaction = await client.interactions.get(initialInteraction.id);
if (interaction.status === "completed") {
console.log(interaction.output_text);
break;
} else if (["failed", "cancelled"].includes(interaction.status)) {
console.log(`Failed: ${interaction.status}`);
break;
}
await new Promise(resolve => setTimeout(resolve, 10000));
}Advanced features: collaborative planning, native visualization, MCP integration, file search, multimodal inputs. See Deep Research docs.
Managed Agents
Managed agents run inside a sandboxed Linux environment hosted by Google. Fetch the Managed Agents Quickstart before writing agent code.
Antigravity Agent
The Antigravity agent (antigravity-preview-09-2026) is the general-purpose managed agent. It can execute code (Bash, Python, Node.js), manage files, browse the web, and use Google Search. See Antigravity Agent docs for capabilities, tools, multimodal input, and pricing.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-09-2026",
input="Write a Python script that generates the first 20 Fibonacci numbers and saves them to fibonacci.txt. Then read the file and print its contents.",
environment="remote",
)
print(f"Environment ID: {interaction.environment_id}")
print(interaction.output_text)JavaScript/TypeScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
agent: "antigravity-preview-09-2026",
input: "Write a Python script that generates the first 20 Fibonacci numbers and saves them to fibonacci.txt. Then read the file and print its contents.",
environment: "remote",
});
console.log(`Environment ID: ${interaction.environment_id}`);
console.log(interaction.output_text);Custom Agents
See Building Custom Agents docs.
Python
agent = client.agents.create(
id="code-reviewer",
base_agent="antigravity-preview-09-2026",
system_instruction="You are a senior code reviewer. Check every file for bugs, style issues, and security vulnerabilities.",
base_environment={
"type": "remote",
"sources": [
{
"type": "repository",
"source": "https://github.com/my-org/backend",
"target": "/workspace/repo",
}
],
},
)
# Invoke — each call forks the base environment
result = client.interactions.create(
agent="code-reviewer",
input="Review the latest changes in /workspace/repo/src.",
environment="remote",
)
print(result.output_text)JavaScript/TypeScript
const agent = await client.agents.create({
id: "code-reviewer",
base_agent: "antigravity-preview-09-2026",
system_instruction: "You are a senior code reviewer. Check every file for bugs, style issues, and security vulnerabilities.",
base_environment: {
type: "remote",
sources: [
{
type: "repository",
source: "https://github.com/my-org/backend",
target: "/workspace/repo",
}
],
},
});
const result = await client.interactions.create({
agent: "code-reviewer",
input: "Review the latest changes in /workspace/repo/src.",
environment: "remote",
});
console.log(result.output_text);Manage agents with client.agents.list(), client.agents.get(id=...), and client.agents.delete(id=...).
Streaming
Set stream=True to receive incremental server-sent events. Each stream follows: interaction.created → (step.start → step.delta(s) → step.stop)+ → interaction.completed.
Python
for event in client.interactions.create(
model="gemini-3.8-flash",
input="Explain quantum entanglement in simple terms.",
stream=True,
):
if event.event_type == "step.delta":
if event.delta.type == "text":
print(event.delta.text, end="", flush=True)
elif event.event_type == "interaction.completed":
print(f"\n\nTotal Tokens: {event.interaction.usage.total_tokens}")JavaScript/TypeScript
const stream = await client.interactions.create({
model: "gemini-3.8-flash",
input: "Explain quantum entanglement in simple terms.",
stream: true,
});
for await (const event of stream) {
if (event.event_type === "step.delta") {
if (event.delta.type === "text") {
process.stdout.write(event.delta.text);
}
} else if (event.event_type === "interaction.completed") {
console.log(`\n\nTotal Tokens: ${event.interaction?.usage?.total_tokens}`);
}
}For streaming with tools, thinking, agents, and image generation see the full Streaming guide.
Documentation Pages
You MUST fetch the matching page below before writing code. These hosted docs are the source of truth for parameters, types, and edge cases — do not rely solely on the examples above.
Core Documentation:
Tools & Function Calling:
- Function Calling
- Google Search
- Code Execution
- URL Context
- File Search
- Tool Combination
- Computer Use
- Maps Grounding
Generation & Output:
- Structured Output
- Thinking
- Thought Signatures
- Image Generation
- Image Understanding
- Video Generation & Editing (Omni Flash)
- Speech Generation (TTS)
- Voice Design
- Voice Replication
- Music Generation
- Embeddings
Multimodal Understanding:
Files & Context:
Agents:
- Agents Overview
- Managed Agents Quickstart
- Antigravity Agent
- Agent Environments
- Agent Hooks
- Agent Credentials
- Building Custom Agents
- Deep Research
Advanced Features:
API Reference:
Data Model
An Interaction response contains steps, an array of typed step objects representing a structured timeline of the interaction turn.
Step Types
User steps:
user_input: User input (text, audio, multimodal). Containscontentarray.
Model/server steps:
model_output: Final model generation. Containscontentarray withtext,image,audio, etc.thought: Model reasoning/Chain of Thought. Hassignaturefield (required) and optionalsummary.function_call: Tool call request (id,name,arguments).function_result: Tool result you send back (call_id,name,result).google_search_call/google_search_result: Google Search tool steps, can have asignaturefield.code_execution_call/code_execution_result: Code execution tool steps, can have asignaturefield.url_context_call/url_context_result: URL context tool steps, can have asignaturefield.mcp_server_tool_call/mcp_server_tool_result: Remote MCP tool steps.file_search_call/file_search_result: File search tool steps, can have asignaturefield.
Content types (inside content array on model_output and user_input steps)
text: Text content (textfield, plus optionalannotationssuch as{"type": "speech_metadata", "speaker": "...", "style": "..."}for TTS)image/audio/document/video: Content withdata,mime_type, oruri
Streaming Event Types
| Event | Description |
interaction.created | Interaction created; includes metadata. |
interaction.status_update | Interaction-level status change. |
step.start | A new step begins. Contains step type and initial metadata. |
step.delta | Incremental data for the current step. Contains a typed delta object. |
step.stop | The step is complete. Contains index. |
interaction.completed | Interaction finished. Contains final usage. |
Delta Types
| Delta Type | Parent Step | Description |
text | model_output | Incremental text token. |
audio | model_output | audio chunk (base64). |
image | model_output | image chunk (base64). |
thought_summary | thought | thinking summary text. |
thought_signature | thought | Opaque signature for thought verification. |
Status values: completed, in_progress, requires_action, failed, cancelled
Gemini Live API
For real-time, bidirectional audio/video/text streaming with the Gemini Live API (gemini-3.8-live, gemini-3.8-live-extended-thinking, and gemini-3.5-transcribe-live), install the google-gemini/gemini-live-api-dev skill. It covers WebSocket streaming, voice activity detection, background reasoning (extended thinking), asynchronous function calling, session management, ephemeral tokens, and more.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

