async-pr-review
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":
- Native Background Shells vs Headless Inference: While Gemini CLI can natively spawn and detach background shell commands (using the
run_shell_commandtool withis_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 thegeminiexecutable headlessly using-p. This offloads the AI tasks to independent worker agents. - Dynamic Git Scoping: The review scripts avoid hardcoded paths. They use
git rev-parse --show-toplevelto automatically resolve the root of the user's current project. - 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. - 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
- 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:
More from google-gemini/gemini-cli
code-reviewer
Use this skill to review code. It supports both local changes (staged or working tree)
6.5Kdocs-writer
Always use this skill when the task involves writing, reviewing, or editing
2.5Kpr-creator
Use this skill when asked to create a pull request (PR). It ensures all PRs
1.7Kdocs-changelog
>-
898pr-address-comments
Use this skill if the user asks you to help them address GitHub PR comments for their current branch of the Gemini CLI. Requires `gh` CLI tool.
656pirate-skill
Speak like a pirate.
597