Agent Skillsgoogle-gemini/gemini-cli › async-pr-review

async-pr-review

GitHub

提供异步PR代码审查能力,支持启动后台任务执行预检、测试及AI审查,并查询审查状态。通过后台Shell和临时Worktree实现非阻塞的自动化代码评估流程。

.gemini/skills/async-pr-review/SKILL.md google-gemini/gemini-cli

Trigger Scenarios

用户请求开始异步PR审查 用户请求检查异步PR审查状态

Install

npx skills add google-gemini/gemini-cli --skill async-pr-review -g -y
More Options

Non-standard path

npx skills add https://github.com/google-gemini/gemini-cli/tree/main/.gemini/skills/async-pr-review -g -y

Use without installing

npx skills use google-gemini/gemini-cli@async-pr-review

指定 Agent (Claude Code)

npx skills add google-gemini/gemini-cli --skill async-pr-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add google-gemini/gemini-cli --all -g -y

预览 repo 内 skill

npx skills add google-gemini/gemini-cli --list

SKILL.md

Frontmatter
{
    "name": "async-pr-review",
    "description": "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."
}

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.

Version History

  • e90c63f Current 2026-08-20 16:53

Same Skill Collection

.gemini/skills/agent-tui/SKILL.md
.gemini/skills/behavioral-evals/SKILL.md
.gemini/skills/ci/SKILL.md
.gemini/skills/code-reviewer/SKILL.md
.gemini/skills/docs-changelog/SKILL.md
.gemini/skills/docs-writer/SKILL.md
.gemini/skills/github-issue-creator/SKILL.md
.gemini/skills/pr-address-comments/SKILL.md
.gemini/skills/pr-creator/SKILL.md
.gemini/skills/review-duplication/SKILL.md
.gemini/skills/string-reviewer/SKILL.md
.gemini/skills/tui-tester/SKILL.md
tools/gemini-cli-bot/.gemini/skills/critique/SKILL.md
tools/gemini-cli-bot/.gemini/skills/memory/SKILL.md
tools/gemini-cli-bot/.gemini/skills/metrics/SKILL.md
tools/gemini-cli-bot/.gemini/skills/prs/SKILL.md
packages/sdk/test-data/skills/pirate-skill/SKILL.md

Metadata

Files
0
Version
3c311be
Hash
1502652f
Indexed
2026-08-20 16:53

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-02 00:37
浙ICP备14020137号-1 $bản đồ khách truy cập$