gemini-api-integration

gemini-api-integration is a skill for Claude Code from tranhieutt/software_development_department. It costs 47 tokens per session (1,455 once invoked), scanned A, original, MIT.

A guide to adding Google's Gemini artificial-intelligence models to applications through their programming interface. It covers text, images, audio, video, streaming responses, and tool calls.

In plain words
What is it for?
Use it to add Gemini to Node.js, TypeScript, Python, or browser projects, including multimodal input, streaming output, and function calling.
Why use it?
It provides implementation patterns for setup, model use, secure API keys, errors, rate limits, quotas, and choosing between Gemini models.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to add Gemini to Node.js, TypeScript, Python, or browser projects, including multimodal input, streaming output, and function calling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/gemini-api-integration
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.

Any agent
npx skills add tranhieutt/software_development_department --skill gemini-api-integration
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code.

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-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/gemini-api-integration/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/gemini-api-integration)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/gemini-api-integration"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/gemini-api-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-api-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/gemini-api-integration"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/gemini-api-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,455 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00047 $0.01455
Opus 5 $0.00023 $0.00727
Sonnet 5 $0.00009 $0.00291
Haiku 4.5 $0.00005 $0.00145

Measured 7d ago against content hash 91c6ed5d27f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gemini-api-integration 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 7d 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.

.claude/skills/gemini-api-integration/SKILL.md · 192 lines

How it starts

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

Gemini API Integration

Overview

This skill guides AI agents through integrating Google Gemini API into applications — from basic text generation to advanced multimodal, function calling, and streaming use cases. It covers the full Gemini SDK lifecycle with production-grade patterns.

When to Use This Skill

  • Use when setting up Gemini API for the first time in a Node.js, Python, or browser project
  • Use when implementing multimodal inputs (text + image/audio/video)
  • Use when adding streaming responses to improve perceived latency
  • Use when implementing function calling / tool use with Gemini
  • Use when optimizing model selection (Flash vs Pro vs Ultra) for cost and performance
  • Use when debugging Gemini API errors, rate limits, or quota issues

Step-by-Step Guide

1. Installation & Setup

Node.js / TypeScript:

npm install @google/generative-ai

Python:

pip install google-generativeai

Set your API key securely:

export GEMINI_API_KEY="your-api-key-here"

2. Basic Text Generation

Node.js:

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

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

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

Python:

import google.generativeai as genai
import os

genai.configure(api_key=os.environ["GEMINI_API_KEY"])
model = genai.GenerativeModel("gemini-1.5-flash")

response = model.generate_content("Explain async/await in JavaScript")
print(response.text)

3. Streaming Responses

const result = await model.generateContentStream("Write a detailed blog post about AI");

for await (const chunk of result.stream) {
  process.stdout.write(chunk.text());
}

4. Multimodal Input (Text + Image)

import fs from "fs";

const imageData = fs.readFileSync("screenshot.png");
const imagePart = {
  inlineData: {
    data: imageData.toString("base64"),
    mimeType: "image/png",
  },
};

const result = await model.generateContent(["Describe this image:", imagePart]);
console.log(result.response.text());

Read the full file on GitHub · 192 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. 7d ago First seen · 192 lines · 47 tokens per session scan A 91c6ed5d27f7

Subscribe to this mod's changes

gemini-api-integration is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 47 tokens to every session and 1,455 once invoked, about $0.0002 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

prompt-engineer

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…

Jeffallan/claude-skills · 93 tokens

ai-workflow-architect

Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…

cbrock84/headcount · 89 tokens

prompt-templates

Reusable prompt templates for construction AI tasks: cost estimation, schedule analysis, document processing, BIM queries. Structured prompts for consistent results.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens

reviewing-ai-papers

Analyzes an AI/ML publication — paper, preprint, article, technical blog post — and extracts what an enterprise AI engineer should do about it. Use when someone supplies a URL or document on RAG, embeddings, fine-tuning, prompt engineering, agents, or LLM deployment and asks "review this paper", "what do you make of…

oaustegard/claude-skills · 105 tokens

shortfilm-prompt

Generate cinematic AI shortfilm prompts (works with Seedance 2.0, Xiaoyunque, Sora, Kling, Jimeng, Veo) using the 5-stage structure from Mx-Shell's Zombie Scavenger. Trigger when the user wants transformation sequences, multi-shot narrative shorts, weapon-charge/combat segments, emotional family/pet/farewell…

jnMetaCode/ai-shortfilm-prompts · 100 tokens

llm-application-dev-ai-assistant

You are an AI assistant development expert specializing in creating intelligent conversational interfaces, chatbots, and AI-powered applications. Design comprehensive AI assistant solutions with natur.

rmyndharis/antigravity-skills · 38 tokens