Skip to content
Skills Library
Programming · Review & audit

ask-gemini

/ask-gemini

Delegate a code analysis, refactoring, or automated-editing task to the Google Gemini CLI (gemini -p / gemini --resume), then critically evaluate its output as a peer AI. Use when the user asks to run Gemini, references the Gemini CLI, or wants a second model's take on the code.

Licence
MIT
Last repository change
08.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Delegate a code analysis, refactoring, or automated-editing task to the Google Gemini CLI (gemini -p / gemini --resume), then critically evaluate its output as a peer AI. Use when the user asks to run Gemini, references the Gemini CLI, or wants a second model's take on the code.

Arguments

/ask-gemini [task description] [--model <model>] [--approval-mode <default|auto_edit|yolo|plan>]
Original author description

Delegate a code analysis, refactoring, or automated-editing task to the Google Gemini CLI (gemini -p / gemini --resume), then critically evaluate its output as a peer AI. Use when the user asks to run Gemini, references the Gemini CLI, or wants a second model's take on the code.

How it works

  1. Input
  2. Running a Task
  3. Gemini Specifics for the Shared Rules
  4. Reference formatting
Original SKILL.md headings · 54 lines, 599 words
SKILL.md preview
---
name: ask-gemini
description: Delegate a code analysis, refactoring, or automated-editing task to the Google Gemini CLI (gemini -p / gemini --resume), then critically evaluate its output as a peer AI. Use when the user asks to run Gemini, references the Gemini CLI, or wants a second model's take on the code.
argument-hint: "[task description] [--model <model>] [--approval-mode <default|auto_edit|yolo|plan>]"
allowed-tools:
  - Bash(gemini *)
  - Bash(echo *)
  - AskUserQuestion
  - WebSearch
  - Read
---

# Ask Gemini

Delegate a task to the Google Gemini CLI and report the result. Gemini runs as a peer model: read [`peer-cli-delegation.md`](../shared-rules/references/peer-cli-delegation.md) and apply it throughout — it owns the delegation mechanics, the follow-up loop, the critical evaluation of Gemini output, and the error-handling protocol, while this file supplies the CLI name, the exec command, the resume syntax, and the flag table. Do NOT use for: git/PR workflows (use the other autopilot skills) or tasks that do not involve the Gemini CLI.

## Input

Parse `$ARGUMENTS` for an optional task description and optional `--model` / `--approval-mode` flags. Anything missing is collected in the next step.

## Running a Task

1. If model or approval mode was not supplied in `$ARGUMENTS`, ask the user (via `AskUserQuestion`, **one prompt with two questions**) which model (`auto`, `pro`, `flash`, `flash-lite`, or a concrete name such as `gemini-2.5-pro` / `gemini-3-pro-preview`) and which approval mode (`default`, `auto_edit`, `yolo`, `plan`).
2. Select the approval mode; default to `--approval-mode default` (Gemini prompts before edits) unless edits or full automation are required. Add `-s, --sandbox` to run tools inside Gemini's sandbox whenever you grant `auto_edit` or `yolo`.
3. Assemble the command with the appropriate options:
   - `-m, --model <MODEL>`
   - `--approval-mode <default|auto_edit|yolo|plan>`
   - `-s, --sandbox`
   - `-a, --all-files`
   - `--include-directories <dir1,dir2>`
   - `-o, --output-format <text|json>`
   - `-p, --prompt "your prompt here"` (forces non-interactive mode)
4. Always run non-interactively with `-p`; a bare positional prompt starts an interactive REPL in a TTY.
5. Resume: continue a prior session with `gemini -r "latest" "your prompt here"` (or `gemini -r "<session-id>" "your prompt here"`); per the shared block's inherit rule, pass no model flag unless the user explicitly requests a change.
6. **IMPORTANT (clean output)**: in `text` mode Gemini prints only the response to stdout. For a machine-parseable result use `--output-format json` and read the `.response` field with `jq`. Pass `--debug` only when troubleshooting; append `2>/dev/null` to silence diagnostics when they would clutter scripted output.
7. **IMPORTANT (stdin)**: `gemini` reads stdin and appends it to the `-p` prompt — apply the shared block's stdin guard, e.g. `gemini -p "prompt" </dev/null 2>/dev/null`.
8. Run the command and follow the shared block's reporting and resume-offer loop; the user resumes by saying "gemini resume".

### Quick Reference

| Use case                     | Approval mode           | Key flags                                                      |
| ---------------------------- | ----------------------- | -------------------------------------------------------------- |
| Read-only review or analysis | `default`               | `-p "..."` (no edits applied; model only reads)                |
| Apply local edits            | `auto_edit`             | `--approval-mode auto_edit -s -p "..."`                        |
| Full automation              | `yolo`                  | `--approval-mode yolo -s -p "..."`                             |
| Plan without executing tools | `plan`                  | `--approval-mode plan -p "..."`                                |
| Machine-readable output      | match task needs        | `--output-format json -p "..."`, then parse `.response` (`jq`) |
| Resume recent session        | inherited from original | `gemini -r "latest" "prompt"` (no model flag)                  |

## Gemini Specifics for the Shared Rules

The shared block leaves these caller-supplied:

- The peer CLI is **Gemini**, powered by Google models; its version check is `gemini --version`.
- High-impact flags that need permission first: `--approval-mode yolo`, `--yolo`, `-s` with broad access, `-a`/`--all-files` on large repos.
- Resume syntax for follow-ups and peer discussion of a disagreement:

```bash
gemini -r "latest" "This is Claude (<your current model name>) following up. I disagree with [X] because [evidence]. What's your take?"
```

## Reference formatting

Before writing any output that mentions a file, standard, section, commit, or issue, read [`reference-formatting.md`](../shared-rules/references/reference-formatting.md) (RFC-0001) and apply it verbatim — link files, docs, skills, agents, and sections, and never leave a reference as bare text.

Versions

RepositoryScoreLicence
This page · awinogradov/code-assistants100MIT
yeaight7/agent-powerups100Apache-2.0

Database snapshot: 13.11.2026 · package version 42a977a63934 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100ask-codex
    Delegate a code analysis, refactoring, or automated-editing task to the OpenAI Codex CLI (codex exec / codex resume), then critically evaluate its output as a peer AI. Use when the user asks to run Codex, references OpenAI Codex, or wants a second model's take on the code.
  • 100gemini
    Use when the user asks to run Gemini CLI (gemini, gemini resume) or references Google Gemini for code analysis, refactoring, or automated editing
  • 100gemini-cli
    Run Gemini CLI for AI queries. Use when user asks to "run/ask/use gemini", compare Claude vs Gemini, or delegate tasks to Gemini.
  • 100gemini
    Gemini CLI for one-shot Q&A, summaries, and generation. Use when user mentions 'gemini', 'ask gemini', 'gemini cli', or needs a quick answer from Google's model.
  • 100gemini-agent
    Delegate tasks to Gemini CLI as an agent. Use when the user wants to offload token-heavy work to Gemini, get a second opinion from a different model, or run Gemini with a custom system prompt. Triggers include "use Gemini to review X", "ask Gemini to Y", "run Gemini on Z",…
  • 100handoff-gemini
    Delegate long-context analysis, research, and large-document summarization to Google Gemini CLI (1M-token context) via non-interactive `gemini -p`, preserving Claude context. Use when the user says 'use gemini'/'hand off to gemini' or a task needs 100K+ tokens of context.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.