async-pr-review

作者: google-gemini

当用户希望启动异步PR审查、对PR进行后台检查,或查看之前启动的异步PR审查状态时,触发此技能。

npx skills add https://github.com/google-gemini/gemini-cli --skill 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":

  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.

来自 google-gemini 的更多技能

greeter
google-gemini
一个友好的问候技能
official
code-reviewer
google-gemini
对本地变更和远程拉取请求进行自动化代码审查,提供涵盖正确性、可维护性和安全性的结构化分析。支持本地文件系统变更(已暂存和未暂存)以及远程PR(按编号或URL),并自动通过GitHub CLI检出。从七个维度分析代码:正确性、可维护性、可读性、效率、安全性、边界情况处理及测试覆盖率。可运行可选的预检验证套件(如npm run preflight)以提前发现问题。
official
review-duplication
google-gemini
在代码审查期间使用此技能,主动检查代码库中是否存在重复功能、重复造轮子或未能复用现有代码的情况。
official
reconciliation
google-gemini
将已加载的费用与预解析的发票数据库进行对账,标记出金额不匹配、发票缺失、商户不一致等差异…
official
gemini-api-cli
google-gemini
使用Gemini API CLI工具的指南。当你需要通过命令行与Gemini API交互、管理代理或生成媒体(图像、……)时使用。
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
behavioral-evals
google-gemini
创建、运行、修复和推广行为评估的指南。用于验证代理决策逻辑、调试故障、调试提示…
official
ci
google-gemini
Gemini CLI 的一项专门技能,提供高性能、快速失败机制
official