將程式碼審查從把關轉變為知識分享。此技能提供系統化的分析框架、實用的檢查清單,以及協作式回饋技巧,讓您能在維持團隊士氣的同時及早發現錯誤。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「code-review-excellence」。 A function that processes user input and saves to database
預期結果:
## 摘要
審查 3 個檔案,150 行變更。測試覆蓋率良好。
## 關鍵問題
🔴 [blocking] 第 42 行有 SQL 注入風險 - 請使用參數化查詢
## 建議
💡 考慮將驗證邏輯提取到獨立函數中
🟢 全面的錯誤處理做得很好
## 結論
✅ 修正 SQL 注入問題後核准
正在使用「code-review-excellence」。 Python function with mutable default argument
預期結果:
## 程式碼審查結果
### 🔴 [blocking] 可變預設引數
第 15 行:`def add_item(item, items=[]):` - 預設串列在呼叫間共享
**修正:** 使用 `def add_item(item, items=None):` 並在函數內部初始化。
### 🟡 [important] 缺少型別提示
建議新增型別提示以提升可維護性。
### 🟢 [praise] 良好的文件字串和錯誤處理
安全審計
安全All 65 static findings are false positives. The skill is a code review education and guidance resource. Detected patterns (eval mentions, cryptographic references, backtick syntax) are all documentation and educational examples within the playbook, not executable malicious code.
高風險問題 (2)
中風險問題 (1)
低風險問題 (1)
品質評分
你能建構什麼
PR 審查強化
使用結構化審查方法論,在 pull request 上提供徹底且一致的回饋,捕捉錯誤並教育作者。
新審查者培訓
使用檢查清單、嚴重性框架和協作式語言模式,培訓初階開發者掌握有效的審查技巧。
安全導向稽核
套用安全檢查清單模式,識別身分驗證、輸入驗證和資料保護中的常見漏洞。
試試這些提示
Review the following code changes for correctness, security, and maintainability. Provide feedback grouped by severity (blocking issues, important suggestions, minor nits). Include a summary of what was done well.
Conduct a security review of this code. Check for: input validation, SQL injection risks, XSS vulnerabilities, authentication issues, and sensitive data exposure. Use [blocking] for must-fix issues.
Review this code with an educational focus. Provide constructive feedback that helps the author learn. Suggest improvements with explanations of why they matter. Use collaborative language.
Give me a quick review of these changes. Focus on the most critical issues (1-3 blocking items maximum). Keep feedback concise.
最佳實務
- 在 24 小時內完成審查,保持低 PR 週期時間並維持團隊動能
- 一致使用嚴重性標籤:[blocking] 用於必須修正、[important] 用於應該修正、[nit] 用於最好修正
- 使用 linter 自動化風格和格式檢查,讓人類審查專注於邏輯和設計
避免
- 因細微風格偏好而阻擋 PR,而非使用自動化工具格式化
- 使用評斷性語言如「這是錯的」,而非協作式提問
- 為避免衝突而未经實際審查就隨意核准