Agent skill

Google Genai SDK Python

by cnemri in cnemri/google-genai-skills

Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI.

MITAuto-check passedAI & LLM Engineering

Install Google Genai SDK Python

skills CLI
$ npx skills add cnemri/google-genai-skills --skill google-genai-sdk-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cnemri/google-genai-skills google-genai-sdk-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cnemri/google-genai-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/google-genai-sdk-python .claude/skills/google-genai-sdk-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
google-genai-sdk-python
GitHub stars
127
Token cost
~422 tokens
SKILL.md length
132 words
Files
11 (incl. references)
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI.

  • Works in 4 steps: Unified SDK: Always use google-genai. → Stateless Models: Use client.models for… → Stateful Chats: Use client.chats for… → …
  • Text generation
  • SKILL.md covers Reference Materials and Core Principles
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Google Genai SDK Python is an agent skill from cnemri/google-genai-skills. Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI. Use for text generation, multimodal inputs, reasoning, tools, and media generation.

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/chat.md`, `references/media_generation.md` and `references/models.md`).

It sits in AI & LLM Engineering, covering LLM API integration. It works with Python, Google Gemini and Vertex AI. The licence is MIT.

When your agent uses it

  • Text generation
  • Multimodal inputs
  • Media generation

Example prompts

  • “/google-genai-sdk-python”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Unified SDK: Always use google-genai.
  2. Stateless Models: Use client.models for single requests.
  3. Stateful Chats: Use client.chats for conversations.
  4. Types: Import from google.genai.types.

What it can do on your machine

Read from SKILL.md and the folder at commit 7277476. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Google Genai SDK Python loads about 422 tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 132 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~422
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cnemri/google-genai-skills at commit 7277476, republished under its MIT licence (© cnemri). 132 words, ~422 tokens.

Download SKILL.mdSave it as .claude/skills/google-genai-sdk-python/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
google-genai-sdk-python
description
Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI. Use for text generation, multimodal inputs, reasoning, tools, and media generation.

Google GenAI Python SDK Skill

Use this skill to write high-quality, idiomatic Python code for the Gemini API.

Reference Materials

Identify the user's task and refer to the relevant file:

  • Setup & Client: Installation, auth, client initialization.
  • Models: Recommended models (Flash, Pro, Lite, Imagen, Veo).
  • Text Generation: Basic inference, streaming, system instructions, safety.
  • Chat: Multi-turn conversations and history.
  • Reasoning: Thinking config (thinking_level / thinking_budget), thought signatures.
  • Structured Output: JSON schemas, Pydantic models, Enums.
  • Multimodal Inputs: Images, audio, video, PDFs, media resolution.
  • Tools: Function calling, code execution, Google Search grounding.
  • Media Generation: Image generation/editing (Imagen), video generation (Veo).
  • Source Code: Raw SDK source code for deep inspection.

Core Principles

  1. Unified SDK: Always use google-genai.
  2. Stateless Models: Use client.models for single requests.
  3. Stateful Chats: Use client.chats for conversations.
  4. Types: Import from google.genai.types.

© cnemri, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in skills/google-genai-sdk-python of cnemri/google-genai-skills.

  • SKILL.md
  • references/chat.md
  • references/media_generation.md
  • references/models.md
  • references/multimodal_inputs.md
  • references/reasoning.md
  • references/setup.md
  • references/source_code.md
  • references/structured_output.md
  • references/text_generation.md
  • references/tools.md

Open the folder on GitHubat commit 7277476

Compare with similar skills

Google Genai SDK Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Google Genai SDK Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Google Genai SDK Python this skillcnemri/google-genai-skills127—~422Automated safety check: PassMIT
Gemini APIgoogle/skills21k3 repos~2.6kAutomated safety check: PassApache-2.0
Vertex AI API DevJetBrains/skills3631 repos~2.4kAutomated safety check: PassNone
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0
Gemini API DevAyuilos/Miffan1821 repos~1.4kAutomated safety check: PassAGPL-3.0
Mmsp PythonPrism-Shadow/model-message-stream-protocol113—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Gemini API

    google/skills

    Official

    A skill your agent uses when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform.

    21k GitHub starsUsed in 3 repos~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Vertex AI API Dev

    JetBrains/skills

    Official

    Guides the usage of Gemini API on Google Cloud Vertex AI with the Gen AI SDK.

    363 GitHub starsUsed in 1 repo~2.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    Ayuilos/Miffan

    A skill your agent uses when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function…

    182 GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Mmsp Python

    Prism-Shadow/model-message-stream-protocol

    Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol.

    113 GitHub stars~1.4k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    aiskillstore/marketplace

    A skill your agent uses when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function…

    430 GitHub starsUsed in 3 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed

More from cnemri/google-genai-skills

All 10 skills in this repo
  • Deep Research

    cnemri/google-genai-skills

    Perform autonomous, multi-step research using the Gemini Deep Research Agent (Interactions API).

    127 GitHub stars~613 tokensUpdated 8 mo ago
    Auto-check passed
  • Speech Use

    cnemri/google-genai-skills

    Generate (TTS), Transcribe (STT), and Clone voices using Google's GenAI and Cloud Speech SDKs.

    127 GitHub stars~616 tokensUpdated 8 mo ago
    Auto-check passed
  • Veo Use

    cnemri/google-genai-skills

    Create and edit videos using Google's Veo 2 and Veo 3 models.

    127 GitHub stars~625 tokensUpdated 8 mo ago
    Auto-check passed
  • Google Developer Knowledge

    cnemri/google-genai-skills

    Search and retrieve Google's developer documentation using the Developer Knowledge API.

    127 GitHub stars~709 tokensUpdated 8 mo ago
    Auto-check passed
  • Nano Banana Use

    cnemri/google-genai-skills

    Generate, edit, and compose images using Gemini Nano Banana models via portable Python scripts.

    127 GitHub stars~587 tokensUpdated 8 mo ago
    Auto-check passed
  • Google Adk Python

    cnemri/google-genai-skills

    Expert guidance on the Google Agent Development Kit (ADK) for Python.

    127 GitHub stars~769 tokensUpdated 8 mo ago
    Auto-check passed

Questions about Google Genai SDK Python

What does Google Genai SDK Python do?

Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI. Google Genai SDK Python is an agent skill from cnemri/google-genai-skills. Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI.

When should I use Google Genai SDK Python?

Google Genai SDK Python fits situations like: text generation; multimodal inputs; media generation.

How do I install Google Genai SDK Python in Claude Code?

Run `npx skills add cnemri/google-genai-skills --skill google-genai-sdk-python -a claude-code`. Or copy the skill folder (skills/google-genai-sdk-python in cnemri/google-genai-skills) into .claude/skills/google-genai-sdk-python in your project. Claude Code loads it when a task matches its description.

How do I install Google Genai SDK Python in Codex?

Run `npx skills add cnemri/google-genai-skills --skill google-genai-sdk-python -a codex`. Or copy the skill folder (skills/google-genai-sdk-python in cnemri/google-genai-skills) into .agents/skills/google-genai-sdk-python in your project. Codex loads it when a task matches its description.

Can I use Google Genai SDK Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cnemri/google-genai-skills --skill google-genai-sdk-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/google-genai-sdk-python, .gemini/skills/google-genai-sdk-python, .github/skills/google-genai-sdk-python and .opencode/skills/google-genai-sdk-python in your project.

What does Google Genai SDK Python need to run?

SKILL.md names no scripts, command-line tools or credentials: Google Genai SDK Python is instructions for the agent only. Our summary lists: Python 3.

Does Google Genai SDK Python access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Google Genai SDK Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Google Genai SDK Python use?

Google Genai SDK Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Google Genai SDK Python use?

About 422 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Google Genai SDK Python?

Skills that share tags, products or a category with Google Genai SDK Python: Gemini API (google/skills, 21k stars), Vertex AI API Dev (JetBrains/skills, 363 stars), Gemini API Dev (google-gemini/gemini-skills, 4.3k stars) and Gemini API Dev (Ayuilos/Miffan, 182 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Google Genai SDK Python?

cnemri (a GitHub user) maintains it in cnemri/google-genai-skills, which has 127 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on February 6, 2026.

Source: cnemri/google-genai-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.