cognitive-review
CommunityMake code reviews cognitively friendly.
Authortarrragon
Version1.0.0
Installs0
System Documentation
What problem does it solve?
認知負擔 Code Review 工具旨在讓審查過程專注於降低未來維護者的認知成本,而不僅僅找出表面錯誤。透過系統化的審查維度,協助審查者在變數追蹤、呼叫層級、命名品質、條件分支、函式長度與參數複雜度等方面做出量化與可執行的改進建議。
Core Features & Use Cases
- 變數狀態追蹤:評估閱讀者需要同時記住多少變數的狀態,並給出維持或分解的建議。
- 呼叫層級追蹤:評估理解路徑需要多少層呼叫,提供扁平化或中介函式的建議。
- 命名品質:檢查是否使用具體、自解的名稱,避免縮寫和模糊詞。
- 條件分支與邏輯複雜度:評估條件分支數與巢狀深度,提供早期返回或重構的策略。
- 函式長度與參數數量:評估單一函式的行數與參數數量,提出分解與參用物件的建議。
- 審查輸出:輸出一份結構化的認知負擔報告,便於開發者追蹤與重構。
Quick Start
- Example: cognitive-review path/to/your/code.py
- 操作說明:向 AI 輸入你要審查的檔案路徑,系統將回傳符合認知負擔審查格式的報告。這份報告包含整體評估、熱點清單與重構建議。
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: cognitive-review Download link: https://github.com/tarrragon/claude/archive/main.zip#cognitive-review Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.