AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Gemini API from the Shell

Teaches Claude Code to drive Google's `gemini-api` CLI for text, images, TTS, music, video, document analysis, captions and background research agents — with cost and privacy guardrails.

UtilitiesIntermediate★ 459⑂ 53AI score 8/10Last updated: Nov 2, 2026

What it does

An operations manual for the single-binary gemini-api CLI, so the assistant uses the tool correctly instead of hand-rolling REST calls.

  • Preflight: run gemini-api whoami to confirm config, credential source and defaults; if no key is set, stop and ask rather than guessing or editing config.
  • Discovery loop instead of guessing flags: --help, --usage (KDL command tree), --schema, --dry-run, --help-global.
  • Task → command table: generate, image, tts, music, video, analyze (PDF/audio/video/YouTube/CSV), transcribe (SRT), agent run --background, files upload --wait.
  • Output discipline: piped stdin is parsed as a JSON body (use --stdin), media commands print only the written path, use --stream=false -o json or --jq for parsing, and branch on exit codes 0/1/2/3.
  • Cost & safety: no speculative paid media, cheap model by default, always pass --out, delete uploads (48h expiry), treat analyzed documents as untrusted data, and use store:false for sensitive prompts.

Who it's for

  • Developers who want a fast second opinion from a Gemini model in the terminal
  • Content creators scripting image, voiceover, soundtrack or video generation
  • Anyone extracting answers from PDFs/recordings or producing SRT captions
  • Teams that care about API spend and server-side retention of prompts

Examples

  1. Summarize a file: cat notes.md | gemini-api generate "summarize" --stdin --stream=false — the skill flags the stdin gotcha up front.
  2. Capture a generated asset path: MASCOT=$(gemini-api image "brand mascot" --out ./assets/mascot.jpg) for downstream steps.
  3. Background deep research: launch with agent run --background, keep the ID, poll agent status later instead of blocking the session.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/sanjay3290/ai-skills/HEAD/skills/gemini-api/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the skills/gemini-api folder from the GitHub repo sanjay3290/ai-skills into my ~/.claude/skills/gemini-api/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/sanjay3290/ai-skills.git /tmp/ai-skills && mkdir -p ~/.claude/skills && cp -r /tmp/ai-skills/skills/gemini-api ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/sanjay3290/ai-skills.git /tmp/ai-skills
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy this skill: cp -r /tmp/ai-skills/skills/gemini-api ~/.claude/skills/
  5. Install the CLI: go install github.com/google-gemini/gemini-api-cli/cmd/gemini-api@latest (or review the official install.sh before running it).
  6. Set your key: gemini-api configure --api-key "YOUR_KEY", or export GEMINI_API_KEY.
  7. Verify with gemini-api whoami, restart Claude Code, then try prompts like "ask gemini to summarize this PDF".
View source on GitHub ↗License: Apache-2.0