Pull Request のコード変更をパフォーマンスの観点から分析し、潜在的な問題を検出して GitHub にコメントします。
Analyzes pull request code changes for performance issues like N+1 queries, memory leaks, and inefficient algorithms. Posts detailed optimization feedback directly to GitHub PRs.
/plugin marketplace add shiiman/claude-code-plugins/plugin install shiiman-git@shiiman-claude-code-pluginsPull Request のコード変更をパフォーマンスの観点から分析し、潜在的な問題を検出して GitHub にコメントします。
| カテゴリ | チェック内容 |
|---|---|
| N+1 クエリ | ループ内での個別クエリ実行 |
| メモリリーク | イベントリスナー未解除、クロージャ |
| アルゴリズム | O(n²) 以上の計算量 |
| I/O | 同期的なファイル・ネットワーク操作 |
| キャッシュ | キャッシュ戦略の欠如 |
| カテゴリ | チェック内容 |
|---|---|
| 再レンダリング | useCallback/useMemo 未使用 |
| バンドルサイズ | 不要な依存関係のインポート |
| 画像最適化 | 未最適化の画像使用 |
| レイアウトスラッシング | 強制同期レイアウト |
# PR の差分を取得
gh pr diff {pr番号}
# 変更されたファイル一覧
gh pr view {pr番号} --json files -q '.files[].path'
# パフォーマンス問題を指摘
gh pr review {pr番号} --comment --body "## ⚡ パフォーマンスレビュー
### 検出された問題
1. **[High] N+1 クエリ**
- ファイル: src/services/user.ts:42
- 問題: ループ内で個別にデータベースクエリを実行
- 推奨: バッチクエリまたは eager loading を使用
"
| 影響度 | 種類 | ファイル | 行 | 説明 |
|---|---|---|---|---|
| 🔴 High | N+1 Query | user.ts | 42 | ループ内 DB アクセス |
| 🟡 Medium | Memory Leak | cache.ts | 15 | イベントリスナー未解除 |
| 🟢 Low | Re-render | List.tsx | 30 | useCallback 未使用 |
# PR のパフォーマンスチェック
この PR のパフォーマンスをチェックして
# 特定の PR を対象
PR #123 のパフォーマンスレビューをして
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>