gemini-api-cli

gemini-api-cli is a skill for Claude Code, Codex from asgeirtj/system_prompts_leaks. It costs 49 tokens per session (3,671 once invoked), scanned C, original, CC0-1.0.

A command-line client for the Gemini API, Google's interface for using Gemini models from programs and scripts. It can handle media generation, file and YouTube analysis, transcription, research tasks, and agent sandboxes.

In plain words
What is it for?
Use it from a terminal, script, or CI job to analyse documents or recordings, create media, transcribe audio or video, run Deep Research, or manage sandboxes.
Why use it?
It provides shell-friendly commands for common API jobs, including saving generated media, attaching files, previewing requests, and handling paged results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Gemini CLI.

Good fit Use it from a terminal, script, or CI job to analyse documents or recordings, create media, transcribe audio or video, run Deep Research, or manage sandboxes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asgeirtj/system_prompts_leaks/gemini-api-cli
About the project

System Prompts Leaks is a collection of captured system instructions used to guide AI chatbots and coding agents before they receive user messages. It serves researchers and developers studying how different AI assistants are directed.

asgeirtj/system_prompts_leaks · 73,683 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add asgeirtj/system_prompts_leaks --skill gemini-api-cli
Clone the repo
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-api-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/gemini-api-cli/github.svg)](https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/gemini-api-cli)
Your own site
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/gemini-api-cli"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/gemini-api-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-api-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/gemini-api-cli"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/gemini-api-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,671 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.03671
Opus 5.5 $0.00020 $0.01468
Sonnet 5.5 $0.00010 $0.00734
Haiku 4.5 $0.00005 $0.00367

Measured 6d ago against content hash 36f3fbe4d26d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

gemini-api-cli scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

The `gemini-api` CLI exposes every Gemini API resource as a shell subcommand. Compared to `curl`: media and transcription commands decode output to disk and print only the file path, `-i` attaches local files or `files/<
Google/antigravity/skills/gemini-api-cli/SKILL.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The gemini-api CLI exposes every Gemini API resource as a shell subcommand. Compared to curl: media and transcription commands decode output to disk and print only the file path, -i attaches local files or files/<id> URIs, --jq extracts fields in-process (raw strings by default, no external jq), --dry-run previews redacted HTTP requests offline, and list endpoints auto-paginate with --all (cap pages with --max-pages N; --page-size sets server page size).

CLI vs SDK

CLI for shell work, SDK for application code. Use gemini-api from terminals, scripts, and CI jobs to generate media files, analyze local PDFs or recordings, run Deep Research, and manage agent sandboxes (gemini-api is a stateless Gemini API client, distinct from the interactive @google/gemini-cli coding agent). Use the Google GenAI SDKs (gemini-api-dev, gemini-live-api-dev) when calls live inside application source or need bidirectional Live API WebSockets.

Install and auth

# macOS / Linux (set GEMINI_VERSION=<tag> to pin a release)
curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash

Credentials resolve in order (first match wins): --api-key / --access-token flags, GEMINI_API_KEY / GEMINI_ACCESS_TOKEN env vars, the OS keychain, then ~/.config/gemini-api/config.yaml.

  • Env var (agents and CI): export GEMINI_API_KEY="..."
  • Workstation key: gemini-api configure --api-key "..." saves to the OS keychain. Pass --no-keyring or GEMINI_NO_KEYRING=1 on headless Linux to use config.yaml; gemini-api auth logout clears stored keys.
  • Active auth check: gemini-api whoami (add -o json for JSON) prints masked credentials and the winning source.

The #1 auth trap: an exported GEMINI_API_KEY overrides credentials stored in the keychain or config.yaml, billing whichever project that env var belongs to. Check gemini-api whoami to see which source won, or run env -u GEMINI_API_KEY gemini-api ... to ignore the env var.

Read the full file on GitHub · 145 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 145 lines · 49 tokens per session scan C 36f3fbe4d26d

Subscribe to this mod's changes

gemini-api-cli is a skill published in the GitHub repository asgeirtj/system_prompts_leaks (73,683 stars, last pushed yesterday), licensed CC0-1.0. It adds 49 tokens to every session and 3,671 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-24.

Related

gemini-api-cli compared with skills from other repositories

gemini-api-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gemini-api-cliasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0C49Claude Code, Codex
evaluating-llms-harnessNousResearch/hermes-agentSkill267ktodayMITA29Claude Code, Codex
dspyNousResearch/hermes-agentSkill267ktodayMITA19Claude Code, Codex
saelensNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex
accelerateNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
flash-attentionNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex
nemo-curatorNousResearch/hermes-agentSkill267ktodayMITA22Claude Code, Codex