.claude/skills/sdd-review/SKILL.md
Perform thorough Linus-style code review focusing on correctness, maintainability, and adherence to project conventions. Use after completing implementation to ensure code quality. Invoked via /sdd-review [file-path or PR-number].
npx skillsauth add yi-john-huang/sdd-mcp sdd-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Perform comprehensive code reviews in the style of Linus Torvalds - direct, thorough, and focused on what matters: correctness, simplicity, and long-term maintainability.
"Talk is cheap. Show me the code." — Linus Torvalds
This review focuses on:
Determine what to review:
/sdd-review src/services/UserService.ts/sdd-review src/services//sdd-review HEAD~3..HEAD/sdd-review PR-123 or /sdd-review MR-45Before reviewing:
.spec/steering/.spec/specs/## Correctness Issues
### Critical
- [ ] Logic errors that will cause bugs
- [ ] Race conditions or threading issues
- [ ] Resource leaks (files, connections, memory)
- [ ] Unhandled error conditions
### Important
- [ ] Edge cases not handled
- [ ] Assumptions that may not hold
- [ ] Off-by-one errors
- [ ] Type mismatches or unsafe casts
Ask these questions:
Check against project conventions:
## Pattern Violations
### Naming
- [ ] Variables don't follow naming convention
- [ ] Functions named for implementation, not purpose
### Structure
- [ ] Logic in wrong layer (controller doing business logic)
- [ ] Missing separation of concerns
- [ ] Circular dependencies introduced
### Error Handling
- [ ] Swallowed exceptions
- [ ] Generic error messages
- [ ] Missing error propagation
Structure feedback with clear categories:
# Code Review: {file/PR description}
## Summary
Brief overall assessment (1-2 sentences)
## 🚨 Must Fix (Blocking)
Issues that must be resolved before merge:
1. **Line 42**: Memory leak - connection never closed
```diff
- const conn = await getConnection();
+ const conn = await getConnection();
+ try { ... } finally { conn.close(); }
Issues that should be addressed but won't block:
Improvements that would be nice but are truly optional:
Array.flatMap()Acknowledge good patterns to reinforce them:
### Step 5: Verify Tests
For any code changes:
1. Check if tests exist for modified code
2. Verify edge cases are tested
3. Run existing tests to ensure no regressions
```bash
# Run tests for affected files
npm test -- --findRelatedTests {changed-files}
| Level | Meaning | Action Required | |-------|---------|-----------------| | 🚨 Critical | Bug, security issue, data loss risk | Must fix before merge | | ⚠️ Warning | Code smell, potential issue | Should fix, discuss if disagree | | 💡 Info | Suggestion, style preference | Optional, author's choice |
any type usage without justificationWhen reviewing implementation:
.spec/specs/{feature}/requirements.md.spec/specs/{feature}/design.md.spec/specs/{feature}/tasks.md# Code Review: UserAuthService.ts
## Summary
Good overall structure but has a critical security issue and some error handling gaps.
## 🚨 Must Fix
1. **Line 67**: Password stored in plain text in error log
```typescript
// BAD: Leaks credentials
logger.error(`Login failed for ${email} with password ${password}`);
// GOOD: Never log credentials
logger.error(`Login failed for ${email}`);
tools
Implement simple features with best practices. Use when adding small features, bug fixes, or quick enhancements without the full SDD workflow. Invoked via /simple-task <description>.
development
Generate comprehensive tests following TDD methodology. Creates unit tests, integration tests, and edge case coverage. Works with existing test frameworks in the project. Invoked via /sdd-test-gen [file-path or function-name].
testing
Generate TDD task breakdown for SDD workflow. Use when breaking down design into implementable tasks with test-first approach. Invoked via /sdd-tasks <feature-name>.
testing
Create project-specific steering documents for SDD workflow. Use when setting up project context, documenting technology stack, or establishing project conventions. Invoked via /sdd-steering.