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
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-reviewSkill
- harness-engineeringSkill
- hint-overlay-visual-verificationSkill
- ios-xcodegenSkill
- lifecycle-and-side-effects-correctnessSkill
- local-model-servingSkill
- mechanism-auditSkill
- meeting-transcriptionSkill
- public-source-release-auditSkill
- silent-pushes-setupSkill
- spec-creation-updatingSkill
- swift-testingSkill
- swiftui-view-refactorSkill
- xcode-buildSkill
- xcode-cloudSkill
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
- Distinctive: line 30
Do not store API keys in this skill directory.
- Distinctive: line 34
Run a text-only smoke request:
- Very specific: line 53
Use node scripts/gemini-mm.mjs --help for model, sampling, token, schema, tool, upload-retention, and file options.
≈ “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.
Files
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.shThe wrapper requires Node.js 20 or newer. Authentication is resolved in this order:
GEMINI_API_KEY;GOOGLE_API_KEY;- the macOS Keychain service named by
GEMINI_KEYCHAIN_SERVICE, defaulting togemini_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." \
--jsonUse node scripts/gemini-mm.mjs --help for model, sampling, token, schema,
tool, upload-retention, and file options.
Packaging Rules
node_modulesis never committed or copied as source.scripts/package-lock.jsonis the reviewed dependency pin.scripts/bootstrap.shrecreates dependencies withnpm ci --ignore-scriptsso reviewed packages cannot execute lifecycle scripts during setup.- Uploaded Gemini Files API objects are deleted after each run unless
--keep-filesis explicitly passed. node scripts/test_gemini_mm.mjslocks 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.
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
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.

