All skills
cnemri avatar

/google-genai-sdk-python

@8caf714

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.

Use this Skill: https://skilld.dev/gh/cnemri/google-genai-skills/google-genai-sdk-python

This session only. Nothing lands on disk.

referencestools.md

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

Tools & Grounding

Grounding (Google Search)

Enable the model to access real-time information.

tools = [types.Tool(google_search=types.GoogleSearch())]
response = client.models.generate_content(..., config=types.GenerateContentConfig(tools=tools))

Code Execution

Enable Python code generation and execution.

tools = [types.Tool(code_execution=types.ToolCodeExecution())]

Function Calling

Pass Python functions to the model.

Definition

def get_weather(city: str) -> str:
    """Returns weather for a city."""
    return "Sunny"

tools = [get_weather]

Configuration

config = types.GenerateContentConfig(
    tools=tools,
    tool_config=types.ToolConfig(
        function_calling_config=types.FunctionCallingConfig(
            mode=types.FunctionCallingConfigMode.AUTO, # or ANY, NONE
            stream_function_call_arguments=True # For streaming args
        )
    )
)

Handling (Automatic)

Use client.chats or preserve history, and the SDK handles execution automatically.

Handling (Manual)

Check response.function_calls, execute, and return types.Part.from_function_response.

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The Google GenAI Python SDK Skill is a documentation and code-reference skill designed to assist in developing Python applications using the Gemini API. It contains comprehensive setup guides, code examples for text/multimodal generation, chat interfaces, and tool usage. All external references are to official Google-owned GitHub repositories, which are recognized as trusted sources. No malicious patterns, unauthorized command execution, or data exfiltration behaviors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    11/11 files flagged

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

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago

README badge

README badge for cnemri/google-genai-skills/google-genai-sdk-python