From Adversarial Review
Adversarial review of a plan or any entity - file, doc, PR, issue, directory, or stated concept. Dispatches a separate adrev-reviewer agent that attacks premises, hunts failure modes, and steelmans the case against. When the target is a plan, the reviewing agent incorporates its findings into the plan automatically unless told not to. Triggers: adrev, adversarial review, red-team this, attack this plan, poke holes in, tear this apart, devil's advocate review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adversarial-review:adrevThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run a single hostile lens against anything: a plan, a doc, a PR, an issue, a codebase area, or an idea stated in the prompt. The review runs in a **separate agent** with fresh context so the author session never grades its own work.
Run a single hostile lens against anything: a plan, a doc, a PR, an issue, a codebase area, or an idea stated in the prompt. The review runs in a separate agent with fresh context so the author session never grades its own work.
Two behaviors by target class:
reviews/ directory as the audit trail.Not this skill's job: the full 7-lens plan gate (/document-review), code-correctness review of a diff (/code-review, pr-review-toolkit), prose style (/editorial-critique).
Parse $ARGUMENTS:
#N / issue URL, PR number/URL, plan slug, or free text describing the entity. Empty → autodetect (below).--no-apply - review only; never modify the plan. Any natural-language opt-out in the invocation ("don't change the plan", "report only", "just review") counts as --no-apply.--apply - force incorporation for a writable markdown target that did not auto-classify as a plan.--focus "..." - narrow the attack surface (e.g., --focus "the migration sequencing").mode:report-only - same as --no-apply, plus write the report to a file instead of prompting.mode:headless - skill-to-skill invocation: no prompts, return the findings JSON envelope, end with "Adversarial review complete". Headless never applies unless --apply is explicitly present.Resolve deterministically, in order:
plan.md / PLAN.md inside it; otherwise treat as a dir (code) target.#N, bare number, or GitHub issue URL → issue. A PR URL or pr#N → pr. Verify with gh issue view / gh pr view; a ref that resolves to neither is a blocker - report it, do not guess.~/code/plans/{token}/ → that plan.~/code/plans/*/plan.md whose sibling progress.md is not complete, falling back to a plan.md/obvious plan doc in the working tree. Confirm the autodetected target with the user before dispatching. If nothing plausible, ask.concept: the argument text itself is the entity under review.Plan classification (controls auto-apply): the target is a plan if it is a plan.md/PLAN.md, lives under a plans/ directory, or is unambiguously an execution plan (phased steps intended to be built). Ambiguous docs classify as doc (report-only) - the user can rerun with --apply. Never auto-apply to anything but a plan.
Compute the date deterministically: date +%F. Decide apply: target is a plan AND no opt-out present.
Dispatch one adrev-reviewer agent (installed at ~/.claude/agents/adrev-reviewer.md). Pass paths, not contents:
Target: {path-or-ref}
target_kind: {plan|doc|pr|issue|code|dir|concept}
apply: {true|false}
review_date: {YYYY-MM-DD}
review_artifact_path: {plan-dir}/reviews/adversarial-{review_date}.md # plans in a directory; omit otherwise
focus: {focus text, if any}
Reference files (read as needed): {siblings: research.md, decisions.md, progress.md; or repo paths the target cites}
For a concept target, include the full concept text in the prompt (it has no path) plus any repo context the user's phrasing points at.
The agent runs the full attack battery (premises, falsification, failure modes, strongest opposing case, reversal cost, second-order effects) and - when apply - incorporates findings into the plan per its apply protocol, returning a ledger of what changed.
The agent's DONE is a claim, not evidence:
git diff on the plan (or re-read the edited sections if untracked). Confirm the review artifact exists and every incorporated ledger entry corresponds to a real edit. Then present: findings table (id, test, severity, confidence, one-line what), the ledger (incorporated / deferred-to-risks / artifact-only), what the target survived, and the artifact path.issue or pr target, offer - do not auto-post - gh issue comment / gh pr review --comment with the findings.In mode:headless, skip the prose: emit the findings JSON envelope plus the ledger, then "Adversarial review complete".
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub lucasmccomb/ccgm --plugin adversarial-review