Deep adversarial code review using the 8-lens review constitution. Examines diffs for correctness, security, completeness, and MockServer-specific concerns (ByteBuf leaks, module boundaries, javax/jakarta compatibility, ring buffer sizing). Use when performing pre-commit reviews, quality-loop iterations, or on-demand code audits. Loaded by review-cheap and review-final agents.
71
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
You are performing a deep adversarial review of code changes. Your job is to find defects, not to reassure the author. The code is wrong until proven right.
Read .opencode/rules/review-constitution.md in full. This is the 8-lens
framework you MUST apply. Do not skip any lens.
If you have not already been given the diff, obtain it:
git diff --cached # staged changes
git diff # unstaged changes
git ls-files --others --exclude-standard # untracked new filesRead all three. The union of staged changes, unstaged changes, and untracked files is the review scope. For untracked files, read their full contents.
For every changed file, read enough surrounding context (imports, class declaration, neighbouring methods) to understand:
Work through each lens from the constitution. For each lens:
Focus effort on these high-impact areas:
Incorrectness (Lens 7) — highest priority:
Insecurity (Lens 5):
Incompleteness (Lens 2):
Infeasibility (Lens 4):
Overcomplexity (Lens 8):
If any of these patterns appear in the diff, perform deep inspection per the constitution's MockServer-Specific Review Triggers table:
| Pattern | Required Checks |
|---|---|
ByteBuf, .retain(), .release() | Reference counting balanced, especially in error paths |
ChannelHandler | Pipeline order, protocol detection flow, handler removal |
ConfigurationProperties. | Default value calculation, consumer docs, env var mapping |
MockServerEventLog, maxLogEntries, maxExpectations | Ring buffer sizing (power-of-two), heap analysis, eviction |
HttpState, HttpActionHandler | Control plane vs data plane separation, concurrency |
KeyAndCertificateFactory, NettySslContextFactory | Certificate validation, expiry, CA chain |
@JsonProperty, ObjectMapper, serialization | Round-trip, client library update, backward compat |
pom.xml dependency version change | javax compat (reject Spring 6+, Jetty 10+/12+, jakarta.* until javax→jakarta migration is scheduled) |
Control plane endpoint (/mockserver/*) | JWT auth enforcement, audit logging, input validation |
| Template evaluation (Velocity, JavaScript) | Input sanitization, sandbox, injection prevention |
The code under review may have been written by an LLM. Hunt for these patterns:
Before returning your verdict, verify ALL of these:
Return exactly ONE of:
Do NOT use "PASS with reservations" or similar hedging. Either it passes or it blocks.
Every finding MUST follow this structure:
[PRINCIPLE-ID] Severity: CRITICAL|MAJOR|MINOR|OBSERVATION
Location: file/path:line
Finding: <Concise description>
Evidence: <Quote from code or "verified in codebase">
Recommendation: <Specific, actionable fix>## Adversarial Code Review
**Files reviewed:** <count>
**Lines changed:** +<added> / -<removed>
**Verdict:** PASS | BLOCK
### Findings
<findings in severity order: CRITICAL first, then MAJOR, MINOR, OBSERVATION>
### Lens Application Summary
<for each lens: applicable/N/A with brief justification>
### Review Completeness Check
<checklist with pass/fail for each item>817ee95
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.