Best for
- Use when the user requests code review or provides relevant inputs for this workflow.
seb1n/awesome-ai-agent-skills/code-and-development/code-review/SKILL.md
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.
Decision brief
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 pr…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/seb1n/awesome-ai-agent-skills --skill "code-and-development/code-review"Inspect the Agent Skill "code-review" from https://github.com/seb1n/awesome-ai-agent-skills/blob/75865a5d037a4cdaa7f409a4ec14ab9b0292920b/code-and-development/code-review/SKILL.md at commit 75865a5d037a4cdaa7f409a4ec14ab9b0292920b. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. 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 (li…
The agent evaluates every change against these categories:
Provide one or more of the following inputs:
The query uses f-string interpolation with username directly in the SQL string. An attacker can pass ' OR '1'='1 as the username to bypass authentication entirely.
Each order triggers a separate SELECT for its items. For a user with 200 orders this executes 201 database queries. This will degrade significantly under load.
Permission review
The documentation includes network, browsing, or remote request actions.
**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.The documentation asks the agent to read local files, directories, or repositories.
**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.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 161 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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.
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.
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 |
Provide one or more of the following inputs:
https://github.com/user/repo/pull/42. The agent fetches the diff and reviews only the changed lines in context.Given this file src/auth.py:
import hashlib
def authenticate(username, password, db):
query = f"SELECT password_hash FROM users WHERE username = '{username}'"
row = db.execute(query).fetchone()
if row is None:
return False
stored_hash = row[0]
input_hash = hashlib.md5(password.encode()).hexdigest()
return input_hash == stored_hash
The agent produces the following review:
## Review: src/auth.py — authenticate()
### Critical — SQL Injection (line 4)
The query uses f-string interpolation with `username` directly in the SQL
string. An attacker can pass `' OR '1'='1` as the username to bypass
authentication entirely.
**Fix:** Use parameterized queries.
- row = db.execute(query).fetchone()
+ row = db.execute(
+ "SELECT password_hash FROM users WHERE username = ?", (username,)
+ ).fetchone()
### Critical — Weak Hashing Algorithm (line 9)
MD5 is cryptographically broken and unsuitable for password hashing. It is
vulnerable to rainbow table attacks and can be brute-forced in seconds on
modern hardware.
**Fix:** Use bcrypt or argon2 with a per-user salt.
- input_hash = hashlib.md5(password.encode()).hexdigest()
+ import bcrypt
+ return bcrypt.checkpw(password.encode(), stored_hash.encode())
### Warning — Timing Attack (line 10)
Direct string comparison of hashes with `==` leaks information through
timing differences. Use a constant-time comparison function.
**Fix:**
- return input_hash == stored_hash
+ import hmac
+ return hmac.compare_digest(input_hash, stored_hash)
### Info — Missing Type Annotations
Adding type hints improves readability and enables static analysis:
def authenticate(username: str, password: str, db: Connection) -> bool:
**Summary:** 2 critical, 1 warning, 1 info. This function must not be
deployed until the SQL injection and hashing issues are resolved.
Given a PR diff for src/api/orders.js:
@@ -12,6 +12,20 @@ const express = require("express");
const router = express.Router();
+router.get("/orders", async (req, res) => {
+ const userId = req.query.userId;
+ const orders = await db.query("SELECT * FROM orders WHERE user_id = $1", [userId]);
+ const enriched = [];
+ for (const order of orders.rows) {
+ const items = await db.query("SELECT * FROM order_items WHERE order_id = $1", [order.id]);
+ order.items = items.rows;
+ enriched.push(order);
+ }
+ res.json(enriched);
+});
The agent produces:
## Review: src/api/orders.js — GET /orders
### Warning — N+1 Query (lines 18-21)
Each order triggers a separate SELECT for its items. For a user with 200
orders this executes 201 database queries. This will degrade significantly
under load.
**Fix:** Use a single JOIN or a batched IN query:
const items = await db.query(
"SELECT * FROM order_items WHERE order_id = ANY($1)",
[orders.rows.map(o => o.id)]
);
// Then group items by order_id in application code.
### Warning — Missing Authorization Check (line 14)
The endpoint reads `userId` from the query string without verifying that
the authenticated user is allowed to view that user's orders. Any user
can read any other user's order history by changing the query parameter.
**Fix:** Validate that `req.user.id === userId` or that the requester
has an admin role before executing the query.
### Info — SELECT * Usage (lines 16, 19)
Selecting all columns returns data the client may not need (e.g.,
internal timestamps, soft-delete flags). Specify only the required columns
to reduce payload size and avoid leaking internal fields.
**Summary:** 0 critical, 2 warning, 1 info.
Frequently asked questions
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 pr…
The source record exposes this install command: npx skills add https://github.com/seb1n/awesome-ai-agent-skills --skill "code-and-development/code-review". Inspect the command and pinned source before running it.
Static rules flagged network, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
aAAaqwq/AGI-Super-Team
AI code review for PR or local changes
evanca/flutter-ai-rules
Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
oaslananka/kicad-mcp-pro
Use this skill for GitHub Copilot pull request and code reviews in oaslananka/kicad-mcp-pro. Review Python MCP server changes, KiCad adapter and tool-contract changes, tests, npm/package wrappers, Tauri/Rust desktop code, GitHub Actions, security controls, documentation, generated metadata, and compatibility/release surfaces. Use it whenever reviewing a PR or diff in this repository, especially changes under src/, tests/, packages/, src-tauri/, .github/workflows/, or public MCP metadata/configur
Borda/AI-Rig
Close PRs at an evidence gate or review local diffs/PRs with specialists and JSON artifacts.