code-review-checklist

Comprehensive checklist for conducting thorough code reviews covering functionality, security, performance, and maintainability

By sickn33 · 1,338 installs

npx skills add sickn33/agentic-awesome-skills --skill code-review-checklist

Source repository · Upstream listing

Code Review Checklist Overview Provide a systematic checklist for conducting thorough code reviews. This skill helps reviewers ensure code quality, catch bugs, identify security issues, and maintain consistency across the codebase. When to Use This Skill Use when reviewing pull requests Use when conducting code audits Use when establishing code review standards for a team Use when training new developers on code review practices Use when you want to ensure nothing is missed in reviews Use when creating code review documentation How It Works Step 1: Understand the Context Before reviewing code, I'll help you understand: What problem does this code solve? What are the requirements? What files were changed and why? Are there related issues or tickets? What's the testing strategy? Step 2: Review Functionality Check if the code works correctly: Does it solve the stated problem? Are edge cases handled? Is error handling appropriate? Are there any logical errors? Does it match the requirements? Step 3: Review Code Quality Assess code maintainability: Is the code readable and clear? Are names descriptive? Is it properly structured? Are functions/methods focused? Is there unnecessary complexity? Step 4: Review Security Check for security issues: Are inputs validated? Is sensitive data protected? Are there SQL injection risks? Is authentication/authorization correct? Are dependencies secure? Step 5: Review Performance Look for performance issues: Are there unnecessary loops? Is database access optimized? Are there memory leaks? Is caching used appropriately? Are there N+1 query problems? Step 6: Review Tests Verify test coverage: Are there tests for new code? Do tests cover edge cases? Are tests meaningful? Do all tests pass? Is test coverage adequate? Examples Example 1: Functionality Review Checklist Example 2: Security Review Checklist Example 3: Code Quality Review Checklist Best Practices ✅ Do This Review Small Changes Smaller PRs are easier to review thoroughly Check Tests First Verify tests pass and cover new code Run the Code Test it locally when possible Ask Questions Don't assume, ask for clarification Be Constructive Suggest improvements, don't just criticize Focus on Important Issues Don't nitpick minor style issues Use Automated Tools Linters, formatters, security scanners Review Documentation Check if docs are updated Consider Performance Think about scale and efficiency Check for Regressions Ensure existing functionality still works ❌ Don't Do This Don't Approve Without Reading Actually review the code Don't Be Vague Provide specific feedback with examples Don't Ignore Security Security issues are critical Don't Skip Tests Untested code will cause problems Don't Be Rude Be respectful and professional Don't Rubber Stamp Every review should add value Don't Review When Tired You'll miss important issues Don't Forget Context Understand the bigger picture Complete Review Checklist Pre Review [ ] Read the PR description and linked issues [ ] Understand what problem is being solved [ ] Check if tests pass in CI/CD [ ] Pull the branch and run it locally Functionality [ ] Code solves the stated problem [ ] Edge cases are handled [ ] Error handling is appropriate [ ] User input is validated [ ] No logical errors Security [ ] No SQL injection vulnerabilities [ ] No XSS vulnerabilities [ ] Authentication/authorization is correct [ ] Sensitive data is protected [ ] No hardcoded secrets Performance [ ] No unnecessary database queries [ ] No N+1 query problems [ ] Efficient algorithms used [ ] No memory leaks [ ] Caching used appropriately Code Quality [ ] Code is readable and clear [ ] Names are descriptive [ ] Functions are focused and small [ ] No code duplication [ ] Follows project conventions Tests [ ] New code has tests [ ] Tests cover edge cases [ ] Tests are meaningful [ ] All tests pass [ ] Test coverage is adequate Documentation [ ] Code comments explain why, not what [ ] API documentation is updated [ ] README is updated if needed [ ] Breaking changes are documented [ ] Migration guide provided if needed Git [ ] Commit messages are clear [ ] No merge conflicts [ ] Branch is up to date with main [ ] No unnecessary files committed [ ] .gitignore is properly configured Common Pitfalls Problem: Missing Edge Cases Symptoms: Code works for happy path but fails on edge cases Solution: Ask "What if...?" questions What if the input is null? What if the array is empty? What if the user is not authenticated? What if the network request fails? Problem: Security Vulnerabilities Symptoms: Code exposes security risks Solution: Use security checklist Run security scanners (npm audit, Snyk) Check OWASP Top 10 Validate all inputs Use parameterized queries Never trust user input Problem: Poor Test Coverage Symptoms: New code has no tests or inadequate tests Solution: Require tests for all new code Unit tests for functions Integration tests for features Edge case tests Error case tests Problem: Unclear Code Symptoms: Reviewer can't understand what code does Solution: Request improvements Better variable names Explanatory comments Smaller functions Clear structure Review Comment Templates Requesting Changes Asking Questions Praising Good Code Related Skills @requesting code review Prepare code for review @receiving code review Handle review feedback @systematic debugging Debug issues found in review @test driven development Ensure code has tests Additional Resources [Google Code Review Guidelines](https://google.github.io/eng practices/review/) [OWASP Top 10](https://owasp.org/www project top ten/) [Code Review Best Practices](https://github.com/thoughtbot/guides/tree/main/code review) [How to Review Code](https://www.kevinlondon.com/2015/05/05/code review best practices.html) Pro Tip: Use a checklist template for every review to ensure consistency and thoroughness. Customize it for your team's specific needs! Limitations Use this skill only when the task clearly matches the scope described above. Do not treat the output as a substitute for environment specific validation, testing, or expert review. Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.