Code Reviewer
Automated code review with best practices. Identify code smells, suggest refactoring improvements, check for security issues, and enforce coding standards.
Maintain code quality through automated analysis. Identify code smells, suggest refactoring, check for security vulnerabilities, enforce coding standards, and recommend performance optimizations.
Capabilities
Use cases
Try it
Example prompts to use with this skill
Review this React component for best practices
// Before
function UserCard({ user }) {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>Click</button>;
}
// After
interface UserCardProps {
user: User;
}
function UserCard({ user }: UserCardProps) {
const [count, setCount] = useState(0);
const handleClick = useCallback(() => {
setCount(prev => prev + 1);
}, []);
return <button onClick={handleClick}>Click {count}</button>;
}
**Improvements:**
[+] Added TypeScript interface for props
[+] Used useCallback to prevent function recreation
[+] Used functional setState to avoid stale closuresCheck this API endpoint for security issues
// Vulnerable
const query = `SELECT * FROM users WHERE id = ${req.params.id}`;
// Secure
const query = 'SELECT * FROM users WHERE id = ?';
db.query(query, [req.params.id]);
2. [HIGH] **Missing Input Validation**
// Add validation
const { error, value } = schema.validate(req.body);
if (error) return res.status(400).json({ error: error.message });
3. [MEDIUM] **No Rate Limiting**
// Add rate limiting middleware
const rateLimit = require('express-rate-limit');
app.use('/api/', rateLimit({ windowMs: 15 * 60 * 1000, max: 100 }));
**Best Practices:**
[+] Use parameterized queries
[+] Validate all user input
[+] Implement rate limiting
[+] Add authentication checks
[+] Log security eventsAdd to your AI assistant
Choose your AI assistant and run the command in your terminal
curl -fsSL https://raw.githubusercontent.com/n3wth/newth-skills/main/skills/code-reviewer.md -o ~/.gemini/skills/code-reviewer.mdCopycurl -fsSL https://raw.githubusercontent.com/n3wth/newth-skills/main/skills/code-reviewer.md -o ~/.claude/skills/code-reviewer.mdCopyDiscussions
Sign in with GitHub to join the discussion.
Loading...
Related skills
Cursor Code Review Assistant
Review AI-generated code for quality and suggest improvements to your AI rules based on output quality. Ensure code meets team standards and continuously improve AI-assistant configurations.
Cursor-Driven Refactoring
Batch refactoring operations using Cursor agents with validation and rollback. Run safe, large-scale code transformations with automated testing.