ask

ask is a command for Claude Code from haunchen/gemini-plugin-cc. It costs 14 tokens per session (756 once invoked), scanned A, original, MIT.

A command that sends a question to Gemini through the Antigravity CLI, optionally including the contents of a file. The Antigravity CLI is a command-line tool for running AI agents.

In plain words
What is it for?
It helps developers ask about code or other file contents, with an optional model choice and a path to the file being discussed.
Why use it?
It provides a quick way to get an explanation or suggestion with relevant file context without manually copying the file into the question.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the gemini plugin — 5 commands shipped together

Good fit It helps developers ask about code or other file contents, with an optional model choice and a path to the file being discussed.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/haunchen/gemini-plugin-cc/ask
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.

Clone the repo
git clone --depth 1 https://github.com/haunchen/gemini-plugin-cc

Made for: Claude Code.

Or install gemini, the plugin that ships this one along with the rest of its 5 commands.

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 ask

README.md
[![agentmods](https://agentmods.dev/badge/commands/haunchen/gemini-plugin-cc/ask/github.svg)](https://agentmods.dev/commands/haunchen/gemini-plugin-cc/ask)
Your own site
<a href="https://agentmods.dev/commands/haunchen/gemini-plugin-cc/ask"><img src="https://agentmods.dev/badge/commands/haunchen/gemini-plugin-cc/ask/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 ask

Your own site · 80×15
<a href="https://agentmods.dev/commands/haunchen/gemini-plugin-cc/ask"><img src="https://agentmods.dev/badge/commands/haunchen/gemini-plugin-cc/ask.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 756 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00014 $0.00756
Opus 5.5 $0.00006 $0.00302
Sonnet 5.5 $0.00003 $0.00151
Haiku 4.5 $0.00001 $0.00076

Measured 1mo ago against content hash aaf71b079a19, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ask scanned grade A with 0 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/gemini/commands/ask.md · 65 lines

How it starts

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

Ask Gemini a question via the Antigravity CLI (agy). Optionally provide a file for context.

Step 1: Parse --model parameter

Check if $ARGUMENTS contains --model <value>:

  • If yes: extract the value as MODEL, remove --model <value> from $ARGUMENTS
  • If no: set MODEL = flash

Map the alias to an agy model slug:

  • flash → gemini-3.6-flash-high (the default)
  • pro → gemini-3.1-pro-high — an older generation than 3.6 flash; available for explicit opt-in, not recommended
  • Anything else is passed through unchanged (run agy models to list available slugs).

Step 2: Determine input

Split the remaining $ARGUMENTS into QUESTION and optional FILE_PATH:

  • Check if the last token in $ARGUMENTS is an existing file path (use test -f <last_token>)
  • If yes: Read the file contents as CONTEXT, the rest of $ARGUMENTS is the QUESTION
  • If no: the entire $ARGUMENTS is the QUESTION, no CONTEXT

If QUESTION is empty, tell the user: "Please provide a question. Example: /gemini:ask What does this regex do? src/utils.js"

Build ASK_INPUT:

  • If CONTEXT exists:
    Question: {QUESTION}
    ---
    {CONTEXT}
    
  • If no CONTEXT:
    Question: {QUESTION}
    

Step 3: Call agy

The system prompt lives in the gemini-ask agent, installed by /gemini:setup. The agent's tools whitelist keeps the run read-only — there is no separate policy file.

Run the following bash command, passing ASK_INPUT via stdin.

output=$(printf "%s" "$ASK_INPUT" | agy --agent gemini-ask --model $MODEL --print-timeout 5m 2>&1)
echo "$output"

Note: We pipe input via stdin instead of -p to handle large inputs and special characters safely.

Step 4: Present results

Show the Gemini response directly to the user. Do not modify, summarize, or reformat it.

Error handling

  • If agy command is not found: suggest running /gemini:setup first
  • If the output reports no output produced and a denied permission (read_file): the agent tried to open a file and agy auto-denied it, because a headless run cannot show a permission prompt — and the denial discards the whole answer. The install is fine, so do not send the user to /gemini:setup. Re-run after passing the file in as an argument, so its contents travel in the prompt and the agent has no reason to reach for the filesystem
  • If the command fails with an auth error: suggest running agy interactively to re-authenticate via Google OAuth
  • If the output reports a quota or rate-limit error (429, RESOURCE_EXHAUSTED, overloaded): show it as-is and suggest retrying later, or picking a different model with --model (agy models lists the slugs). There is no automatic fallback
  • If the command times out or returns an error: show the error message and suggest retrying

Read the full file on GitHub · 65 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. 1mo ago First seen · 65 lines · 14 tokens per session scan A aaf71b079a19

Subscribe to this mod's changes

ask is a command published in the GitHub repository haunchen/gemini-plugin-cc (1 stars, last pushed 28d ago), licensed MIT. It adds 14 tokens to every session and 756 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.