Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

process-reviews流程审查

Agent Skill

process-reviews 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

212

周安装

9

GitHub Stars

公开资料未说明

下载量

74
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:process-reviews(流程审查)
来源仓库:https://github.com/hifisaputra/skills
仓库路径:skills/process-reviews
安装命令:
npx skills add https://github.com/hifisaputra/skills --skill process-reviews
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hifisaputra/skills --skill process-reviews

简介

用于查找、检索和筛选相关信息,适合根据关键词快速定位候选结果。

  • 适用于在 Codex、Claude、Cursor、Gemini CLI 中需要线索化搜索的任务场景。
  • 可结合来源仓库和原始 README 进一步核验具体用法和功能边界。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • 安装方式:通过 GitHub 仓库安装,支持 Codex、Claude、Cursor、Gemini CLI。

SKILL.md

Process Reviews

Autonomous loop that finds PRs ready for review, delegates each to the code-review skill, and updates labels based on the result. A human always makes the final merge decision.

Comment Authorship

All comments posted by this workflow run under the same GitHub account as the user. To distinguish AI comments from human comments, every comment posted by AI MUST start with `[AI]`. When reading comments, use this rule:

  • Starts with **[AI]** → posted by AI (previous runs)
  • Does NOT start with **[AI]** → posted by a human

Worktree Isolation

This skill MUST run in its own git worktree to avoid conflicts with other parallel Claude instances.

Before starting, check if already in a worktree:

git rev-parse --show-toplevel

If NOT already in a worktree for this skill, create one and switch to it using the EnterWorktree tool (if available). If EnterWorktree is not available, create one manually and prefix ALL subsequent commands with cd <worktree-path> &&:

WORKTREE=$(git rev-parse --show-toplevel)/../$(basename "$(git rev-parse --show-toplevel)")-reviews
git worktree add --detach "$WORKTREE" main 2>/dev/null || true

Using --detach is important because main is typically already checked out in the primary worktree — git worktree add "$WORKTREE" main will silently fail in that case.

Then for every command in this skill, prefix with:

cd $WORKTREE && <command>

This is necessary because cd does not persist between Bash calls.

Loop Cycle

Each cycle:

  1. Pre-flight checks — verify the environment is ready
  2. Find PRs needing review
  3. Review each PR (delegate to code-review)
  4. Update labels based on the verdict
  5. Report what was reviewed

Phase 0: Pre-flight Checks

Run these before every cycle. If any fail, stop and report the problem.

# Clean up stale worktrees
git worktree prune

# Check gh is authenticated
gh auth status

# Check working tree is clean
git status --porcelain

If git status --porcelain produces output, stop: "Working tree is dirty. Commit or stash changes before running."

If gh auth status fails, stop: "GitHub CLI is not authenticated. Run gh auth login."

Ensure required labels exist:

for label in ai-ready ai-in-progress ai-done ai-blocked ai-needs-input needs-ai-review ai-changes-requested ai-approved prd; do
  gh label create "$label" 2>/dev/null || true
done

Check for the ai-pause label — create it to pause, delete it (gh label delete ai-pause -y) to resume:

gh label list --search "ai-pause" --json name --jq '.[].name' | grep -qx "ai-pause"

The --search flag is a fuzzy substring match (it returns labels like ai-ready, ai-done too), so pipe through grep -qx for an exact match. If grep matches, the label exists — stop. If grep exits non-zero, no exact match — proceed.

If the ai-pause label exists, stop: "ai-pause label detected. Stopping gracefully. Delete the label (gh label delete ai-pause -y) to resume."

Set up the repo variable for API calls used later:

REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)

Phase 1: Find PRs needing review

Process up to 5 PRs per cycle. If more remain, they'll be handled in the next cycle. Collect candidates from all sources below, deduplicate by PR number, then take the first 5.

Labeled PRs (primary signal)

gh pr list --state open --label "needs-ai-review" --json number,title,url,isDraft,author --limit 100

Skip any draft PRs. Re-check draft status at review time as well — a PR could be converted to draft between detection and review.

Stale ai-approved PRs (new commits since approval)

PRs labeled ai-approved need re-review if new commits were pushed after the approval. Check for these to avoid a blind spot where post-approval changes go unreviewed:

gh pr list --state open --label "ai-approved" --json number,title,url,isDraft,author,updatedAt --limit 50

For each non-draft ai-approved PR, compare the latest commit date against the last **[AI]** review comment date:

# Get last commit date
gh pr view <number> --json commits --jq '.commits[-1].committedDate'

# Get last AI review comment date — check BOTH issue comments (top-level) and review comments (inline on diff)
gh pr view <number> --json comments --jq '[.comments[] | select(.body | startswith("**[AI]**")) | .createdAt] | sort | last'

Note: use gh pr view --json comments (issue-level comments where review summaries appear), NOT gh api repos/$REPO/pulls/<number>/comments (which returns inline diff comments only). AI reviews post their summary as a review body which shows up in issue comments.

If the last commit is newer than the last AI review, the PR needs re-review. Remove the stale label:

gh pr edit <number> --remove-label "ai-approved" --add-label "needs-ai-review"

Unlabeled PRs (fallback detection)

Only check up to 15 unlabeled PRs per cycle to avoid excessive API calls:

gh pr list --state open --json number,title,url,isDraft,author,labels --limit 50

Filter to non-draft PRs without an ai-changes-requested, needs-ai-review, or ai-approved label. Take the first 15 after filtering, then for each, read comments:

gh pr view <number> --json comments

A PR needs review if:

  • It has no **[AI]** review comments at all (needs first review)
  • It has previous AI review feedback AND new commits were pushed after the last AI review (needs re-review)

To determine if new commits exist since the last AI review, compare dates:

# Last AI review comment timestamp
gh pr view <number> --json comments --jq '[.comments[] | select(.body | startswith("**[AI]**")) | .createdAt] | sort | last'

# Last commit timestamp
gh pr view <number> --json commits --jq '.commits[-1].committedDate'

Skip PRs where the last AI review found no issues and no new commits exist since.

Determine review type

For each PR needing review, determine if this is:

  • First review — no previous **[AI]** review comments exist
  • Re-review — previous AI feedback exists, but feedback was addressed (new commits pushed, or human replied)

Phase 2: Review each PR

For each PR needing review:

Checkout the PR branch

The code-review skill needs to read source files (not just diffs) to understand the full context of changes. Checkout the PR branch so file reads reflect the PR's state, including newly added files:

gh pr checkout <number> --detach

Re-check that the PR is not a draft (it could have been converted since Phase 1):

gh pr view <number> --json isDraft --jq '.isDraft'

If it's now a draft, skip it — checkout main and move to the next PR.

Delegate to code-review

Pass to the code-review skill:

  • The PR number
  • Whether this is a first review or re-review

The code-review skill will:

  • Read the diff and surrounding context
  • Check the linked issue
  • Analyze for bugs, security, performance, style, tests, issue alignment
  • Post inline review comments
  • Return a verdict: approve or request-changes

If code-review fails or returns no verdict (e.g., it encounters an error), log the issue and skip to the next PR — don't update labels. The PR will be picked up again in the next cycle.

Return to main

After each review (success or failure), return to a clean state before processing the next PR. In a detached worktree, use git checkout --detach origin/main since main may be checked out elsewhere:

git checkout --detach origin/main

Phase 3: Update labels

Based on the verdict from code-review:

If verdict is request-changes:

gh pr edit <number> --remove-label "needs-ai-review" --add-label "ai-changes-requested"

If verdict is approve:

gh pr edit <number> --remove-label "needs-ai-review" --remove-label "ai-changes-requested" --add-label "ai-approved"

The ai-approved label signals that the AI review found no issues. A human reviewer should still verify and make the final merge decision — the AI never merges or formally approves PRs.


Phase 4: Report

After reviewing all PRs in this cycle, report a summary:

Reviewed N PRs:
- #123 "Add user auth" → ai-changes-requested (1 bug, 2 suggestions)
- #456 "Fix pagination" → ai-approved (no issues)

Then loop back to Phase 0 for the next cycle.


Usage with /loop

/loop 10m /process-reviews

Safety Rails

  • Never merge PRs — only post review comments and update labels
  • Never use APPROVE or REQUEST_CHANGES GitHub review events — only COMMENT
  • Skip draft PRs (check at detection AND before review — status can change between phases)
  • Human always makes the final merge decision
  • The ai-approved label means "AI found no issues" — not "approved to merge"
  • If a gh command fails with HTTP 403 or "rate limit exceeded", stop the current cycle and report: "GitHub API rate limit hit. Wait before retrying." Do not retry immediately.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.89%
按下载量换算26

Claude

29.23%
按下载量换算22

Cursor

18.11%
按下载量换算13

Gemini CLI

9.1%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills