agentleFS
Ghost7802Ghost7802/awesome-api-skills/skills/gemini/SKILL.md

gemini

Skill13 starsChanged 27 days agoMITView on GitHub

  • Reads credentials
  • Installs packages

70 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use voice-call, BlueBubbles and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 15 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 15 projects that use this

  • AlekseiULSkill

    TubeScribe

    YouTube video summarizer with speaker detection, formatted documents, and audio output. Works out of the box with macOS built-in TTS. Optional recommended tools (pandoc, ffmpeg, mlx-audio) enhance quality. Requires internet for YouTube access. No paid APIs or subscriptions. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.

    Also in 3 projects that use this

  • seedprodSkill

    imsg

    iMessage/SMS CLI for listing chats, history, watch, and sending.

    Also in 16 projects that use this

  • jiulingyunSkill

    SAG

    具有mac风格say用户体验的ElevenLabs文本转语音。

    Also in 16 projects that use this

  • +7 more from seedprod

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 2

    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
  1. Distinctive:

    Use a Google API key passed to the client initialization.

    line 13
  2. Very specific:

    Read response.text and inspect candidate finishReason / usageMetadata.

    line 23
  3. Very specific:

    Keep GEMINI_API_KEY server-side only.

    line 29
  4. Very specific:

    Use structured outputs (responseMimeType: 'application/json' with responseSchema) for deterministic JSON extraction, and use Context …

    line 35
  5. Very specific:

    If multimodal requests fail, ensure inline data is base64-encoded with a valid MIME type (e.g., image/jpeg, application/pdf) or upload …

    line 38
  6. Distinctive:

    Use this when your agent works with gemini — structured patterns beat pasted docs and prevent common hallucinations.

    line 44

“Common” is measured: kept by at least 6 in 10 of the 65 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Gemini API Skill

Overview

Google Gemini offers natively multimodal capabilities (text, image, audio, video). This skill focuses on @google/genai and the v1beta API surface.

Installation

npm install @google/genai
pip install google-genai

Authentication

Use a Google API key passed to the client initialization. For GCP environments, Vertex AI authentication via IAM is preferred.

Core Concepts

  • Parts: The building blocks of a message. A part can be text, inline binary data (inlineData), or a Files API URI (fileData).
  • Long-Context Multimodal Models: Modern Gemini models (e.g., gemini-2.5-flash, gemini-2.5-pro) support large multimodal context windows across text, images, audio, and video.
  • System Instructions: Passed inside config.systemInstruction on ai.models.generateContent.

Common Workflows

  1. Initialize new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }).
  2. Call ai.models.generateContent({ model: 'gemini-2.5-flash', contents }).
  3. Read response.text and inspect candidate finishReason / usageMetadata.

Error Handling

Watch for safety/recitation finishReason values and HTTP 429 quota errors. Implement exponential backoff with jitter and explicit request timeouts.

Security

Keep GEMINI_API_KEY server-side only; never ship raw API keys in browser bundles. Tune safety settings according to your application's risk tolerance.

Rate Limits

Rate limits (RPM, TPM, RPD) depend on the model and Gemini API / Vertex AI tier. Check the official Google AI rate limits table and handle 429 RESOURCE_EXHAUSTED with backoff.

Best Practices

Use structured outputs (responseMimeType: 'application/json' with responseSchema) for deterministic JSON extraction, and use Context Caching when repeatedly querying large documents or codebases.

Troubleshooting

If multimodal requests fail, ensure inline data is base64-encoded with a valid MIME type (e.g., image/jpeg, application/pdf) or upload larger payloads via the Files API.

References

Why use this skill

Use this when your agent works with gemini — structured patterns beat pasted docs and prevent common hallucinations.

AI pitfalls

  • Importing the deprecated @google/generative-ai SDK instead of @google/genai
  • Hardcoding retired gemini-1.0 or gemini-1.5 model IDs
  • Omitting rate-limit (429) and token budget handling

Production checklist

  • Secrets in environment variables (GEMINI_API_KEY), not source code
  • Error handling and logging in place
  • Rate limits and timeouts configured

Related skills

  • langchain — integrates with
  • llamaindex — integrates with

Last Verified: 2026-11-18

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.