分析當前情况,自動建議最佳角色和方法的命令。
Analyzes current context and automatically recommends the best role and approach for code review.
/plugin marketplace add wasabeef/claude-code-cookbook/plugin install cook-zh-tw@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」
→ 「原因:需要平衡安全性、性能和用戶體驗」
# 結合文件內容分析
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」
/smart-reviewComando que analisa a situação atual e sugere automaticamente o papel e abordagem ideais.
/smart-reviewA command that analyzes the current situation and automatically suggests the optimal role and approach.