seb1n/awesome-ai-agent-skills/code-review
Claude Code and agent skill by seb1n/awesome-ai-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Perform thorough code reviews on files or pull requests, checking for bugs, security vulnerabilities, performance issues, and style violations. Use when the user requests code review or provides relevant inputs for this workflow.
Install
npx vskill@latest install seb1n/awesome-ai-agent-skills/code-reviewSKILL.md
Code Review
This skill enables an AI agent to conduct a structured, comprehensive code review on a source file, a set of changes, or a pull request. The agent examines the code across multiple quality dimensions — correctness, security, performance, readability, and maintainability — and produces a detailed review report with actionable feedback tied to specific lines of code.
Workflow
- Parse the input and establish context. Determine whether the input is a single file, a directory, or a pull request diff. If it is a pull request, fetch the diff and identify the base branch so that only the changed lines are reviewed. Read any related configuration files (linter configs, style guides, type definitions) to calibrate the review against the project's standards.
- Understand the intent of the change. Read commit messages, PR descriptions, and surrounding code to understand what the author intended. This prevents false positives — a reviewer must know the goal before judging whether the code achieves it. Summarize the change in one sentence before proceeding.
- Check for correctness and bugs. Walk through every changed function and trace the data flow. Look for null or undefined dereferences, off-by-one errors, incorrect boolean logic, unhandled error paths, race conditions in concurrent code, and resource leaks (open files, database connections, unreleased locks). Verify that edge cases — empty inputs, maximum values, unexpected types — are handled.
- Evaluate security. Scan for common vulnerability patterns: unsanitized user input (SQL injection, XSS), hardcoded secrets or credentials, insecure cryptographic usage, overly permissive file or network access, and missing authentication or authorization checks. Flag any dependency additions and check for known CVEs.
- Assess performance and scalability. Identify algorithmic complexity issues (nested loops over large collections, repeated database queries inside loops, unbounded memory growth). Check for unnecessary allocations, missing caching opportunities, and blocking calls in async contexts. Consider the expected data volume and whether the code will scale.
- Review readability and maintainability. Evaluate naming clarity, function length, code duplication (DRY violations), and adherence to the project's style guide. Check that public functions have docstrings or type annotations. Verify that magic numbers are replaced with named constants and that complex logic has explanatory comments.
Review Checklist
The agent evaluates every change against these categories:
| Category | What to look for | |
|---|---|---|
| Bugs | Null derefs, off-by-one, logic errors, unhandled exceptions | |
| Security | Injection, XSS, hardcoded secrets, missing auth, insecure dependencies | |
| Performance | O(n²) loops, N+1 queries, unnecessary allocations, blocking I/O | |
| Readability | Unclear names, long functions, missing docs, inconsistent formatting | |
| DRY | Copy-pasted blocks, duplicated logic that should be extracted | |
| Error handling | Swallowed exceptions, missing retries, unclear error messages | |
| Testing | Missing tests for new logic, broken existing tests, untested edge cases |
Usage
Provide one or more of the following inputs:
- File path — a single source file to review in its entirety.
- Directory path — the agent reviews all source files in the directory.
- Pull request URL — e.g.,
https://github.com/user/repo/pull/42. The agent fetches the diff and reviews only the changed lines in context. - Diff or patch text — raw unified diff pasted directly.
- Focus area (optional) — e.g., "focus on security" or "check performance only" to narrow the review scope.
Examples
Example 1 — Reviewing a Python function
Given this file src/auth.py:
The agent produces the following review:
Example 2 — Reviewing a pull request diff
Given a PR diff for src/api/orders.js:
The agent produces:
Best Practices
- Review the diff, not just the file. Focus on changed lines and their immediate context. Avoid commenting on pre-existing issues unless they interact with the new changes.
- Classify severity explicitly. Use Critical / Warning / Info levels so the author knows what must be fixed before merging versus what is a suggestion.
- Suggest concrete fixes, not vague complaints. Instead of "this could be better," provide a replacement code snippet or a specific refactoring step.
- Limit scope per review round. If a file has dozens of issues, prioritize the top 5-7 most impactful ones. Overwhelming the author reduces the chance that anything gets fixed.
- Acknowledge good patterns. When the author makes a particularly clean abstraction or handles an edge case well, call it out. Positive feedback reinforces good habits.
- Check tests alongside code. If new logic lacks tests, flag it. If tests exist, verify they actually exercise the changed behavior and not just the happy path.
Edge Cases
- Generated or vendored code: Files produced by code generators, protocol buffer compilers, or vendored dependencies should generally be excluded from review. The agent will skip files matching common generated-code patterns unless explicitly asked.
- Large diffs (>1000 lines): Very large pull requests are difficult to review thoroughly. The agent will warn the author and suggest splitting the PR, then focus on the highest-risk files first.
- Language-specific idioms: A pattern that is idiomatic in one language (e.g., Go's explicit error returns) may look like a code smell in another. The agent adjusts its expectations based on the detected language.
- Incomplete context: When reviewing a diff without access to the full repository, the agent may not be able to verify type definitions, configuration, or upstream callers. It will note assumptions explicitly.
- Style-only changes: If a PR contains only formatting or rename changes, the agent will confirm there are no semantic differences and produce a short approval rather than a full report.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcode-and-development/code-review/SKILL.md
Popularity
- Repository stars
- 43
- Repository forks
- 5
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/seb1n/awesome-ai-agent-skills/code-review)