Quick Reference — see parent for full agent ecosystem.
The Review Agent reads diffs with adversarial intent — assuming every line could hide a bug, security hole, or performance trap. It classifies findings by severity (P1–P3) and provides concrete fix recommendations, not vague warnings. Unlike human reviewers who fatigue after 20 minutes, the Review Agent checks every changed line systematically against classifiers for injection, logic errors, concurrency bugs, and convention violations.
When Not to Use
Simple or one-off tasks — if the task is straightforward, direct execution is faster than structured methodology.
Already established workflows — follow existing team conventions rather than introducing new frameworks.
When automation overhead exceeds benefit — for very small scopes, the setup cost may not be justified.
Dependencies
Python 3.8+ or Node.js 18+
Access to relevant APIs/services for your specific use case
Basic understanding of the domain concepts
Commands
# Refer to the skill's usage section for specific commands
# Adapt these to your workflow
Key Responsibilities
Adversarial analysis: Read every changed line as if it is wrong — look for injection, logic errors, off-by-one, race conditions, and undefined behavior
Severity-ranked findings: Report issues as P1 (blocking), P2 (should fix), P3 (consider) with clear reproduction steps and fix recommendations
Context-aware checks: Understand the project's conventions, framework patterns, and dependency versions to flag real issues — not boilerplate complaints
Code Example
"""Minimal review agent pattern — analyze a diff."""
import json, sys
def review_diff(diff_text: str) -> dict:
findings = []
lines = diff_text.split("\n")
for i, line in enumerate(lines):
if line.startswith("+") and "eval(" in line:
findings.append({
"file": "unknown", "line": i, "severity": "P1",
"type": "Code injection",
"finding": "eval() called with dynamic input",
"recommendation": "Replace with safe parser or AST-based evaluation"
})
if line.startswith("+") and "password" in line.lower() and "=" in line:
findings.append({
"file": "unknown", "line": i, "severity": "P1",
"type": "Secret exposure",
"finding": "Password literal in source code",
"recommendation": "Move to environment variable or secrets manager"
})
if line.startswith("+") and "raw(" in line.lower():
findings.append({
"file": "unknown", "line": i, "severity": "P2",
"type": "SQL injection risk",
"finding": "Raw SQL without parameterization",
"recommendation": "Use parameterized query or ORM"
})
return {
"findings": findings,
"summary": f"{len([f for f in findings if f['severity'] == 'P1'])} P1, "
f"{len([f for f in findings if f['severity'] == 'P2'])} P2",
"verdict": "blocked" if any(f["severity"] == "P1" for f in findings) else "approved"
}
if __name__ == "__main__":
diff = sys.stdin.read()
result = review_diff(diff)
print(json.dumps(result, indent=2))
Checklist
All P1/P2 findings resolved or explicitly acknowledged with risk acceptance
No unreviewed changed lines in security-sensitive areas (auth, payments, PII)
Anti-Rationalization Table
Rationalization
Reality
"I wrote it carefully, no bugs"
Authors are blind to their own assumptions — adversarial review catches what you did not think to check
"This is just a small change"
Small changes in critical paths (auth, payments, serialization) cause the highest-impact bugs
"The tests pass, so it is correct"
Tests cover what you thought of. Review finds what you did not think of
When to Use
Use before every PR merge, after any refactoring, when auditing security-sensitive code (auth, payments, PII), and as a pre-deploy safety gate. Do NOT use as a substitute for running tests, for generated/boilerplate code where patterns are strictly mechanical, or when the agent cannot access the full diff context.
1---2name: review-agent3description: Use when reading code changes with adversarial intent to find bugs, security4 holes, logic errors, and performance traps.5domain: agents6author: oyi777license: Apache-2.08subdomain: ai-agents9tags:10- agent11- ai-agent12- automation13- review14- autonomous15version: 1.0.016category: agents17metadata:18 source: https://skillmd.com/skills/oyi77/review-agent19---202122# Review Agent2324Quick Reference — see parent for full agent ecosystem.2526The Review Agent reads diffs with adversarial intent — assuming every line could hide a bug, security hole, or performance trap. It classifies findings by severity (P1–P3) and provides concrete fix recommendations, not vague warnings. Unlike human reviewers who fatigue after 20 minutes, the Review Agent checks every changed line systematically against classifiers for injection, logic errors, concurrency bugs, and convention violations.27282930## When Not to Use3132- **Simple or one-off tasks** — if the task is straightforward, direct execution is faster than structured methodology.33- **Already established workflows** — follow existing team conventions rather than introducing new frameworks.34- **When automation overhead exceeds benefit** — for very small scopes, the setup cost may not be justified.353637## Dependencies3839- Python 3.8+ or Node.js 18+40- Access to relevant APIs/services for your specific use case41- Basic understanding of the domain concepts424344## Commands4546```bash47# Refer to the skill's usage section for specific commands48# Adapt these to your workflow49```50## Key Responsibilities5152- **Adversarial analysis**: Read every changed line as if it is wrong — look for injection, logic errors, off-by-one, race conditions, and undefined behavior53- **Severity-ranked findings**: Report issues as P1 (blocking), P2 (should fix), P3 (consider) with clear reproduction steps and fix recommendations54- **Context-aware checks**: Understand the project's conventions, framework patterns, and dependency versions to flag real issues — not boilerplate complaints5556## Code Example5758```python59"""Minimal review agent pattern — analyze a diff."""6061import json, sys6263def review_diff(diff_text: str) -> dict:64 findings = []65 lines = diff_text.split("\n")6667 for i, line in enumerate(lines):68 if line.startswith("+") and "eval(" in line:69 findings.append({70 "file": "unknown", "line": i, "severity": "P1",71 "type": "Code injection",72 "finding": "eval() called with dynamic input",73 "recommendation": "Replace with safe parser or AST-based evaluation"74 })75 if line.startswith("+") and "password" in line.lower() and "=" in line:76 findings.append({77 "file": "unknown", "line": i, "severity": "P1",78 "type": "Secret exposure",79 "finding": "Password literal in source code",80 "recommendation": "Move to environment variable or secrets manager"81 })82 if line.startswith("+") and "raw(" in line.lower():83 findings.append({84 "file": "unknown", "line": i, "severity": "P2",85 "type": "SQL injection risk",86 "finding": "Raw SQL without parameterization",87 "recommendation": "Use parameterized query or ORM"88 })8990 return {91 "findings": findings,92 "summary": f"{len([f for f in findings if f['severity'] == 'P1'])} P1, "93 f"{len([f for f in findings if f['severity'] == 'P2'])} P2",94 "verdict": "blocked" if any(f["severity"] == "P1" for f in findings) else "approved"95 }9697if __name__ == "__main__":98 diff = sys.stdin.read()99 result = review_diff(diff)100 print(json.dumps(result, indent=2))101```102103## Checklist104105- [ ] All P1/P2 findings resolved or explicitly acknowledged with risk acceptance106- [ ] Security patterns checked: injection, secrets, auth bypass, CSRF, XSS107- [ ] Logic verified: null checks, boundary conditions, error paths108- [ ] Performance reviewed: N+1 queries, unnecessary allocations, sync I/O in hot path109- [ ] Convention compliance: naming, imports, error handling matches surrounding code110111## Workflow1121131. **Identify** the task or trigger.1142. **Prepare** inputs and configure parameters.1153. **Execute** the core routine.1164. **Verify** the output against expected results.1175. **Iterate** based on feedback or new data.118119## Verification120121All reviews must pass verification before approval:122- [ ] All P1 (blocking) findings resolved or explicitly risk-accepted123- [ ] Security patterns verified: injection, secrets, auth bypass, CSRF, XSS124- [ ] Logic verified: null checks, boundary conditions, error paths125- [ ] Performance reviewed: N+1 queries, unnecessary allocations, sync I/O in hot paths126- [ ] Convention compliance: naming, imports, error handling matches surrounding code127- [ ] No unreviewed changed lines in security-sensitive areas (auth, payments, PII)128129## Anti-Rationalization Table130131| Rationalization | Reality |132|---|---|133| "I wrote it carefully, no bugs" | Authors are blind to their own assumptions — adversarial review catches what you did not think to check |134| "This is just a small change" | Small changes in critical paths (auth, payments, serialization) cause the highest-impact bugs |135| "The tests pass, so it is correct" | Tests cover what you thought of. Review finds what you did not think of |136137## When to Use138139Use before every PR merge, after any refactoring, when auditing security-sensitive code (auth, payments, PII), and as a pre-deploy safety gate. Do NOT use as a substitute for running tests, for generated/boilerplate code where patterns are strictly mechanical, or when the agent cannot access the full diff context.
Run npx get-skill add oyi77/review-agent in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Use when reading code changes with adversarial intent to find bugs, security holes, logic errors, and performance traps. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under Apache-2.
oyi77 (@oyi77) published this skill. Their other Agent Skills are listed on their SkillMD profile.