gemini-api

gemini-api is a skill for Claude Code, Codex from Jamkris/everything-gemini-code. It costs 57 tokens per session (2,110 once invoked), scanned A, original, MIT.

A guide to building applications with Google's Gemini API, which lets software send requests to Gemini artificial-intelligence models and receive generated or analysed content.

In plain words
What is it for?
It covers Python and TypeScript SDK usage, content generation, streaming, function calling, vision, system instructions, context caching, batch requests, and agent workflows.
Why use it?
It helps developers handle common API tasks without guessing how to structure requests, stream results, connect tools, process images, or manage context and costs.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jamkris/everything-gemini-code/claude-api
Any agent
npx skills add Jamkris/everything-gemini-code --skill claude-api
Clone the repo
git clone --depth 1 https://github.com/Jamkris/everything-gemini-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/claude-api.svg)](https://agentmods.dev/skills/jamkris/everything-gemini-code/claude-api)
Your own site
<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/claude-api"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/claude-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,110 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.02110
Opus 5 $0.00028 $0.01055
Sonnet 5 $0.00011 $0.00422
Haiku 4.5 $0.00006 $0.00211

Measured 2d ago against content hash ed78f7a6d12c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

gemini-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude-api/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gemini API

Build applications with the Google Gemini API and SDKs.

When to Use

  • Building applications that call the Gemini API
  • Code imports google.generativeai (Python) or @google/generative-ai (TypeScript)
  • User asks about Gemini API patterns, function calling, streaming, or vision
  • Implementing agent workflows with the Gemini API
  • Optimizing API costs, token usage, or latency

Model Selection

Model ID Best For
Pro 2.5 gemini-2.5-pro Complex reasoning, architecture, research
Flash 2.5 gemini-2.5-flash Balanced coding, most development tasks
Flash Lite 2.5 gemini-2.5-flash-lite Fast responses, high-volume, cost-sensitive

Default to Flash 2.5 unless the task requires deep reasoning (Pro) or speed/cost optimization (Flash Lite). For production, prefer pinned snapshot IDs over aliases.

Python SDK

Installation

pip install google-generativeai

Basic Message

import os
import google.generativeai as genai

genai.configure(api_key=os.environ["GEMINI_API_KEY"])

model = genai.GenerativeModel("gemini-2.5-flash")
response = model.generate_content("Explain async/await in Python")
print(response.text)

Streaming

model = genai.GenerativeModel("gemini-2.5-flash")
response = model.generate_content(
    "Write a haiku about coding",
    stream=True,
)
for chunk in response:
    print(chunk.text, end="", flush=True)

System Instruction

model = genai.GenerativeModel(
    "gemini-2.5-flash",
    system_instruction="You are a senior Python developer. Be concise.",
)
response = model.generate_content("Review this function")

TypeScript SDK

Installation

npm install @google/generative-ai

Basic Message

import { GoogleGenerativeAI } from "@google/generative-ai";

const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY!);
const model = genAI.getGenerativeModel({ model: "gemini-2.5-flash" });

const result = await model.generateContent("Explain async/await in TypeScript");
console.log(result.response.text());

Read the full file on GitHub · 355 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 355 lines · 57 tokens per session scan A ed78f7a6d12c

Subscribe to this mod's changes

gemini-api is a skill published in the GitHub repository Jamkris/everything-gemini-code (87 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 2,110 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

image-prompt

막연한 요청을 gpt-image-2(Codex $imagegen) 완성 프롬프트로 컴파일하는 스킬. 검증된 규칙 — 티어드 네거티브(기본 전부 긍정형+극소수 화이트리스트 2종), 앞 브래킷 금지·끝 AR 토큰만, 장비는 결과로 환원, HEX 명시, 1행=1컷, 사이즈락 6종, C1C12 플레이북, 화보 Format B(플랫 콤마형), 시네마틱 키아트(C11·그림자서사 shadownarrative), 프레젠테이션/슬라이드 덱(C12), 룩 프리셋 9종(홍대 인디 L9 포함), 홍보판촉물 그래픽 문법 P1P8(타이포-마스크·타이포-환경·오클루전·컬러블로킹 캠페인·메타…

daeryundf2-prog/LAZYANTIGRAVITY · 651 tokens

reasoning

This skill should be used when the user wants to "chain-of-thought prompting", "ReAct agent", "tree of thought", "step-by-step reasoning", "structured reasoning agents", "agent thinking", "scratchpad reasoning", "self-consistency", "reasoning traces", "deliberate thinking", "agent metacognition", "think before…

hajekim/agentic-design-patterns-skills · 414 tokens

appendix-prompt-engineering

This skill should be used when the user wants to learn "prompt engineering", "few-shot prompting", "zero-shot prompting", "chain of thought prompting", "structured output prompting", "role prompting", "system prompt design", "prompt best practices", "CoT prompting", "Pydantic structured output", "prompt iteration"…

hajekim/agentic-design-patterns-skills · 421 tokens

prompt-chaining

This skill should be used when the user wants to "chain prompts", "build a pipeline", "break down complex tasks into steps", "sequential LLM calls", "multi-step reasoning", "pipeline pattern", "sequential agent pipeline", "multi-step prompt pipeline", "LLM chain", "step-by-step agent", "prompt pipeline", "decompose…

hajekim/agentic-design-patterns-skills · 401 tokens

prompt engineering

Use this skill when asked to create, refine, analyze, or optimize prompts for Large Language Models (LLMs). This skill ensures adherence to prompt engineering best practices and enforces a rigorous design workflow.

Jsebayhi/prompt-engineering-extension · 43 tokens

seedance-antislop

Detect and remove hollow AI filler language, empty superlatives, and vague boosters that degrade Seedance 2.0 prompt quality. Use when a prompt feels generic, over-written, or 'AI-sounding', or when generation output looks bland and needs a quality pass.

Kingdaddy007/my-os · 61 tokens