← 返回
未分类 中文

Pr Review Assistant

Automated pull request review providing detailed feedback on correctness, security, performance, maintainability, testing, and best practices.
自动化 Pull Request 审查,提供正确性、安全性、性能、可维护性、测试及最佳实践的详细反馈。
charlie-morrison charlie-morrison 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 340
下载
💾 1
安装
1
版本
#latest

概述

PR Review Assistant

Automated pull request review with structured feedback on code quality, security, performance, and best practices. Use when reviewing PRs, preparing code for review, or setting up automated review workflows.

Usage

# Review current branch changes against main
python3 scripts/pr_review.py

# Review specific PR (requires gh CLI)
python3 scripts/pr_review.py --pr 42

# Review staged changes only
python3 scripts/pr_review.py --staged

# Review with specific focus areas
python3 scripts/pr_review.py --focus security,performance

Review Categories

The assistant evaluates code across 6 dimensions:

1. Correctness

  • Logic errors, off-by-one, null handling
  • Missing edge cases
  • Incorrect type usage

2. Security

  • Injection vulnerabilities (SQL, XSS, command)
  • Hardcoded secrets or credentials
  • Insecure deserialization
  • Missing input validation

3. Performance

  • N+1 queries, unnecessary loops
  • Memory leaks, unbounded growth
  • Missing indexes on queried fields
  • Inefficient algorithms

4. Maintainability

  • Dead code, unused imports
  • Functions doing too much
  • Unclear naming
  • Missing or excessive comments

5. Testing

  • Are new code paths covered?
  • Missing edge case tests
  • Test quality (assertions, mocking)

6. Best Practices

  • Framework-specific patterns
  • Error handling conventions
  • API design consistency
  • Documentation updates needed

Output Format

## PR Review Summary

**Risk Level:** 🟢 Low / 🟡 Medium / 🔴 High

### Must Fix (blocking)
- [file:line] Description of critical issue

### Should Fix (non-blocking)
- [file:line] Description of improvement

### Consider (optional)
- [file:line] Suggestion for better approach

### Positive Notes
- What was done well

Parameters

ParameterDescriptionDefault
---------------------------------
--prGitHub PR numberNone (uses diff)
--baseBase branch to comparemain
--stagedReview staged changes onlyfalse
--focusComma-separated focus areasAll
--severityMinimum severity to reportlow
--formatOutput format: markdown, json, github-commentmarkdown
--max-filesMax files to review50

AI Enhancement

When used as an agent skill, the AI reviewer:

  • Understands project context from surrounding code, not just the diff
  • Identifies patterns across multiple changed files
  • Suggests specific code fixes, not just descriptions of problems
  • Learns from repository conventions and applies them consistently
  • Generates review comments in the project's preferred style

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 18:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 198 📥 68,263
it-ops-security

Vulnerability Prioritizer

charlie-morrison
在CVSS评分之外,利用EPSS、CISA KEV、资产关键性、可达性分析以及利用成熟度进行漏洞优先级排序
★ 1 📥 539
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 686 📥 331,262