contextual-review
Review pull requests for code quality, security vulnerabilities, best practices, and potential issues. Use when reviewing PRs, examining diffs, or providing code review feedback.
Install
mkdir -p .claude/skills/contextual-review && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8709" && unzip -o skill.zip -d .claude/skills/contextual-review && rm skill.zipInstalls to .claude/skills/contextual-review
About this skill
Contextual Review
Perform comprehensive reviews of code changes, implementation plans, and architecture decisions. Analyzes for quality, correctness, security, and adherence to project standards.
First: Read the Base Guidelines
Before reviewing any code, read base-review.md. It establishes:
- Reviewer philosophy (respect existing patterns, burden of proof on changes)
- Core quality standards (type safety, transaction integrity, data access, caching)
- Severity calibration with codebase-specific examples
- Common blind spots that reviewers unfamiliar with this codebase miss
The base guidelines apply to ALL reviews. Area-specific guides add targeted checklists.
When to Use
- Reviewing pull request changes
- Examining workspace diffs before creating a PR
- Getting feedback on code changes
- Identifying potential issues before merging
- Reviewing gameplans and implementation plans before execution
- Validating data model and API design decisions
Area-Specific Guidelines
Based on what files changed, consult the appropriate reference:
| Changed Files | Reference |
|---|---|
platform/docs/ | docs-review.md - Documentation review guidelines |
platform/flowglad-next/src/db/schema/, openapi.json, api-contract/ | api-review.md - Data model and API review |
packages/ | packages-review.md - SDK package review |
playground/ | playground-review.md - Example project review |
platform/flowglad-next/ | platform-review.md - Main platform review |
For reviewing implementation plans before code is written:
| Review Type | Reference |
|---|---|
| Gameplans / Implementation Plans | gameplan-review.md - Pre-implementation plan review |
Read the relevant reference file(s) based on the diff to get area-specific checklists and guidelines.
Review Process
0. Checkout PR
Run gh pr checkout <PR> to get the PR code locally. If it fails, continue with the review.
1. Gather Context
First, understand the scope of changes:
# Get the diff statistics to understand what files changed
GetWorkspaceDiff with stat: true
# Then examine individual file changes
GetWorkspaceDiff with file: 'path/to/file'
2. Review Categories
Analyze changes across these dimensions:
| Category | Focus Areas |
|---|---|
| Correctness | Logic errors, edge cases, null handling, off-by-one errors |
| Security | Input validation, injection risks, auth/authz, secrets exposure |
| Performance | N+1 queries, unnecessary loops, missing indexes, memory leaks |
| Maintainability | Code clarity, naming, DRY violations, complexity |
| Testing | Test coverage, edge cases tested, test quality |
| Types | Type safety, proper typing, avoiding any |
3. Project-Specific Checks
For this codebase, also verify:
- Bun: Using
buninstead ofnpmoryarn - Drizzle ORM: Schema changes use
migrations:generate, never manual migrations - Testing Guidelines:
- No mocking unless for network calls
- No
.spyOnor dynamic imports - No
anytypes in tests - Each
itblock should have specific assertions, nottoBeDefined - One scenario per
itwith exhaustive assertions
- Security: Check OWASP top 10 vulnerabilities (XSS, injection, etc.)
4. Provide Feedback
Use the DiffComment tool to leave targeted feedback:
DiffComment({
comments: [
{
file: "path/to/file.ts",
lineNumber: 42,
body: "Potential SQL injection vulnerability. Consider using parameterized queries."
}
]
})
Review Checklist
Code Quality
- Clear, descriptive variable and function names
- Functions are focused and not too long
- No dead code or commented-out code
- Error handling is appropriate
- Edge cases are handled
Security
- No hardcoded secrets or credentials
- Input is validated and sanitized
- No SQL injection vectors
- No XSS vulnerabilities
- Authentication/authorization is correct
- Sensitive data is not logged
Performance
- No unnecessary database queries
- Appropriate use of indexes
- No obvious memory leaks
- Pagination for large datasets
- Caching where appropriate
Testing
- New code has tests
- Tests cover happy path and error cases
- Tests are meaningful, not just for coverage
- No flaky test patterns
TypeScript
- Proper types used (no
anywithout justification) - Type narrowing is correct
- Generic types are appropriate
- Null/undefined handled properly
Output Format
Provide a structured review with:
- Summary: Brief overview of what the PR does
- Findings: Categorized issues (Critical, High, Medium, Low, Suggestions)
- Positive Notes: Good patterns or improvements noticed
- Recommendation: Approve, Request Changes, or Comment
Severity Levels
- Critical: Security vulnerabilities, data loss risks, breaking changes
- High: Bugs, significant performance issues, missing error handling
- Medium: Code quality issues, missing tests, unclear logic
- Low: Style issues, minor improvements, nitpicks
- Suggestion: Optional improvements, alternative approaches
Example Review
## Summary
This PR adds user authentication using JWT tokens with refresh token support.
## Findings
### Critical
- **src/auth/token.ts:45**: JWT secret is hardcoded. Move to environment variable.
### High
- **src/auth/login.ts:23**: Missing rate limiting on login endpoint.
### Medium
- **src/auth/validate.ts:12**: Token expiration check should use `<=` not `<` to handle exact expiration time.
### Suggestions
- Consider adding request ID to auth logs for debugging.
## Positive Notes
- Good separation of concerns between token generation and validation
- Comprehensive error types for different auth failures
## Recommendation
**Request Changes** - Address the critical security issue before merging.
Workflow
- Attempt to checkout the PR with
gh pr checkout <PR>(continue if it fails) - Get diff statistics with
GetWorkspaceDiff(stat: true) - Review changed files systematically
- Use
DiffCommentfor inline feedback - Provide overall summary and recommendation
- Offer to help fix any critical issues
More by flowglad
View all skills by flowglad →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversExtend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Easily enable Bitbucket and Jira integration with REST APIs for seamless repository management, pull requests, and works
Get structured & freeform code reviews with code quality analysis tools powered by OpenAI, Google & Anthropic. Supports
GitHub Repos Manager integrates with GitHub's REST API to streamline repo management, issues, pull requests, file ops, s
Seamlessly manage pull request workflows with Bitbucket and Jira integration. Effortlessly integrate Bitbucket with Jira
Integrate Overseerr with your Jellyfin media server for easy automated search, requests, and approval workflows for Plex
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.