Code quality standards and review guidelines. Use when reviewing code for maintainability, readability, performance, and adherence to best practices.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use these guidelines when reviewing code quality.
userEmail, isActive)getUserById, validateInput)UserService, PaymentProcessor)MAX_RETRY_COUNT, API_BASE_URL)// Good: Specific error handling
try {
await saveUser(user);
} catch (error) {
if (error instanceof ValidationError) {
return res.status(400).json({ error: error.message });
}
if (error instanceof DatabaseError) {
logger.error('Database error:', error);
return res.status(500).json({ error: 'Internal error' });
}
throw error; // Re-throw unknown errors
}
src/
├── components/ # UI components
├── services/ # Business logic
├── utils/ # Helper functions
├── types/ # Type definitions
├── constants/ # Constants and config
└── tests/ # Test files
| Principle | Description |
|---|---|
| Single Responsibility | One reason to change |
| Open/Closed | Open for extension, closed for modification |
| Liskov Substitution | Subtypes must be substitutable |
| Interface Segregation | Many specific interfaces |
| Dependency Inversion | Depend on abstractions |
| Level | Description | Action |
|---|---|---|
| BLOCKER | Prevents merge | Must fix |
| MAJOR | Significant issue | Should fix |
| MINOR | Improvement | Consider fixing |
| SUGGESTION | Nice to have | Optional |