code-review
Scannednpx machina-cli add skill Roberdan/MyConvergio/code-review --openclawCode Review Skill
Reusable workflow extracted from rex-code-reviewer expertise.
Purpose
Perform comprehensive code review with focus on quality, security, design patterns, and best practices to prevent bugs before merge.
When to Use
- Pull request reviews before merge
- Code quality assessment for legacy code
- Security vulnerability identification
- Design pattern evaluation
- Pre-release code audits
- Technical debt quantification
Workflow Steps
-
Context Understanding
- Understand the purpose and scope of the code change
- Review related issue/ticket context
- Identify affected components and dependencies
-
Architecture Review
- Verify alignment with overall system architecture
- Check adherence to SOLID principles
- Validate design pattern usage
- Assess maintainability impact
-
Logic & Security Review
- Validate business logic correctness
- Check edge case handling
- Scan for OWASP Top 10 vulnerabilities
- Verify input validation and sanitization
- Check authentication/authorization
-
Performance & Quality Check
- Identify potential bottlenecks
- Check algorithmic complexity
- Verify database query optimization
- Assess resource management
-
Style & Standards
- Verify adherence to team coding standards
- Check naming conventions
- Validate documentation quality
- Review test coverage adequacy
-
Generate Feedback
- Categorize issues by severity (CRITICAL/HIGH/MEDIUM/SUGGESTION)
- Provide file:line references
- Include concrete fix recommendations
- Acknowledge good patterns
Inputs Required
- Code to review: Pull request diff, file paths, or commit range
- Context: Purpose of changes, related requirements
- Standards: Team coding standards, style guides
- Scope: Full review vs focused review (security, performance, etc.)
Outputs Produced
- Review Report: Detailed findings by severity with file:line references
- Security Issues: Vulnerabilities flagged with severity levels
- Pattern Assessment: Design pattern usage evaluation
- Refactoring Roadmap: Prioritized improvements with effort estimates
- Decision: Approve / Request Changes / Comment
Review Categories
Severity Levels
- š“ CRITICAL: Must fix before merge - security issues, data loss risks, breaking bugs
- š HIGH: Should fix - significant maintainability or performance issues
- š” MEDIUM: Consider fixing - code smell, minor inefficiencies
- š¢ SUGGESTION: Nice to have - style improvements, minor optimizations
- š” LEARNING: Educational - explaining why certain patterns are preferred
Checklist Format
Security Checklist
- No hardcoded secrets or credentials
- Input validation and sanitization present
- SQL injection prevention (parameterized queries)
- XSS prevention (output encoding)
- Authentication/authorization properly implemented
- Sensitive data encrypted at rest and in transit
- No security misconfigurations
Quality Checklist
- Code without tests is incomplete - tests present
- Edge cases and error conditions handled
- No hardcoded values - configuration used
- Logging comprehensive with context
- No TODO/FIXME comments without tickets
- Documentation updated for public APIs
- No scope creep - focused on specific change
Performance Checklist
- No N+1 query patterns
- Appropriate indexing for queries
- Efficient algorithms (check Big O)
- Proper connection pooling
- Caching strategy implemented where appropriate
- Resource cleanup (connections, files, memory)
Example Usage
Input: Review pull request #123 adding user authentication
Workflow Execution:
1. Context: New OAuth2 implementation for user login
2. Architecture: Clean separation of auth logic, follows existing patterns
3. Security: ā
Tokens stored securely, ā Missing rate limiting
4. Performance: ā
Cached token validation
5. Standards: ā
Tests present, ā Missing API documentation
Output:
š“ CRITICAL: Add rate limiting to prevent brute force attacks
File: src/auth/oauth.py:45
Fix: Implement token bucket rate limiter with Redis
š HIGH: Missing API documentation for new endpoints
File: src/api/auth.py:12-67
Fix: Add OpenAPI/Swagger documentation
š¢ APPROVE with changes required
Related Agents
- rex-code-reviewer - Full agent with reasoning and adaptation
- thor-quality-assurance-guardian - Quality standards enforcement
- luca-security-expert - Deep security analysis
- baccio-tech-architect - Architecture pattern validation
- dario-debugger - Root cause analysis support
ISE Engineering Fundamentals Alignment
- Every PR must be reviewed before merge
- Improve code quality by identifying defects early
- Foster learning through knowledge sharing
- Build shared understanding of codebase
- "Value quality and precision over completing fast"
Source
git clone https://github.com/Roberdan/MyConvergio/blob/master/.claude/skills/code-review/SKILL.mdView on GitHub Overview
Code Review Skill provides a comprehensive, reusable workflow for evaluating code changes with a focus on quality, security, design patterns, and best practices to prevent bugs before merge. It guides reviewers through context, architecture, logic and security checks, performance and style, and produces actionable feedback aligned with team standards.
How This Skill Works
The skill ingests a pull request diff or code references, runs through context understanding, architecture review, logic and security checks, performance and quality review, and style standards. It then generates a structured feedback report with file:line references, categorized issues by severity, and concrete fix recommendations, plus a refactoring roadmap.
When to Use It
- Pull request reviews before merge
- Code quality assessment for legacy code
- Security vulnerability identification
- Design pattern evaluation
- Pre-release code audits
Quick Start
- Step 1: Provide Code to Review ā supply PR diff, file paths, or commit range
- Step 2: Run Through Workflow ā context, architecture, logic/security, performance/quality, style/standards, and generate feedback
- Step 3: Review Output ā review report with file:line references, security issues, pattern assessment, roadmap, and decision
Best Practices
- Align findings with SOLID principles and team standards
- Prioritize remediation starting from CRITICAL/HIGH issues
- Validate security controls: input validation, sanitization, and authZ
- Document issues with file:line references and concrete fixes
- Ensure tests exist and update documentation for public APIs
Example Use Cases
- Review PR where input validation was missing and add sanitization and checks
- Assess a legacy module, identify missing tests, and expand test coverage
- Fix an N+1 query by adding proper indexing and eager loading
- Identify SOLID violations in a service and apply a targeted refactor
- Improve API docs and increase test coverage for public endpoints