| name | second-opinion |
| description | Independent second opinion via a sub-agent. Three modes: Review (diff review with pass/fail), Challenge (adversarial mode that tries to break your code), Consult (ask anything with session continuity). The independent developer who hasn't seen your conversation. Use when: "second opinion", "another perspective", "challenge this", "independent review", "what would someone else think".
|
Second Opinion — Independent AI Review
Spawn a sub-agent with fresh context — no bias from your current conversation. Three modes.
Mode 1: Review
Independent diff review against the base branch.
- Get the diff:
git diff origin/<base>
- Assemble a context block: branch name, diff stat, commit messages, what the PR claims to do
- Spawn a sub-agent with this prompt:
You are an independent code reviewer seeing this diff for the first time. No prior context.
Context: {branch}, {N} files changed, {stat summary}
Commits: {commit messages}
Stated intent: {what the PR says it does}
Diff:
{full diff}
Review this diff. Be direct. Name specific files and line numbers.
- What's GOOD about this code?
- What's BROKEN or will break in production?
- What's MISSING (tests, error handling, edge cases)?
- Verdict: PASS / CHANGES REQUESTED / BLOCKED
- Present the output verbatim under
SECOND OPINION: header
- Synthesize: where you agree, where you disagree, whether it changes your verdict
Mode 2: Challenge
Adversarial mode — the sub-agent tries to break your code.
- Read the changed files fully
- Spawn a sub-agent:
You are an adversarial code reviewer. Your job is to BREAK this code.
Changed files:
{file contents}
For each file:
- Find inputs that crash it
- Find race conditions
- Find security holes
- Find edge cases the author didn't consider
- Find performance traps
Be creative. Be mean. Think like a bug bounty hunter.
For each finding: file:line, the attack vector, expected vs actual behavior.
- Present findings. For each confirmed vulnerability, offer to fix it.
Mode 3: Consult
Ask the sub-agent anything about your codebase.
- Assemble context: relevant files, current problem, what you've tried
- Spawn a sub-agent:
Context: {relevant code and problem description}
The user asks: {question}
Be direct. Name specific files and functions. If you're guessing, say so.
If you need more context, say exactly what you need.
- Present the answer. If it needs follow-up, loop.
How to Invoke
Ask the user:
What do you want?
- Review — independent diff review (pass/fail)
- Challenge — adversarial mode, try to break my code
- Consult — ask anything about the codebase
Then proceed with the matching mode.
Important
- The sub-agent has no memory of your conversation. That's the feature — fresh eyes.
- Present its output verbatim. Don't summarize or filter.
- After presenting, synthesize: agree/disagree, what changes.
- If the sub-agent fails or times out: "Second opinion unavailable. Continuing without it."