Code Review Checklist Skill
This skill generates a structured, prioritised code review checklist tailored to a specific PR, language, and risk level. It helps reviewers be thorough without being bureaucratic.
Required Inputs
Ask the user for these if not provided:
- Programming language(s) (e.g. Python, TypeScript, Go, Java)
- PR type (new feature / bug fix / refactor / performance improvement / security patch / infrastructure change)
- Risk level (Low: internal tooling, Low traffic / Medium: user-facing feature / High: payment, auth, data pipeline, public API)
- Team context (optional: team size, seniority mix, any known recurring issues)
Output Structure
1. Checklist Header
PR: [Title if provided]
Language: [Language]
Type: [PR Type]
Risk Level: [Low / Medium / High]
Estimated review depth: [Quick scan ~15 min / Standard ~30 min / Deep review ~60 min+]
2. The Checklist
Organise into sections. Mark each item with a priority indicator:
- ๐ด MUST โ Blocking. PR should not merge without this.
- ๐ก SHOULD โ Important. Address before merge unless there's a good reason not to.
- ๐ข CONSIDER โ Nice to have. Worth a comment but not blocking.
Section A: Correctness
- ๐ด Does the code do what the ticket/requirement describes?
- ๐ด Are edge cases handled? (nulls, empty arrays, zero values, max values)
- ๐ด Are error states handled and surfaced appropriately?
- ๐ก Does the happy path have adequate test coverage?
- ๐ก Are failure paths tested?
Section B: Security (scale with risk level โ expand for High risk PRs)
- ๐ด [High risk only] Is user input sanitised before use in queries or commands?
- ๐ด [High risk only] Are auth/permission checks in place?
- ๐ก Are secrets/credentials committed anywhere? (check .env handling)
- ๐ก Are third-party dependencies known-safe versions?
Section C: Performance
- ๐ก Are there N+1 query patterns in database calls?
- ๐ก Is there unnecessary work inside loops?
- ๐ข Are database queries indexed appropriately?
- ๐ข Is caching considered where appropriate?
Section D: Readability & Maintainability
- ๐ก Are function and variable names clear without needing a comment to explain them?
- ๐ก Are complex logic blocks explained with inline comments?
- ๐ข Is the code consistent with existing patterns in the codebase?
- ๐ข Are there any magic numbers that should be named constants?
Section E: Language-Specific Checks
[Populate this section based on the specified language. Examples below:]
Python:
- ๐ก Are type hints used on function signatures?
- ๐ก Are exceptions caught specifically (not bare
except:)?
- ๐ข Does it follow PEP 8 (or the team's linter config)?
TypeScript/JavaScript:
- ๐ด Are there any
any types that should be properly typed?
- ๐ก Are async/await patterns used consistently (no mixed Promise.then chains)?
- ๐ข Are there unnecessary re-renders in React components?
Go:
- ๐ด Are errors checked (not ignored with
_)?
- ๐ก Are goroutines properly managed to prevent leaks?
- ๐ข Are exported functions documented?
Section F: PR Hygiene
- ๐ก Is the PR a reasonable size? (>500 lines diff suggests it should be split)
- ๐ก Does the PR description explain why, not just what?
- ๐ข Are there linked tickets or context in the PR description?
- ๐ข Are migration scripts or deployment notes included if needed?
3. Risk-Specific Additions
For High risk PRs, always add:
- ๐ด Has this been tested in a staging environment?
- ๐ด Is there a rollback plan?
- ๐ด Has a second reviewer been assigned?
For Infrastructure / DB changes, always add:
- ๐ด Are migrations backward-compatible?
- ๐ด Has the migration been tested against production data volume?
Quality Checks
Example Trigger Phrases
- "Generate a code review checklist for a Python bug fix PR"
- "Give me a review checklist for a high-risk TypeScript auth change"
- "What should I check in this Go PR?"
- "Create PR review standards for our team"