This skill should be used when the user asks to "get an adversarial review", "have Grok review this", "stress-test this plan", "get a second opinion on this design", "adversarial feedback", "red team this document", "devil's advocate review", "challenge this plan", "poke holes in this", "critique this plan", "tear this apart", "find the flaws", or "what's wrong with this plan". Also trigger when the user mentions "cross-model review", "external review of plan", or wants an LLM-vs-LLM review of architecture, implementation plans, checklists, or working documents. Supports conservative and aggressive auto-apply modes for integrating feedback.
From adversarial-reviewnpx claudepluginhub brightops-ai/brightopsai-plugins-official --plugin adversarial-reviewThis skill is limited to using the following tools:
references/adversarial-prompt-templates.mdreferences/feedback-integration.mdreferences/grok-ui-navigation.mdExecutes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Send plans, designs, and working documents to Grok (grok.com) for critical adversarial feedback. Automate the full loop: navigate to Grok, match or create the project, upload the document, submit a structured review prompt, extract findings, and integrate approved suggestions back into the source file.
references/grok-ui-navigation.md — Playwright selectors, URL patterns, chunked typing strategy, and response detection for Grok's UIreferences/adversarial-prompt-templates.md — Review prompt templates (standard, architecture, implementation, security) with selection logicreferences/feedback-integration.md — Severity-to-action mapping, conflict resolution rules, and document style preservationRead the file path from the skill argument. If no path provided, ask the user via AskUserQuestion. Read the file content with the Read tool. Determine the project name:
basename $(git rev-parse --show-toplevel)
If not in a git repo, use the current directory name.
Check the argument for --aggressive. This controls auto-apply behavior:
| Mode | Auto-apply | Propose to user | Always ask |
|---|---|---|---|
| Conservative (default) | Minor, Nit | Major | Critical |
Aggressive (--aggressive) | Minor, Nit, Major | Critical | — |
Critical severity items always require user confirmation regardless of mode.
Before submitting any content to Grok, scan the document for secrets:
sk-, api_key, bearer, token)password=, passwd, secret)If detected, warn the user and offer to redact before proceeding. Never paste secrets into Grok.
Navigate to https://grok.com using browser_navigate. Take a browser_snapshot. If a login wall or auth prompt is detected, inform the user:
"Grok requires login. Please log in to grok.com in the Playwright browser window, then confirm here when ready."
Wait for confirmation via AskUserQuestion before proceeding.
Consult references/grok-ui-navigation.md for detailed selectors and navigation steps.
references/grok-ui-navigation.md for the 3-step dialog flow)5b. Keep project sources current:
Consult references/adversarial-prompt-templates.md to select the appropriate template. Read the document and reason about which variant fits best:
If the user specifies a variant, use it regardless of auto-detection. Briefly note which variant was selected and why.
The prompt has three parts:
Use browser_evaluate to set the prompt text in the contenteditable input (Grok uses a contenteditable div, not a textarea). Regular browser_type works for short text but browser_evaluate is more reliable for prompts over a few hundred characters. See references/grok-ui-navigation.md for the exact JavaScript pattern.
After setting the text, click the Submit button (find it via browser_evaluate using ariaLabel === 'Submit').
Grok streams responses which can take 30-60+ seconds for detailed reviews. Use a polling approach:
browser_wait_for (time)browser_evaluate to measure the response text length (query .prose or .markdown elements)Do NOT rely solely on the Submit button's disabled/enabled state — it can remain disabled after generation completes. Text length stabilization is the most reliable signal.
On timeout (120 seconds total), take a browser_take_screenshot, report the state to the user, and offer to retry.
If Grok's response is truncated (ends mid-sentence or says "continued..."):
If Grok asks a clarifying question:
Cap at 3 follow-up turns to prevent infinite loops.
Use browser_evaluate to extract the response. Grok's page contains multiple .prose / .markdown elements — the user's message and the assistant's response are separate elements. To identify the correct one:
.prose, .markdown elementsfilename parameter on browser_evaluate, then read itGrok outputs findings as JSON first, then markdown. Prefer parsing the JSON array for structured data. Each finding has:
id — finding numberseverity — Critical / Major / Minor / Nittitle — short descriptionrationale — explaining the concernsuggestion — concrete fixself_improvement — Grok's self-critique of its own finding (how it could be sharper or more specific)Use the self-improvement notes to gauge finding quality — if Grok flags its own finding as vague, weigh it lower during triage.
Create a backup of the original document at {filename}.pre-review.md before making any edits.
For each finding, classify per the mode table in Step 2:
After all edits, re-read the file and do a coherence pass to ensure integrated changes read naturally and don't conflict with each other.
After applying edits locally, update the project source in Grok so it always has the latest version:
references/grok-ui-navigation.md)This ensures future reviews in the same project reference the post-review version, not the original.
Output a structured summary:
## Adversarial Review Summary
**Source:** [filename]
**Reviewer:** Grok (grok.com)
**Mode:** Conservative | Aggressive
**Project:** [project name]
### Findings by Severity
- Critical: N
- Major: N
- Minor: N
- Nit: N
### Changes Applied
- [list with line references]
### Changes Proposed (Declined)
- [list with rationale for declining]
### Logged for Reference
- [interesting but out-of-scope findings]
### Open Questions
- [any unresolved items from the review]
references/feedback-integration.md