$npx -y skills add One-Man-Company/Skills-ContextManager --skill code-review-checklistCode review guidelines covering code quality, security, and best practices.
| 1 | # Code Review Checklist |
| 2 | |
| 3 | ## Quick Review Checklist |
| 4 | |
| 5 | ### Correctness |
| 6 | - [ ] Code does what it's supposed to do |
| 7 | - [ ] Edge cases handled |
| 8 | - [ ] Error handling in place |
| 9 | - [ ] No obvious bugs |
| 10 | |
| 11 | ### Security |
| 12 | - [ ] Input validated and sanitized |
| 13 | - [ ] No SQL/NoSQL injection vulnerabilities |
| 14 | - [ ] No XSS or CSRF vulnerabilities |
| 15 | - [ ] No hardcoded secrets or sensitive credentials |
| 16 | - [ ] **AI-Specific:** Protection against Prompt Injection (if applicable) |
| 17 | - [ ] **AI-Specific:** Outputs are sanitized before being used in critical sinks |
| 18 | |
| 19 | ### Performance |
| 20 | - [ ] No N+1 queries |
| 21 | - [ ] No unnecessary loops |
| 22 | - [ ] Appropriate caching |
| 23 | - [ ] Bundle size impact considered |
| 24 | |
| 25 | ### Code Quality |
| 26 | - [ ] Clear naming |
| 27 | - [ ] DRY - no duplicate code |
| 28 | - [ ] SOLID principles followed |
| 29 | - [ ] Appropriate abstraction level |
| 30 | |
| 31 | ### Testing |
| 32 | - [ ] Unit tests for new code |
| 33 | - [ ] Edge cases tested |
| 34 | - [ ] Tests readable and maintainable |
| 35 | |
| 36 | ### Documentation |
| 37 | - [ ] Complex logic commented |
| 38 | - [ ] Public APIs documented |
| 39 | - [ ] README updated if needed |
| 40 | |
| 41 | ## AI & LLM Review Patterns (2025) |
| 42 | |
| 43 | ### Logic & Hallucinations |
| 44 | - [ ] **Chain of Thought:** Does the logic follow a verifiable path? |
| 45 | - [ ] **Edge Cases:** Did the AI account for empty states, timeouts, and partial failures? |
| 46 | - [ ] **External State:** Is the code making safe assumptions about file systems or networks? |
| 47 | |
| 48 | ### Prompt Engineering Review |
| 49 | ```markdown |
| 50 | // ❌ Vague prompt in code |
| 51 | const response = await ai.generate(userInput); |
| 52 | |
| 53 | // ✅ Structured & Safe prompt |
| 54 | const response = await ai.generate({ |
| 55 | system: "You are a specialized parser...", |
| 56 | input: sanitize(userInput), |
| 57 | schema: ResponseSchema |
| 58 | }); |
| 59 | ``` |
| 60 | |
| 61 | ## Anti-Patterns to Flag |
| 62 | |
| 63 | ```typescript |
| 64 | // ❌ Magic numbers |
| 65 | if (status === 3) { ... } |
| 66 | |
| 67 | // ✅ Named constants |
| 68 | if (status === Status.ACTIVE) { ... } |
| 69 | |
| 70 | // ❌ Deep nesting |
| 71 | if (a) { if (b) { if (c) { ... } } } |
| 72 | |
| 73 | // ✅ Early returns |
| 74 | if (!a) return; |
| 75 | if (!b) return; |
| 76 | if (!c) return; |
| 77 | // do work |
| 78 | |
| 79 | // ❌ Long functions (100+ lines) |
| 80 | // ✅ Small, focused functions |
| 81 | |
| 82 | // ❌ any type |
| 83 | const data: any = ... |
| 84 | |
| 85 | // ✅ Proper types |
| 86 | const data: UserData = ... |
| 87 | ``` |
| 88 | |
| 89 | ## Review Comments Guide |
| 90 | |
| 91 | ``` |
| 92 | // Blocking issues use 🔴 |
| 93 | 🔴 BLOCKING: SQL injection vulnerability here |
| 94 | |
| 95 | // Important suggestions use 🟡 |
| 96 | 🟡 SUGGESTION: Consider using useMemo for performance |
| 97 | |
| 98 | // Minor nits use 🟢 |
| 99 | 🟢 NIT: Prefer const over let for immutable variable |
| 100 | |
| 101 | // Questions use ❓ |
| 102 | ❓ QUESTION: What happens if user is null here? |
| 103 | ``` |