name: code-review-automation displayName: Code Review Automation version: 1.0.0 author: Fumi (Hirofumi's AI Agent) description: Automated code review for GitHub pull requests using Claude LLM. PR analysis, security scanning, and style checking. category: development tags: [github, code-review, claude, automation, security, style-check] license: MIT icon: 🔍 command: uv run --with PyGithub --with anthropic --with rich --with typer --with python-dotenv python -m code_review.cli
Automated code review for GitHub pull requests using Claude LLM
Automatically analyze GitHub pull requests, provide intelligent code reviews, security scanning, and style checking using Claude AI.
更多技能请访问小葱技能站7w4.net。
.reviewrcuv pip install PyGithub anthropic rich typer python-dotenv
Get your GitHub Personal Access Token:
1. Go to GitHub Settings → Developer settings → Personal access tokens
2. Generate a new token with repo scope
3. Create .env file:
GITHUB_TOKEN=your_github_pat_here
# List open PRs
code-review list-prs owner/repo
# Show PR details
code-review pr-info owner/repo 123
# Show files changed
code-review pr-files owner/repo 123
# Analyze PR with Claude AI
code-review review-pr owner/repo 123
list-prsList pull requests from a repository.
code-review list-prs owner/repo
Options:
- --state: PR state (open, closed, all) - default: open
- --limit: Maximum PRs to show - default: 10
pr-infoShow detailed information about a specific PR.
code-review pr-info owner/repo 123
Shows: - Title and description - Author and timestamps - File change statistics - Labels and merge status
pr-filesShow files changed in a PR.
code-review pr-files owner/repo 123
Shows: - Changed files - Status (added, modified, deleted) - Additions and deletions per file
search-prsSearch pull requests by keyword.
code-review search-prs owner/repo --query "bug"
Options:
- --query: Search keyword (required)
- --state: PR state (open, closed, all) - default: open
- --limit: Maximum PRs to show - default: 10
repo-infoShow general repository information.
code-review repo-info owner/repo
Shows: - Repository name and description - Programming language - Stars and forks count - Open issues and PRs - Creation and update dates
review-prAnalyze a pull request using Claude AI.
code-review review-pr owner/repo 123
Shows: - AI-powered code review - Code quality score (0-100) - Security considerations - Best practices - Specific recommendations
Requires:
- GITHUB_TOKEN in .env
- ANTHROPIC_API_KEY in .env
security-scanScan a pull request for security vulnerabilities.
code-review security-scan owner/repo 123
Detects: - Exposed secrets (API keys, tokens, passwords) - SQL injection vulnerabilities - Command injection vulnerabilities - Hardcoded credentials - Weak cryptography (MD5, SHA1, RC4, DES) - Unsafe deserialization (pickle)
Options:
- --config: Configuration file path
style-checkCheck a pull request for style and linting issues.
code-review style-check owner/repo 123
Checks: - Line length violations - Naming convention violations - Import order - Blank lines - Whitespace issues - Missing docstrings
Options:
- --config: Configuration file path
full-reviewRun full code review (LLM + Security + Style) on a pull request.
code-review full-review owner/repo 123
Combines: - LLM analysis (code quality score) - Security scanning - Style checking
Options:
- --config: Configuration file path
- --skip-llm: Skip LLM analysis
- --skip-security: Skip security scan
- --skip-style: Skip style check
config-initInitialize a default configuration file.
code-review config-init --output .reviewrc
Creates a .reviewrc file with customizable settings for:
- Security scanning rules
- Style checking rules
- LLM analysis settings
.reviewrc support# Run full review
code-review full-review facebook/react 34567
# Security scan only
code-review security-scan owner/repo 123
# Style check only
code-review style-check owner/repo 123
# AI analysis only
code-review review-pr owner/repo 123
# List all closed PRs
code-review list-prs owner/repo --state closed --limit 20
# Initialize config
code-review config-init
.env file (never committed)MIT
For issues or questions: - Check the documentation - Open an issue on GitHub
这个工具功能丰富,能自动审查 GitHub 代码请求,支持 AI 分析、安全扫描和代码风格检查。文档详细,安装配置相对简单。不过实际使用中扫描准确性还有提升空间,部分复杂代码问题可能检测不到。整体质量中上,适合需要频繁审查代码的开发者使用。