review-pr

eycjur's avatarfrom eycjur

GitHub PRをレビューします。PRの差分を取得し、コードの品質、セキュリティ、保守性の観点からレビューを行います。使用方法: /review-pr <PR番号>

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 27, 2025

When & Why to Use This Skill

This Claude skill automates the GitHub Pull Request review process by analyzing code diffs for quality, security, and maintainability. It helps developers identify potential bugs, security vulnerabilities like SQL injection, and performance bottlenecks such as N+1 queries, ensuring high-standard code delivery and streamlining the peer review workflow.

Use Cases

  • Automated First-Pass Review: Use the skill to perform an immediate initial review on new PRs to catch common syntax errors, naming convention violations, and style issues before human reviewers intervene.
  • Security Vulnerability Detection: Leverage the skill to scan code changes for critical security risks, including hardcoded API keys, lack of input validation, and potential XSS or SQL injection points.
  • Performance Bottleneck Identification: Identify inefficient logic, such as N+1 database queries or high-complexity algorithms, within the PR diff to maintain application scalability.
  • Technical Debt Prevention: Ensure new code includes proper documentation and tests while checking for code duplication to maintain long-term project health.
namereview-pr
descriptionGitHub PRをレビューします。PRの差分を取得し、コードの品質、セキュリティ、保守性の観点からレビューを行います。使用方法: /review-pr <PR番号>

PR Review Skill

GitHub Pull Requestのコードレビューを行うスキルです。

使用方法

/review-pr <PR番号>

手順

  1. PR情報の取得: gh pr view <PR番号> でPRのタイトル、説明、作成者などの情報を取得
  2. 差分の取得: gh pr diff <PR番号> でPRの差分を取得
  3. コードレビューの実施: 以下の観点でレビューを行う

レビュー観点

コード品質

  • コードの可読性と明瞭さ
  • 適切な命名規則
  • 重複コードの有無
  • 関数・メソッドの適切な分割

セキュリティ

  • 入力値のバリデーション
  • SQLインジェクション、XSS、コマンドインジェクション等の脆弱性
  • 機密情報(APIキー、パスワード等)のハードコーディング
  • 適切な認証・認可の実装

保守性

  • テストの有無と品質
  • ドキュメントの適切さ
  • 依存関係の妥当性
  • 後方互換性への配慮

パフォーマンス

  • 非効率なアルゴリズムやクエリ
  • N+1問題
  • 不要なメモリ使用

出力フォーマット

レビュー結果は以下の形式で出力:

## PR #<番号>: <タイトル>

### 概要
- 作成者: ...
- 変更ファイル数: ...
- 追加/削除行数: ...

### 良い点
- ...

### 改善提案
- [ ] 優先度高: ...
- [ ] 優先度中: ...
- [ ] 優先度低: ...

### 総評
...