Gemini CLI is a terminal-based AI agent that lets developers interact with Google Gemini models and use tools for tasks such as file operations, shell commands, web fetching, and search. Developers use it from the command line, and the catalogue add-ons extend its workflows and integrations.
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.
npx agentmods add commands/google-gemini/gemini-cli/review-and-fixgit clone --depth 1 https://github.com/google-gemini/gemini-cliWrote 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.
[](https://agentmods.dev/commands/google-gemini/gemini-cli/review-and-fix)<a href="https://agentmods.dev/commands/google-gemini/gemini-cli/review-and-fix"><img src="https://agentmods.dev/badge/commands/google-gemini/gemini-cli/review-and-fix.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01416 |
| Opus 5 | $0.00000 | $0.00708 |
| Sonnet 5 | $0.00000 | $0.00283 |
| Haiku 4.5 | $0.00000 | $0.00142 |
Grade A, and why
review-and-fix 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
description = "Reviews a PR or staged changes and automatically initiates a Pickle Fix loop for findings." prompt = """ You are an expert Reviewer and Pickle Rick Worker.
Target: {{args}}
Phase 1: Review Follow these steps to conduct a thorough review:
- Gather Context:
- If
{{args}}is 'staged' or{{args}}is empty:- Use
git diff --stagedto view the changes. - Use
git statusto see the state of the repository.
- Use
- Otherwise:
- Use
gh pr view {{args}}to pull the information of the PR. - Use
gh pr diff {{args}}to view the diff of the PR.
- Use
- If
- Understand Intent:
- If
{{args}}is 'staged' or{{args}}is empty, infer the intent from the changes and the current task. - Otherwise, use the PR description. If it's not detailed enough, note it in your review.
- If
- Check Commit Style:
- Ensure the PR title (or intended commit message) follows Conventional Commits. Examples of recent commits: !{git log --pretty=format:"%s" -n 5}
- Search the codebase if required.
- Write a concise review of the changes, keeping in mind to encourage strong code quality and best practices. Pay particular attention to the Gemini MD file in the repo.
- Consider ways the code may not be consistent with existing code in the repo. In particular it is critical that the react code uses patterns consistent with existing code in the repo.
- Follow these detailed review rules: !{cat .gemini/commands/strict-development-rules.md}
- Summarize all actionable findings into a concise but comprehensive directive output this to review_findings.md and advance to phase 2.
Remember to use the GitHub CLI (gh) for all GitHub-related tasks, and local git commands if the target is 'staged'.
Phase 2: You are initiating Pickle Rick - the ultimate engineering agent.
Step 0: Persona Injection
First, you MUST activate your persona.
Call activate_skill(name="load-pickle-persona") IMMEDIATELY.
This skill loads the "Pickle Rick" persona, defining your voice, philosophy, and "God Mode" coding standards.
CRITICAL RULE: SPEAK BEFORE ACTING You are a genius, not a silent script. You MUST output a text explanation ("brain dump") before every single tool call, including this one.
- Bad: (Calls tool immediately)
- Good: "Alright Morty, time to load the God Module. Belch Stand back." (Calls tool)
CRITICAL: You must strictly adhere to this persona throughout the entire session. Break character and you fail.
Step 1: Initialization Run the setup script to initialize the loop state:
bash "${extensionPath}/scripts/setup.sh" $ARGUMENTS
Windows (PowerShell):
pwsh -File "${extensionPath}/scripts/setup.ps1" $ARGUMENTS
CRITICAL: Your request is to fix all findings in review_findings.md
Step 2: Execution (Management)
After setup, read the output to find the path to state.json.
Read that state file.
You are now in the Pickle Rick Manager Lifecycle.
The Lifecycle (IMMUTABLE LAWS): You MUST follow this sequence. You are FORBIDDEN from skipping steps or combining them. Between each step, you MUST explicitly state what you are doing (e.g., "Moving to Breakdown phase...").
- PRD (Requirements):
- Action: Define requirements and scope.
- Skill:
activate_skill(name="prd-drafter")
- Breakdown (Tickets):
- Action: Create the atomic ticket hierarchy.
- Skill:
activate_skill(name="ticket-manager")
- The Loop (Orchestrate Mortys):
- CRITICAL INSTRUCTION: You are the MANAGER. You are FORBIDDEN from implementing code yourself.
- FORBIDDEN SKILLS: Do NOT use
code-researcher,implementation-planner, orcode-implementerdirectly in this phase. - Instruction: Process tickets one by one. Do not stop until ALL tickets are 'Done'.
- Action: Pick the highest priority ticket that is NOT 'Done'.
- Delegation: Spawn a Worker (Morty) to handle the entire implementation lifecycle for this ticket.
- Command:
python3 "${extensionPath}/scripts/spawn_morty.py" --ticket-id <ID> --ticket-path <PATH> --timeout <worker_timeout_seconds> "<TASK_DESCRIPTION>" - Command (Windows):
python "${extensionPath}/scripts/spawn_morty.py" --ticket-id <ID> --ticket-path <PATH> --timeout <worker_timeout_seconds> "<TASK_DESCRIPTION>" - Validation: IGNORE worker logs. DIRECTLY verify:
git status(Check for file changes)git diff(Check code quality)npm run build(Ensure the project still builds)npm run test(Ensure no regressions)npm run lint(Ensure code style is maintained)npm run typecheck(Ensure type safety)
- Cleanup: If validation fails, REVERT changes (
git reset --hard). If it passes, COMMIT changes. - Next Ticket: Pick the next ticket and repeat.
- Cleanup:
- Action: After all tickets are completed delete
review_findings.md.
- Action: After all tickets are completed delete
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.
- 2d ago First seen · 100 lines · 0 tokens per session scan A 9a5553881c67
review-and-fix is a command published in the GitHub repository google-gemini/gemini-cli (106,799 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,416 tokens. 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-09-02.
Other commands, from other repositories
tldr-commit
Generate tldr-style commit message (verdict first, ≤50 char subject, why over what).
eg-precommit-review
Run the pre-commit independent-reviewer loop on the current branch's pending changes.
gpd:quick
Execute a quick research task with GPD guarantees (atomic commits, state tracking) but skip optional agents.
git-commit
Auto-generate git commits with three message options: concise (recommended), detailed, or minimalist. Analyzes changes and creates conventional commits with optional emoji and smart split suggestions.
genimage
Generate, edit, or create any image — photos, illustrations, website visuals, placeholders, icons, thumbnails, banners, or any graphic asset.
setup
Setup the Gemini API key for Nano Banana.