review-and-fix

review-and-fix is a command for Gemini CLI from google-gemini/gemini-cli. It costs 0 tokens per session (1,416 once invoked), scanned A, original, Apache-2.0.

A command that reviews a pull request or staged Git changes and starts a fix cycle when it finds problems.

In plain words
What is it for?
Use it to inspect staged changes or a GitHub pull request, check project rules and conventions, and address review findings automatically.
Why use it?
It brings review, repository context, commit-style checks, and follow-up fixes into one workflow instead of stopping at a list of findings.

Command for Gemini CLI

About the project

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.

google-gemini/gemini-cli · 106,799 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.

agentmods
npx agentmods add commands/google-gemini/gemini-cli/review-and-fix
Clone the repo
git clone --depth 1 https://github.com/google-gemini/gemini-cli

Made for: Gemini CLI.

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 review-and-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/google-gemini/gemini-cli/review-and-fix.svg)](https://agentmods.dev/commands/google-gemini/gemini-cli/review-and-fix)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01416
Opus 5 $0.00000 $0.00708
Sonnet 5 $0.00000 $0.00283
Haiku 4.5 $0.00000 $0.00142

Measured 2d ago against content hash 9a5553881c67, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.gemini/commands/review-and-fix.toml · 100 lines

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:

  1. Gather Context:
    • If {{args}} is 'staged' or {{args}} is empty:
      • Use git diff --staged to view the changes.
      • Use git status to see the state of the repository.
    • 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.
  2. 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.
  3. 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}
  4. Search the codebase if required.
  5. 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.
  6. 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.
  7. Follow these detailed review rules: !{cat .gemini/commands/strict-development-rules.md}
  8. 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...").

  1. PRD (Requirements):
    • Action: Define requirements and scope.
    • Skill: activate_skill(name="prd-drafter")
  2. Breakdown (Tickets):
    • Action: Create the atomic ticket hierarchy.
    • Skill: activate_skill(name="ticket-manager")
  3. 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, or code-implementer directly 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:
      1. git status (Check for file changes)
      2. git diff (Check code quality)
      3. npm run build (Ensure the project still builds)
      4. npm run test (Ensure no regressions)
      5. npm run lint (Ensure code style is maintained)
      6. 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.
  4. Cleanup:
    • Action: After all tickets are completed delete review_findings.md.

Read the full file on GitHub · 100 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. 2d ago First seen · 100 lines · 0 tokens per session scan A 9a5553881c67

Subscribe to this mod's changes

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.