agentleFS
fiveonecodefiveonecode/agent-skills/gemini-files-api/SKILL.md

gemini-files-api

Skill20 starsChanged 2 months agoMITView on GitHub

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.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not store API keys in this skill directory.

    line 30
  2. Distinctive:

    Run a text-only smoke request:

    line 34
  3. Very specific:

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

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

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.

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.