code-review
Code Review
Review code changes using THREE (3) to FIVE (5) parallel subagents and correlate results into a summary ranked by severity.
Use the provided user guidance to steer the review and focus on specific code paths, changes, and/or areas of concern.
User Guidance: $ARGUMENTS
Default Behavior
- Review uncommitted changes by default (
git diffandgit diff --staged) - If no uncommitted changes exist, review the last commit (
git show HEAD) - If the user provides a pull request number or link, use
gh pr diff <number>to fetch changes
Workflow
- First, determine what to review based on the rules above
- Check if the changes include AWS infrastructure files:
- Terraform files (
*.tf) containing AWS patterns (provider "aws",aws_resources, orhashicorp/aws) - CDK files (TypeScript files containing
aws-cdk,@aws-cdk,cdk.Stack,cdk.App, orConstructpatterns)
- Terraform files (
- Check if the changes add new dependencies by looking for additions in:
package.json(new entries independenciesordevDependencies)requirements.txt,pyproject.toml,setup.py,setup.cfgCargo.toml(new entries in[dependencies]or[dev-dependencies])go.mod(newrequireentries)Gemfile,*.gemspeccomposer.json- Any other language-specific dependency manifest
- Only trigger on newly added dependencies, not version bumps of existing ones
- Launch parallel Task agents:
- THREE agents with
subagent_type: general-purpose, each instructed to:- Read the full file context (not just diffs) to understand surrounding logic
- Focus on different aspects: bugs/logic, security/auth, and patterns/structure
- Follow the detailed review guidelines below
- If AWS infrastructure detected: ONE additional agent with
subagent_type: aws-limitsto review AWS service quota violations in the changed infrastructure files - If new dependencies detected: ONE additional agent with
subagent_type: general-purposeto verify license compliance:- Extract the list of newly added dependency names and versions from the diff
- For each new dependency, determine its license (use the package registry API or repository metadata — e.g.
npm view <pkg> license,pip show <pkg>,cargo info <pkg>, or check the project's GitHub repo) - Flag any dependency whose license is not in the permissive allowlist:
MIT,ISC,BSD-2-Clause,BSD-3-Clause,Apache-2.0,0BSD,Unlicense,CC0-1.0,BlueOak-1.0.0 - For flagged dependencies, report: package name, detected license, and why it may be problematic (e.g. copyleft, proprietary, unknown)
- Severity: Critical for proprietary/unknown licenses, High for copyleft (GPL, AGPL, LGPL, MPL), Medium for weak copyleft or uncommon licenses
- THREE agents with
- Collect all findings and produce a consolidated summary
- Rank issues by severity: Critical > High > Medium > Low
- Include file paths and line numbers for each finding
- Suggest fixes where appropriate
Review Guidelines
Diffs alone are not enough. Read the full file(s) being modified to understand context. Code that looks wrong in isolation may be correct given surrounding logic.
What to Look For
Bugs — Primary focus
- Logic errors, off-by-one mistakes, incorrect conditionals
- Missing guards, unreachable code paths, broken error handling
- Edge cases: null/empty inputs, race conditions
- Security: injection, auth bypass, data exposure
Structure — Does the code fit the codebase?
- Follows existing patterns and conventions?
- Uses established abstractions?
- Excessive nesting that could be flattened?
Performance — Only flag if obviously problematic
- O(n²) on unbounded data, N+1 queries, blocking I/O on hot paths
Before You Flag Something
- Be certain. Don't flag something as a bug if you're unsure — investigate first.
- Don't invent hypothetical problems. If an edge case matters, explain the realistic scenario.
- Don't be a zealot about style. Some "violations" are acceptable when they're the simplest option.
- Only review the changes — not pre-existing code that wasn't modified.
Output Guidelines
- Be direct about bugs and why they're bugs
- Communicate severity honestly — don't overstate
- Include file paths and line numbers
- Suggest fixes when appropriate
- Matter-of-fact tone, no flattery
Severity Levels
- Critical: Security vulnerabilities, data loss, crashes in production
- High: Bugs that will cause incorrect behavior, broken functionality
- Medium: Code that works but has issues (poor error handling, edge cases)
- Low: Style issues, minor improvements, suggestions
Output Format
## Code Review Summary
### Critical Issues
- [file:line] Description of critical bug/security issue
### High Priority
- [file:line] Description
### Medium Priority
- [file:line] Description
### Low Priority / Suggestions
- [file:line] Description
### AWS Service Limits (if applicable)
- [file:line] Description of limit concern
### License Compliance (if applicable)
- [package-name] License: <license> — Reason flagged
### Summary
Brief overall assessment of the changes.
More from walletconnect/skills
security-audit-owasp-top-10
Performs comprehensive security audit of any codebase against OWASP Top 10 2025. Use when user asks for OWASP audit, OWASP Top 10 review, OWASP security check, or wants to audit code against OWASP categories. Do not trigger for PR review, npm/pip audit, SOC2 compliance, general security questions, or threat modeling.
26skill-writing
Designs and writes high-quality Agent Skills (SKILL.md + optional reference files/scripts). Use when asked to create a new Skill, rewrite an existing Skill, improve Skill structure/metadata, or generate templates/evaluations for Skills.
19code-simplifier
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
16agent-creator
Guide for creating custom Claude Code subagents. Use when user wants to create a new agent (or update an existing agent) that handles specific types of tasks with custom prompts, tool restrictions, and permissions. Triggers on requests to create agents, subagents, custom agents, or when user wants specialized AI assistants for specific workflows.
15command-creator
Guide for creating custom Claude Code slash commands. Use when user wants to create a new command (or update an existing command) that provides a reusable prompt snippet, workflow, or automation. Triggers on requests to create /commands, slash commands, custom commands, or when user wants to define frequently-used prompts as reusable commands.
15worktree
Manages git worktree lifecycle - create, list, remove, cleanup, prune, lock/unlock. Use when user mentions 'worktree', 'parallel branch work', 'cleanup worktrees', or needs to work on multiple branches simultaneously.
14