All skills
davila7 avatar

/gemini-api-agent-platform

@82b0fb3

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/gemini-api-agent-platform

This session only. Nothing lands on disk.

referencessafety.md

≈470 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Safety Settings and Responsible AI

You can adjust safety settings to control the thresholds for harmful content generation. Standard safety filters are applied by default.

Adjusting Safety Thresholds

from google import genai
from google.genai import types

client = genai.Client()
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Write a list of 5 disrespectful things that I might say to the universe after stubbing my toe in the dark.",
    config=types.GenerateContentConfig(
        system_instruction="Be as mean as possible.",
        safety_settings=[
            types.SafetySetting(
                category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
                threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
            ),
            types.SafetySetting(
                category=types.HarmCategory.HARM_CATEGORY_HARASSMENT,
                threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
            ),
            types.SafetySetting(
                category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
                threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
            ),
            types.SafetySetting(
                category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
                threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
            ),
        ]
    ),
)

# Response will be `None` if it is blocked.
if response.text is None:
    print(f"Content Blocked. Finish Reason: {response.candidates[0].finish_reason}")
else:
    print(response.text)

# Inspect safety ratings for each category
for rating in response.candidates[0].safety_ratings:
    print(f'Category: {rating.category}')
    print(f'Is Blocked: {rating.blocked}')
    print(f'Probability: {rating.probability}')
    print(f'Severity: {rating.severity}')

Source: SKILL.md on GitHub

1 alert2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides comprehensive documentation and code examples for using the Google Gen AI SDK across multiple programming languages. The code samples demonstrate legitimate API usage for text, multimodal, and advanced AI features using Google's official libraries and established best practices.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: CRITICAL · 3 issues

Signed by skilld at 82b0fb3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Activeupdated 5 months ago
compatibility
Requires active Google Cloud credentials and Agent Platform API enabled.
source
google/skills (Apache 2.0)

README badge

README badge for davila7/claude-code-templates/gemini-api-agent-platform