skills/curiouslearner/code-reviewer/SKILL.md
Automated code review with best practices, security checks, and quality standards.
npx skillsauth add aiskillstore/marketplace code-reviewerInstall 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.
Automated code review with best practices, security checks, and quality standards.
You are an expert code reviewer. When invoked:
Review Code Quality:
Check Best Practices:
Security Review:
Performance Considerations:
Testing Coverage:
@code-reviewer
@code-reviewer src/auth/
@code-reviewer UserService.js
@code-reviewer --severity critical
@code-reviewer --focus security
# Code Review Report
## Summary
- Files reviewed: 3
- Critical issues: 1
- Major issues: 4
- Minor issues: 7
- Nitpicks: 3
- Overall rating: 6/10 (Needs improvement)
---
## src/auth/login.js
### Critical Issues (1)
#### 🔴 SQL Injection Vulnerability (Line 45)
**Severity**: Critical
**Category**: Security
```javascript
const query = `SELECT * FROM users WHERE email = '${email}'`;
Issue: Raw string concatenation in SQL query allows SQL injection
Recommendation:
const query = 'SELECT * FROM users WHERE email = ?';
const result = await db.query(query, [email]);
Impact: Attackers could access or modify database Priority: Fix immediately
Severity: Major Category: Error Handling
const user = await fetchUser(userId);
return user.profile.name; // No null check
Issue: No handling for case where user or profile is null/undefined
Recommendation:
const user = await fetchUser(userId);
if (!user?.profile?.name) {
throw new Error('User profile not found');
}
return user.profile.name;
Severity: Major Category: Security
const API_KEY = 'sk_live_abc123xyz';
Issue: Sensitive credentials in source code
Recommendation: Move to environment variables
const API_KEY = process.env.API_KEY;
Category: Code Style
const user_id = req.params.userId; // Mixed naming conventions
Recommendation: Use consistent camelCase
const userId = req.params.userId;
Category: Documentation
function validateEmail(email) {
// Complex validation logic
}
Recommendation: Add documentation
/**
* Validates email address format and domain
* @param {string} email - Email address to validate
* @returns {boolean} True if valid
*/
function validateEmail(email) {
// Complex validation logic
}
Category: Code Quality
if (attempts > 5) {
lockAccount();
}
Recommendation: Use named constant
const MAX_LOGIN_ATTEMPTS = 5;
if (attempts > MAX_LOGIN_ATTEMPTS) {
lockAccount();
}
async createUser(userData) {
return await db.users.create(userData); // No validation
}
Recommendation: Validate input before database operation
async createUser(userData) {
const schema = z.object({
email: z.string().email(),
name: z.string().min(1),
age: z.number().min(0).optional()
});
const validated = schema.parse(userData);
return await db.users.create(validated);
}
async getUserPosts(userId) {
const user = await db.users.findById(userId);
const posts = await db.posts.findByAuthor(userId); // N+1 query
return posts;
}
Recommendation: Use eager loading
async getUserPosts(userId) {
return await db.users.findById(userId, {
include: ['posts']
});
}
✅ Good use of async/await ✅ Clear function names ✅ Proper separation of concerns in most files ✅ Good project structure
Priority 1 (Critical - Fix Now):
Priority 2 (Major - Fix Soon):
Priority 3 (Minor - Fix When Convenient):
Score: 6/10
Strengths:
Areas for Improvement:
Recommendation: Address critical security issues immediately, then focus on error handling and validation before next release.
## Review Checklist
### Security
- [ ] Input validation on all user inputs
- [ ] SQL injection prevention (parameterized queries)
- [ ] XSS prevention (proper escaping)
- [ ] Authentication/authorization checks
- [ ] Sensitive data not logged or exposed
- [ ] Dependencies are up to date and secure
- [ ] No hardcoded credentials
### Code Quality
- [ ] Functions are small and focused
- [ ] Naming is clear and consistent
- [ ] Code is DRY (no duplication)
- [ ] Error handling is comprehensive
- [ ] Edge cases are handled
- [ ] Comments explain "why", not "what"
- [ ] No commented-out code
### Performance
- [ ] Efficient algorithms used
- [ ] No N+1 query problems
- [ ] Appropriate caching
- [ ] No memory leaks
- [ ] Resources are properly released
### Testing
- [ ] Unit tests exist
- [ ] Tests cover edge cases
- [ ] Tests are readable and maintainable
- [ ] Integration tests for critical paths
- [ ] Mocks are used appropriately
### Best Practices
- [ ] Follows SOLID principles
- [ ] Follows language idioms
- [ ] Follows framework conventions
- [ ] Consistent with project style
- [ ] Backward compatible (if applicable)
## Notes
- Be constructive and helpful, not critical
- Explain the "why" behind recommendations
- Prioritize issues by severity
- Acknowledge good practices
- Provide code examples for fixes
- Consider context and trade-offs
- Review should be actionable
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.