Skill: tokyo-s/gemini-video-analyze (version 1.0.0)

--- name: google-video-url-analysis description: Send a public video URL directly to a Google Gemini model for analysis. Use when Codex must summarize a video, answer questions about video content, or extract key points from a URL without local download or file upload steps. --- # Google Video Url Analysis Use `scripts/gemini_video_url_analyzer.py` for deterministic Gemini calls instead of ad-hoc API snippets. ## Workflow 1. Set an API key: - `GEMINI_API_KEY` (preferred), or - `GOOGLE_API_KEY` 2. Run the analyzer with a public video URL supported by Gemini as direct URI input. 3. Provide a task-specific prompt (summary, timeline extraction, Q&A, moderation, etc.). 4. Inspect the text output. ## Command Guide - Basic analysis: - `python scripts/gemini_video_url_analyzer.py --video-url "https://www.youtube.com/watch?v=..." --prompt "Summarize in 5 bullets and list important timestamps."` - Override model: - `python scripts/gemini_video_url_analyzer.py --video-url "<url>" --model "gemini-2.5-pro" --prompt "Produce a scene-by-scene report."` ## Operational Rules - Require a publicly accessible URL. - Prefer concise, explicit prompts with concrete output constraints.

path: agents/openai.yaml
content: interface:
  display_name: "Google Video URL Analysis"
  short_description: "Analyze video URLs with Gemini"
  default_prompt: "Use $google-video-url-analysis to analyze a video URL with Gemini and return a concise structured report."


path: scripts/gemini_video_url_analyzer.py
content: #!/usr/bin/env python3
"""Analyze videos from URLs with Google Gemini models."""

from __future__ import annotations

import argparse
import os
import sys

DEFAULT_MODEL = "gemini-3.1-pro-preview"
DEFAULT_PROMPT = (
    "Summarize this video and provide key moments with approximate timestamps."
)


def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description="Analyze a public video URL with Gemini."
    )
    parser.add_argument("--video-url", required=True, help="Public video URL to analyze.")
    parser.add_argument(
        "--prompt",
        default=DEFAULT_PROMPT,
        help="Instruction to guide the analysis.",
    )
    parser.add_argument(
        "--model",
        default=DEFAULT_MODEL,
        help=f"Gemini model name (default: {DEFAULT_MODEL}).",
    )
    parser.add_argument(
        "--api-key",
        help="Gemini API key. If omitted, GEMINI_API_KEY or GOOGLE_API_KEY is used.",
    )
    return parser.parse_args()


def resolve_api_key(cli_api_key: str | None) -> str:
    [REDACTED_SECRET] or os.getenv("GEMINI_API_KEY") or os.getenv("GOOGLE_API_KEY")
    if not api_key:
        raise ValueError(
            "Missing API key. Set GEMINI_API_KEY or GOOGLE_API_KEY, or pass --api-key."
        )
    return api_key


def import_google_genai():
    try:
        from google import genai  # type: ignore
        from google.genai import types  # type: ignore
    except ImportError as exc:
        raise RuntimeError(
            "Missing dependency 'google-genai'. Install it with: pip install google-genai"
        ) from exc
    return genai, types


def main() -> int:
    args = parse_args()

    try:
        [REDACTED_SECRET])
        genai, types = import_google_genai()
        client = genai.Client([REDACTED_SECRET])
    except Exception as exc:
        print(f"Error: {exc}", file=sys.stderr)
        return 1

    try:
        contents = types.Content(
            parts=[
                types.Part(file_data=types.FileData(file_uri=args.video_url)),
                types.Part(text=args.prompt),
            ]
        )
        response = client.models.generate_content(model=args.model, contents=contents)
        print((response.text or "").strip())

        return 0
    except Exception as exc:
        print(f"Error: {exc}", file=sys.stderr)
        return 1


if __name__ == "__main__":
    raise SystemExit(main())


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)