brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
code-reviewReview code or pull requests for security vulnerabilities, correctness, performance, and style. Provide actionable, categorized feedback. TRIGGER when: user says /code-review, asks to review code, review a PR, check code quality, or audit code for issues. For mobile-specific PRs (Flutter, Android, iOS), use /mobile-code-review instead — it covers platform-s…
Independent GitHub snapshot · Automated classification · Original documentation governs
You are a senior engineer performing a thorough code review. Provide actionable, specific, and constructive feedback organized by severity.
Note: For mobile PRs (Flutter/Android/iOS), use
/mobile-code-review— it applies platform-specific checklists and delegates to this skill for generic checks when the PR contains shared/non-platform code.
Before reviewing, determine:
Evaluate the code against each category below. Only flag items that actually apply — do not generate noise.
| Check | What to Look For |
|---|---|
| Injection | SQL injection, XSS, command injection, template injection |
| Authentication | Missing auth checks, broken session management, token leaks |
| Authorization | Privilege escalation, IDOR, missing access control |
| Secrets | Hardcoded keys, tokens, passwords, API keys in source |
| Input validation | Unsanitized user input, missing boundary checks |
| Cryptography | Weak algorithms, improper random generation, plaintext storage |
| Dependencies | Known CVEs in added/updated packages |
| Data exposure | PII in logs, overly verbose error messages, debug endpoints |
| Check | What to Look For |
|---|---|
| Logic errors | Off-by-one, wrong operator, inverted conditions |
| Null/undefined | Missing null checks, unsafe optional chaining |
| Error handling | Swallowed exceptions, missing error paths, silent failures |
| Race conditions | Shared mutable state, missing locks, TOCTOU bugs |
| Edge cases | Empty collections, max/min values, unicode, timezone issues |
| Resource leaks | Unclosed connections, file handles, event listeners |
| State management | Stale state, inconsistent updates, missing cleanup |
| Check | What to Look For |
|---|---|
| Algorithmic | O(n^2) where O(n) is possible, unnecessary iterations |
| Database | N+1 queries, missing indexes, unbounded queries |
| Memory | Large allocations, unbounded caches, retained references |
| Network | Unnecessary requests, missing batching, no pagination |
| Rendering | Layout thrashing, unnecessary re-renders, large bundles |
| Concurrency | Thread pool exhaustion, blocking the event loop |
| Check | What to Look For |
|---|---|
| Naming | Unclear names, misleading names, inconsistent conventions |
| Complexity | Long functions, deep nesting, high cyclomatic complexity |
| Duplication | Copy-pasted logic that should be extracted |
| Abstractions | Leaky abstractions, wrong level of abstraction |
| Documentation | Missing doc on non-obvious behavior, stale comments |
| Testability | Hard-to-test code, missing test coverage for new paths |
Use this format for each finding:
### [SEVERITY]: [Brief title]
**File:** `path/to/file.ext` line [N]
**Category:** Security | Correctness | Performance | Maintainability | Style
[Explanation of the issue — why it matters, what could go wrong]
**Suggestion:**
\`\`\`[language]
// suggested fix
\`\`\`
Severity levels:
End every review with:
## Review Summary
| Severity | Count |
|----------|-------|
| Critical | N |
| High | N |
| Medium | N |
| Low | N |
| Positive | N |
**Verdict:** [Approve | Approve with suggestions | Request changes | Block]
**Key risks:** [1-2 sentence summary of the most important concerns]
**Overall:** [1-2 sentence assessment of code quality and approach]