New to Claude Skills? Learn how to install them →

google-gemini on GitHub

Async PR Review

OfficialFree

Streamline your Pull Request reviews with background checks.

Get this skill

Free · Opens the source repo

What Async PR Review does

The Async PR Review skill is designed to facilitate asynchronous reviews of Pull Requests (PRs) by automating the process of running background checks and generating assessments. It leverages the capabilities of the Gemini CLI to execute preflight checks and code reviews without blocking the user's workflow. By utilizing a background job, this skill allows developers to initiate reviews while continuing to work on other tasks, enhancing productivity.

This skill operates through a straightforward workflow. Users can either start a new asynchronous review by providing a PR number or check the status of an ongoing review. The underlying scripts manage the complexities of Git operations, creating temporary worktrees to avoid conflicts and ensure a clean environment. This means that developers can focus on their code without worrying about polluting their main workspace with temporary branches or encountering Git lock issues.

The skill's architecture is built around the concept of "Agentic Asynchronous Pattern," which distinguishes it from traditional bash scripts. It effectively offloads AI-driven tasks to independent worker agents, enabling the execution of Gemini-powered test plans and comprehensive code reviews in the background. The output is structured in a way that allows for easy parsing, providing users with clear and actionable insights into the status of their PRs.

Overall, Async PR Review is ideal for teams looking to improve their code review process by incorporating automation and reducing the time spent on manual checks. It is particularly useful in environments where multiple PRs are being reviewed simultaneously, allowing for a more efficient and organized approach to managing code quality.

When to use it

Use this skill when you need to conduct multiple PR reviews without interrupting your development flow, particularly in busy codebases.

When not to use it

Avoid using this skill for small projects or when immediate feedback on PRs is required, as the asynchronous nature may delay responses.

What you can build with it

Start an Async Review

Initiate a background check for a PR by providing its number, allowing you to focus on other tasks while the review processes.

Check Review Status

Easily check the status of an ongoing PR review to see if it’s still in progress or if the assessment is complete.

Manage Multiple PRs

Efficiently handle multiple PR reviews at once, reducing the time spent on manual checks and improving overall workflow.

How to install Async PR Review

View source

1. Install with the skills CLI

npx skills add google-gemini/gemini-cli/async-pr-review --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google-gemini

Async PR Review

This skill provides a set of tools to asynchronously review a Pull Request. It will create a background job to run the project's preflight checks, execute Gemini-powered test plans, and perform a comprehensive code review using custom prompts.

This skill is designed to showcase an advanced "Agentic Asynchronous Pattern":

  1. Native Background Shells vs Headless Inference: While Gemini CLI can natively spawn and detach background shell commands (using the run_shell_command tool with is_background: true), a standard bash background job cannot perform LLM inference. To conduct AI-driven code reviews and test generation in the background, the shell script must invoke the gemini executable headlessly using -p. This offloads the AI tasks to independent worker agents.
  2. Dynamic Git Scoping: The review scripts avoid hardcoded paths. They use git rev-parse --show-toplevel to automatically resolve the root of the user's current project.
  3. Ephemeral Worktrees: Instead of checking out branches in the user's main workspace, the skill provisions temporary git worktrees in .gemini/tmp/async-reviews/pr-<number>. This prevents git lock conflicts and namespace pollution.
  4. Agentic Evaluation (check-async-review.sh): The check script outputs clean JSON/text statuses for the main agent to parse. The interactive agent itself synthesizes the final assessment dynamically from the generated log files.

Workflow

  1. Determine Action: Establish whether the user wants to start a new async review or check the status of an existing one.
    • If the user says "start an async review for PR #123" or similar, proceed to Start Review.
    • If the user says "check the status of my async review for PR #123" or similar, proceed to Check Status.

Start Review

If the user wants to start a new async PR review:

  1. Ask the user for the PR number if they haven't provided it.
  2. Execute the async-review.sh script, passing the PR number as the first argument. Be sure to run it with the is_background flag set to true to ensure it immediately detaches.
    .gemini/skills/async-pr-review/scripts/async-review.sh <PR_NUMBER>
    
  3. Inform the user that the tasks have started successfully and they can check the status later.

Check Status

If the user wants to check the status or view the final assessment of a previously started async review:

  1. Ask the user for the PR number if they haven't provided it.
  2. Execute the check-async-review.sh script, passing the PR number as the first argument:
    .gemini/skills/async-pr-review/scripts/check-async-review.sh <PR_NUMBER>
    
  3. Evaluate Output: Read the output from the script.
    • If the output contains STATUS: IN_PROGRESS, tell the user which tasks are still running.
    • If the output contains STATUS: COMPLETE, use your file reading tools (read_file) to retrieve the contents of final-assessment.md, review.md, pr-diff.diff, npm-test.log, and test-execution.log files from the LOG_DIR specified in the output.
    • Final Assessment: Read those files, synthesize their results, and give the user a concise recommendation on whether the PR builds successfully, passes tests, and if you recommend they approve it based on the review.

Frequently asked questions about Async PR Review

Similar skills