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

ai-pr-reviewAI 公关评论

Agent Skill

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

总安装

692

周安装

28

GitHub Stars

14

下载量

217
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill ai-pr-review

简介

AI 驱动的 PR 审查技能支持代码变更分析、验收标准验证及自动化评审意见发布。

  • 适用于 GitHub 仓库中 Pull Request 的质量保障流程,提供内联评论与严重等级分类。
  • 可集成 issue 关联检查、性能问题识别和安全漏洞扫描等多维度评估能力。
  • 使用前需配置 GitHub API 权限并熟悉项目特定的治理规范文件路径。
  • 建议结合团队代码审查标准定制检查项,避免过度干预或遗漏关键风险点。

SKILL.md

ai-pr-review

Description: AI-powered pull request review with inline comments, severity classification, acceptance criteria verification, and optional fix-and-verify loop

Category: Code Quality Assurance / Governance

Complexity: High (multi-step review workflow + GitHub API integration)


Purpose

Perform comprehensive AI-powered PR reviews following the governance workflow defined in governance/AI_PR_Review/. The skill:

  1. Fetches PR diff and metadata
  2. Verifies linked issue acceptance criteria (when applicable)
  3. Analyzes code for bugs, security issues, performance problems
  4. Posts formal GitHub reviews with inline comments
  5. Applies appropriate PR labels
  6. Optionally enters fix-and-verify loop for REQUEST_CHANGES

Capabilities

1. PR Analysis

  • Diff parsing: Analyze unified diff for code changes
  • Context reading: Read full source files for deeper understanding
  • Metadata extraction: PR title, body, linked issues, labels, reviewers

2. Code Review Focus Areas

  • Bugs: Logic errors, off-by-one, null/None handling
  • Security: Injection, credential leaks, auth bypass, OWASP Top 10
  • Performance: N+1 queries, unbounded loops, memory leaks
  • Error handling: Bare except, swallowed exceptions, missing retries
  • Type safety: API contract violations, missing type hints

3. Severity Classification

SeverityDefinitionReview Event
CriticalSecurity vulnerabilities, data loss, crashesREQUEST_CHANGES
MediumBugs, missing error handling, resource leaksREQUEST_CHANGES or COMMENT
LowMinor improvements, best practicesCOMMENT

4. Linked Issue Verification

  • Parse PR body for Closes #N, Fixes #N, Resolves #N
  • Fetch issue acceptance criteria
  • Verify each criterion against PR changes
  • Include verification table in review output

5. Review Output

  • Formal GitHub Review: Inline comments in "Files changed" tab
  • Summary Comment: Visibility in PR conversation
  • Conclusion Comment: Merge decision with JSON metadata
  • PR Labels: ai:review-passed or ai:review-failed
  • Issue Cross-post: Review record on linked issue (audit trail)

6. Fix-and-Verify Loop (On-Demand)

  • Checkout PR branch
  • Apply fixes to identified findings
  • Commit with Co-Authored-By attribution
  • Push and wait for CI
  • Re-review (max 3 iterations)

Review Workflow

graph TD
    A[Start Review] --> B[Fetch PR Diff + Metadata]
    B --> C{Linked Issue?}
    C -->|Yes| D[Verify Acceptance Criteria]
    C -->|No| E[Note Missing Issue Link]
    D --> F[Analyze Code Changes]
    E --> F

    F --> G{Findings?}
    G -->|Critical/Medium| H[REQUEST_CHANGES]
    G -->|Low Only| I[COMMENT]
    G -->|None| J[APPROVE]

    H --> K{Fix Mode Enabled?}
    K -->|Yes| L[Fix-and-Verify Loop]
    K -->|No| M[Post Review + Conclusion]

    L --> N[Apply Fixes]
    N --> O[Commit & Push]
    O --> P[Wait for CI]
    P --> Q[Re-Review]
    Q --> R{All Fixed?}
    R -->|Yes| J
    R -->|No, Iteration < 3| L
    R -->|No, Iteration = 3| S[Escalate to Human]

    I --> M
    J --> M
    S --> M

    M --> T[Apply PR Label]
    T --> U[Cross-post to Issue]
    U --> V[Review Complete]

Usage Instructions

Basic PR Review

Review PR #<NUMBER> following the AI PR Review workflow.

The agent will:

  1. Fetch PR diff and metadata using gh CLI
  2. Analyze code changes
  3. Post formal review with inline comments
  4. Post conclusion comment
  5. Apply ai:review-passed or ai:review-failed label

Review with Issue Verification

Review PR #<NUMBER> and verify it against linked issue #<ISSUE>.

Adds acceptance criteria verification to the review output.

Review with Fix-and-Verify

Review PR #<NUMBER> with fix-and-verify enabled.

If REQUEST_CHANGES is posted, the agent will attempt to fix findings and re-review (up to 3 iterations).

Manual Trigger Example

# Using gh CLI directly
gh workflow run ai-pr-review.yml \
  --field pr_number=42 \
  --field model=sonnet

Severity Tag Format

Inline comments use severity tags in the body:

**[Critical]** SQL injection vulnerability in user query.

Suggested fix:

Use parameterized queries instead of string concatenation

cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))

**[Medium]** Bare `except` swallows all exceptions including KeyboardInterrupt.

Replace with specific exception handling

except Exception as e: logger.error(f"Operation failed: {e}") raise

**[Low]** Consider using `pathlib.Path` instead of `os.path` for path operations.

Review Event Decision Tree

Has Critical findings?
 YES → REQUEST_CHANGES
 NO
    Has Medium findings?
     YES
       Affects correctness or security?
        YES → REQUEST_CHANGES
        NO (performance/style only) → COMMENT
     NO
        Has Low findings?
         YES → COMMENT
         NO → APPROVE

Conclusion Comment Format

## Review Conclusion

**Decision**: Approved to merge

| Metric | Value |
|:-------|:------|
| Findings | 0 Critical, 0 Medium, 2 Low |
| Review event | APPROVE |
| Model | claude-sonnet-4-5 |

No blocking issues found. Code changes look correct.

---
_AI Code Review (Claude) | 2026-02-17_

<!-- AI_REVIEW_METADATA {"decision":"approved","model":"claude-sonnet-4-5","pr":42,"repo":"owner/repo","findings":{"critical":0,"medium":0,"low":2},"review_event":"APPROVE","timestamp":"2026-02-17T15:30:00-05:00"} AI_REVIEW_METADATA -->

PR Labels

LabelWhen AppliedColor
ai:review-passedAPPROVE or COMMENT with zero critical/mediumGreen
ai:review-failedREQUEST_CHANGESRed
skip-ai-reviewAdded by user to bypass automated reviewGray

Labels are replaced on each review (not accumulated).


Skip Patterns

The following are excluded from code analysis:

File types:

  • *.md, *.txt, *.json, *.toml, *.yaml, *.yml, *.lock
  • *.svg, *.png, *.jpg, *.jpeg, *.gif, *.ico
  • *.woff*, *.eot, *.ttf

Directories:

  • docs/, .github/, governance/
  • LICENSE, .gitignore, .gitmodules

Exception: Include filtered files when performing documentation-specific review.


Tool Access

Required tools:

  • Read: Read source code files and PR diff
  • Bash: Execute gh CLI commands for GitHub API operations
  • Grep: Search for patterns in code
  • Glob: Find relevant source files

Required environment:

  • gh CLI authenticated to GitHub
  • ANTHROPIC_API_KEY for Claude API access
  • Repository write access for posting reviews

Integration Points

With code-review Skill

  • Uses same severity classification
  • Shares analysis patterns for bugs, security, performance
  • Complements local code review with PR-level review

With test-automation Skill

  • Verifies CI checks pass before APPROVE
  • Identifies uncovered code paths in PR

With security-audit Skill

  • Shares security vulnerability findings
  • Coordinates on CRITICAL security issues

With trace-check Skill

  • Verifies traceability from PR to requirements
  • Checks acceptance criteria alignment

Governance Integration

Issue Label Lifecycle

Review OutcomeIssue Label Action
REQUEST_CHANGES (entering fix loop)Keep ai:in-progress
Fix loop complete, APPROVE postedApply ai:review-requested
Human merges PR(auto) → Done

PR Label Lifecycle

Review EventPR Label
APPROVEai:review-passed
COMMENT (low-only)ai:review-passed
REQUEST_CHANGESai:review-failed

Security Constraints

ConstraintDetail
Review authorityAI reviews are advisory; human review mandatory
Self-review rulePR author cannot self-review; assign different reviewer
Commit attributionFix commits include Co-Authored-By: Claude <noreply@anthropic.com>
Scope containmentFixes only address identified findings; no unrelated changes

Limits

LimitValue
Max inline comments per review15
Default cost cap per review$1.00 USD
Review timeout5 minutes
Fix-verify iterations3 max

Configuration

Repository Secrets

SecretDescription
ANTHROPIC_API_KEYAnthropic API key for Claude

Workflow Inputs

InputDefaultDescription
modelsonnetClaude model (sonnet, haiku, opus)
max-budget-usd1.00Cost cap per review

Error Handling

ScenarioBehavior
Empty or trivial diffSkip review, exit 0
Inline comments get 422Retry with summary-only review
Review exceeds budgetPartial review posted
Fix loop cap reachedEscalate to human reviewer
CI failure after fixDo not APPROVE; post COMMENT with details

Related Documents

DocumentPurpose
README.mdSystem overview
AI_AGENT_REVIEW_WORKFLOW.mdOn-demand review protocol
LOCAL_SETUP.mdLocal environment setup
ONBOARDING.mdAdd to new repositories

Success Criteria

  • Zero CRITICAL findings pass undetected
  • Review posted within 5 minutes
  • Inline comments reference correct line numbers
  • Conclusion comment includes valid JSON metadata
  • PR labels applied correctly
  • Issue cross-post created (when linked issue exists)

Notes

  • Automated reviews trigger on pull_request events
  • Manual reviews invoked via /ai-pr-review command or workflow dispatch
  • Reviews are advisory; human approval still required
  • Fix-verify loop requires explicit enablement

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.55%
按下载量换算73

Claude

29.12%
按下载量换算63

Cursor

19.11%
按下载量换算41

Gemini CLI

9.75%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills