現在の状況を分析し、最適なロール・アプローチを自動提案するコマンド。
Analyzes files and context to automatically recommend optimal roles and approaches for code review.
/plugin marketplace add wasabeef/claude-code-cookbook/plugin install cook@claude-code-cookbook現在の状況を分析し、最適なロール・アプローチを自動提案するコマンド。
/smart-review # 現在のディレクトリを分析
/smart-review <ファイル/ディレクトリ> # 特定対象を分析
package.json, *.tsx, *.jsx, *.css, *.scss → frontendDockerfile, docker-compose.yml, *.yaml → architect*.test.js, *.spec.ts, test/, __tests__/ → qa*.rs, Cargo.toml, performance/ → performanceauth.js, security.yml, .env, config/auth/ → securitylogin.tsx, signup.js, jwt.js → security + frontendapi/auth/, middleware/auth/ → security + architectmobile/ + *.swift, *.kt, react-native/ → mobilewebpack.config.js, vite.config.js, large-dataset/ → performancecomponents/ + responsive.css → frontend + mobileapi/ + auth/ → security + architecterror.log, crash.log → analyzermemory leak, high CPU, slow query → performance + analyzerSQL injection, XSS, CSRF → security + analyzer$ /smart-review src/auth/login.js
→ 「認証ファイルを検出しました」
→ 「security ロールでの分析を推奨します」
→ 「実行しますか? [y]es / [n]o / [m]ore options」
$ /smart-review src/mobile/components/
→ 「📱🎨 モバイル + フロントエンド要素を検出」
→ 「推奨アプローチ:」
→ 「[1] mobile ロール単体」
→ 「[2] frontend ロール単体」
→ 「[3] multi-role mobile,frontend」
→ 「[4] role-debate mobile,frontend」
$ /smart-review error.log
→ 「⚠️ エラーログを検出しました」
→ 「analyzer ロールで根本原因分析を開始します」
→ 「[自動実行] /role analyzer」
$ /smart-review slow-api.log
→ 「🐌 パフォーマンス問題を検出」
→ 「推奨: [1]/role performance [2]/role-debate performance,analyzer」
$ /smart-review architecture-design.md
→ 「🏗️🔒⚡ アーキテクチャ + セキュリティ + パフォーマンス要素検出」
→ 「複雑な設計決定のため、議論形式を推奨します」
→ 「[推奨] /role-debate architect,security,performance」
→ 「[代替] /multi-role architect,security,performance」
# 現在のディレクトリを分析
/smart-review
「最適なロールとアプローチを提案して」
# 特定ファイルを分析
/smart-review src/auth/login.js
「このファイルに最適なレビュー方法を提案して」
# エラーログを分析
/smart-review error.log
「このエラーの解決に最適なアプローチを提案して」
$ /smart-review
→ 「📊 プロジェクト分析中...」
→ 「React + TypeScript プロジェクトを検出」
→ 「認証機能 + API + モバイル対応を確認」
→ 「」
→ 「💡 推奨ワークフロー:」
→ 「1. security で認証系チェック」
→ 「2. frontend で UI/UX 評価」
→ 「3. mobile でモバイル最適化確認」
→ 「4. architect で全体設計レビュー」
→ 「」
→ 「自動実行しますか? [y]es / [s]elect role / [c]ustom」
$ /smart-review "JWT の有効期限をどう設定すべきか"
→ 「🤔 技術的な設計判断を検出」
→ 「複数の専門観点が必要な問題です」
→ 「」
→ 「推奨アプローチ:」
→ 「/role-debate security,performance,frontend」
→ 「理由: セキュリティ・パフォーマンス・UX のバランスが重要」
# ファイル内容と組み合わせた分析
cat src/auth/middleware.js
/smart-review
「このファイルの内容を含めてセキュリティ観点で分析して」
# エラーと組み合わせた分析
npm run build 2>&1 | tee build-error.log
/smart-review build-error.log
「ビルドエラーの解決方法を提案して」
# 設計相談
/smart-review
「React Native と Progressive Web App のどちらを選ぶべきか議論して」