跳到主要内容

async-pr-review 精选

Trigger this skill when the user wants to start an asynchronous PR review, run background checks on a PR, or check the status of a previously started async PR review.

在 GitHub 打开

安装方式

cp -r .gemini/skills/async-pr-review ~/.claude/skills/async-pr-review

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/google-gemini/gemini-cli.git

依赖与权限

  • 无需 API Key
  • 无需联网
  • 依赖外部命令:git
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 google-gemini/gemini-cli@9b6e026 · 许可 Apache-2.0 · 内容未修改

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>
  1. 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>
  1. 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/gemini-cli
仓库星标
11 万
最近更新
今天
采集时间
今天
commit
9b6e0265d16b
内容指纹
sha256:1502652fdef089c
文件路径
.gemini/skills/async-pr-review/SKILL.md

同仓库其它 Skill

查看全部 25 个
agent-tui
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 programmatically for testing, automation, and inspection. Use when: automating CLI/TUI interactions, regression testing terminal apps, or verifying interactive behavior. Also use when: user asks "what is agent-tui", "what does agent-tui do", "demo agent-tui", "show me agent-tui", "how does agent-tui work", or wants to see it in action.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端
behavioral-evals
Guidance for creating, running, fixing, and promoting behavioral evaluations. Use when verifying agent decision logic, debugging failures, debugging prompt steering, or adding workspace regression tests.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端
ci
A specialized skill for Gemini CLI that provides high-performance, fail-fast monitoring of GitHub Actions workflows and automated local verification of CI failures. It handles run discovery automatically—simply provide the branch name.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端
code-reviewer
Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端
docs-changelog
Generates and formats changelog files for a new release based on provided version and raw changelog data.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端
docs-writer
Always use this skill when the task involves writing, reviewing, or editing files in the `/docs` directory or any `.md` files in the repository.
精选 google-gemini/gemini-cli 11 万 原文
Codex CLIGemini CLIMCP 客户端

相似 Skill

更多「编码」
access
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the iMessage channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端