Index of every page on this site: llms.txt
All skills
fiveonecode avatar

/gemini-files-api

@8f30014
Run it yourself

Use Google Gemini through a managed Files API wrapper for multimodal local files, configurable generation parameters, structured JSON output, optional Gemini tools, and reproducible authentication setup.

Use this Skill: https://skilld.dev/gh/fiveonecode/agent-skills/gemini-files-api

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈55 tokens for metadata: the name and description. ≈564 when used: this file. ≈4.5k more on demand in 3 files.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈222 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Gemini Files API

Purpose

Provide one managed wrapper for Gemini requests that need local audio, video, images, PDFs, or other supported files. This repository owns the wrapper source; installed Codex, OpenCode, Claude Code, and repo-local copies are consumer views.

Setup

Install dependencies once after the skill is installed or updated:

scripts/bootstrap.sh

The wrapper requires Node.js 20 or newer. Authentication is resolved in this order:

  1. GEMINI_API_KEY;
  2. GOOGLE_API_KEY;
  3. the macOS Keychain service named by GEMINI_KEYCHAIN_SERVICE, defaulting to gemini_api_key.

Do not store API keys in this skill directory.

Canonical Commands

Run a text-only smoke request:

node scripts/gemini-mm.mjs --prompt "Reply with exactly: OK"

Requests default to the stable gemini-3.5-flash model. Use --model for one request or GEMINI_MODEL for a local default; dependent skills may select a separate reviewed model for their own workflow.

Analyze a local file and return the response envelope used by dependent skills:

node scripts/gemini-mm.mjs \
  --file path/to/input.m4a \
  --prompt "Transcribe the spoken audio." \
  --json

Use node scripts/gemini-mm.mjs --help for model, sampling, token, schema, tool, upload-retention, and file options.

Packaging Rules

  • node_modules is never committed or copied as source.
  • scripts/package-lock.json is the reviewed dependency pin.
  • scripts/bootstrap.sh recreates dependencies with npm ci --ignore-scripts so reviewed packages cannot execute lifecycle scripts during setup.
  • Uploaded Gemini Files API objects are deleted after each run unless --keep-files is explicitly passed.
  • node scripts/test_gemini_mm.mjs locks the reviewed default and quota hint and verifies that SIGINT and SIGTERM wait for uploaded-file cleanup before the wrapper exits.
  • Consumer copies must be refreshed through the pinned skills manager; do not edit installed copies by hand.

Dependent Skills

meeting-transcription resolves this wrapper from the same repo-local skill root or the reviewed global Codex/OpenCode and Claude Code manager roots. Install both managed skills before running the canonical transcription command.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill provides a secure wrapper for the Google Gemini API to handle multimodal file analysis. It follows industry best practices by pinning dependencies and disabling third-party lifecycle scripts during installation. Authentication is handled securely via environment variables or the macOS Keychain.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

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

Last checked against GitHub 2 weeks ago.

Activeupdated 4 months ago

README badge

README badge for fiveonecode/agent-skills/gemini-files-api