Adversarial Artifact Review

VerifiedCaution

Adversarial, read-only review of any artifact — specs, architecture docs, PRs, plans, or prose. Hunts omissions, not just bugs, reporting only findings that survive refutation.

Sby Skills Guide Bot
DevelopmentIntermediate
11/17/2026
Claude Code
#adversarial-review#red-teaming#spec-review#code-review#read-only

Recommended for

Automated summary

Performs a read-only adversarial review of a spec, PR, plan, document, or prose claim, hunting for omissions and defects and reporting only findings that survive its own refutation.

Strengths

  • Handles multiple target types: REQ IDs, PR numbers, file paths, or inline text.
  • Strictly sanitizes external IDs and paths before resolution, and degrades gracefully when gh or .adlc is absent.
  • Explicitly hunts for missing elements, not just visible bugs, and filters weak findings through self-refutation.
  • Clearly scopes itself against /review, /reflect, and /validate while remaining read-only.

Limitations

  • Accepts one target per invocation with no useful default, so a concrete artifact must always be supplied.
  • Its depth depends on optional .adlc context and on gh for PR targets; missing pieces reduce the analysis.
  • It is not a replacement for a full code-review pipeline or a formal phase gate.
When to use it

Use when you need a skeptical, omission-focused challenge to a spec, plan, PR, or document before committing to it.

When not to use it

Do not use it for routine code review, implementer self-assessment, formal phase validation, or when no concrete artifact can be provided.

Security analysis

Caution
Quality score86/100

The skill is a read-only adversarial review workflow. Its execution surface is limited to reading a local project file via a `!` shell interpolation, an optional `gh` network fetch for PR targets, and optional subagent dispatch — all legitimate for its stated purpose, and it explicitly forbids modifying the target (only an optional report file for REQ targets). The main residual risk is indirect prompt injection via ETHOS.md or PR content loaded into context and the presence of shell/network/agent tooling without declared allowed-tools, which warrants 'caution' rather than 'safe'. No malicious or exfiltrating behavior found.

Findings
  • •Uses Claude Code `!`-prefixed shell execution (`test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo ...`) to inject a project-local file directly into the model context. This is legitimate for a project's own ethos file, but the contents are unsanitized attacker-controllable text in an untrusted repository, creating a prompt-injection surface at skill load time.
  • •PR targets pull remote content (`gh pr view --json title,body,files`, `gh pr diff`) and feed it into an adversarial reviewer context; PR bodies/diffs are untrusted input and a secondary indirect-injection channel (the skill does have the reviewer report findings only, which limits blast radius).
  • •Instructions dispatch subagents and reference shell-adjacent tooling, but no destructive, exfiltrating, or obfuscated operations (no curl|sh, no rm -rf, no secret transmission, no safety-disabling). Path handling is notably defensive: strict allowlist regex `^[A-Za-z0-9_./-]+$`, explicit `..` segment rejection, and a narrow REQ-id regex with an instruction not to widen it.
  • •Preamble contains a `!`-prefixed shell command (`test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo ...`) whose output is injected into the prompt. This is the standard Claude Code dynamic-context pattern and only reads a local file; it introduces no user-controlled arguments into the shell.
  • •Step 3 instructs reading `$ADLC_TOOLKIT_ROOT/agents/<name>.md` from an environment-variable-derived path. Low risk (read-only), but the path is externally influenced and could point outside the project; no write or execution follows from it.
  • •Optional `gh pr view` / `gh pr diff` network calls occur for numeric PR targets only, with an explicit degradation path when `gh` is absent.
How this analysis is made

Examples

Attack a requirement
/adversary REQ-142 — attack this requirement and report the omissions and unstated assumptions that survive your refutation.
Red-team a PR
/adversary 847 — red-team this PR. Assume the change is broken and report only verified findings.
Break an architecture plan
Use /adversary on this plan: we will migrate billing to an event-sourced service with exactly-once delivery. What is wrong or missing?

name: adversary description: Adversarial review of any artifact — a spec, architecture doc, task breakdown, diff/PR, plan, README, or prose claim. Assumes it is wrong, broken, or incomplete, tries to prove it, and reports only the findings that survive its own refutation. Read-only. Use when the user says "attack this", "adversary", "red-team this spec/plan/PR", "try to break this", "what's wrong with this requirement", or wants a skeptical-by-default pass that hunts omissions, not just bugs. argument-hint: A REQ-xxx id, a PR number, a file path, or inline text to attack

/adversary — Adversarial Review of Any Artifact

You attack the artifact in front of you. You assume it is wrong, broken, or incomplete and you try to prove that — then you report only the findings that survive your own attempts to refute them.

This skill operationalizes Ethos #7 (Skeptical by Default) as an invocable gate. It is deliberately distinct from its siblings, and does not replace any of them:

  • /review is a code-review pipeline over a change set (5 reviewer agents, correctness/quality/architecture/tests/security). /adversary is artifact-agnostic and adversarial by construction — its job is to break the thing, not to score a diff.
  • /reflect is the implementer's self-review (the reflector agent). /adversary is external and adversarial, not self-assessment.
  • /validate is a phase gate (pass/fail checklist per ADLC phase). /adversary attacks rather than gate-checks; the two are complementary.

/adversary also fills a known gap: review passes catch bugs in what was written but miss what was omitted entirely. The spec lens explicitly hunts omissions. (LESSON-330, LESSON-009.)

Ethos

!test -s .adlc/ETHOS.md && cat .adlc/ETHOS.md || echo No ethos found — run /init, or /adlc:init on the plugin install, to vendor .adlc/ETHOS.md

Context

This skill reads the target artifact at full fidelity — it does NOT delegate or summarize the artifact (summarization would weaken the attack). It loads no project context by default. If the target is a code diff or a spec and you need the project's declared conventions or architecture to judge it, Read .adlc/context/conventions.md and .adlc/context/architecture.md on demand — but only if they bear on the attack.

Input

The target is the argument: whatever follows /adversary in the invocation (on Claude Code it can also arrive as an ARGUMENTS: line appended to this text).

The target is polymorphic (see Step 1). One target per invocation. If there is no argument, ask the user what to attack — there is no useful default.

Prerequisites

/adversary has no hard .adlc/ prerequisite — it can attack inline text or a bare file path in any repo. Two soft dependencies degrade gracefully:

  • gh CLI is needed only for PR-number targets. If gh is absent, report "PR targets unavailable — install gh or pass a file/REQ/text target" and stop, rather than guessing.
  • A report file is written only for REQ-id targets and only when .adlc/ exists in the invoking project (Step 6). Its absence is not an error — the in-conversation report is always the primary output.

Instructions

Step 1: Resolve and classify the target (BR-1)

Resolve the argument to a concrete artifact using strict sanitization for every externally-derived token (LESSON-008 — a hostile id/path must never reach a shell or a file read):

  1. REQ id — if the argument matches ^REQ-[0-9]{3,6}$ exactly, resolve it to its spec directory by globbing .adlc/specs/<id>-*/. Do NOT widen the regex. Read requirement.md (and architecture.md / tasks/ if present). Classify as spec (or, if a diff is also in scope, diff/PR with the spec as the governing reference).
  2. PR number — if the argument is all digits (^[0-9]+$), treat it as a PR number and resolve via gh pr view <n> --json title,body,files plus gh pr diff <n> (requires gh; degrade per Prerequisites). Classify as diff/PR.
  3. File path — if the argument names an existing file, attack that file. Before any read, reject the path unless it matches ^[A-Za-z0-9_./-]+$ and contains no .. segment: split on / and reject if any segment equals .., and additionally reject if the raw string contains .. adjacent to any character. Classify by content/extension: a requirement.md → spec; an architecture.md / plan → plan/architecture; a .diff/.patch → diff/PR; a README or other prose → prose claim.
  4. Inline text — anything else is treated as a literal prose claim. Classify as prose claim.

State the resolved target and the classified type before attacking.

Step 2: Select attack lenses by artifact type (BR-2)

Choose the lens set for the classified type. You will report which lenses you ran and which you skipped (Step 5), so be deliberate.

  • spec → omissions (what rule is missing?), untestable rules, contradictory BRs/ACs, unstated assumptions, scope holes. Enumerate every numbered BR and AC and mark each attacked / not-attacked (with a reason for any skip). No silent caps.
  • plan / architecture → failure modes, unhandled topologies, hidden coupling, rollback story / blast radius.
  • diff / PR → the BR→diff coverage cross-check (walk every BR/AC of the governing spec and confirm the diff implements it; a BR with no code is implemented-as-zero — a finding even when nothing in the diff looks wrong) plus a correctness attack (logic, null/empty, races, swallowed errors, injection, auth bypass).
  • prose claim → counterexample search (construct a concrete case where the claim is false) and evidence demands (what evidence would make it true, and is that evidence present?).

Step 3: Run the attack (parallel when agents available, BR-6 / BR-8)

Read the target at full fidelity first. Then attack:

  • When the Agent tool and the adversary agent (agents/adversary.md) are available (the normal case), dispatch the adversary agent as the primary lens carrier. For a large or multi-faceted target you may fan out: dispatch the adversary agent for the adversarial lenses and, optionally and supplementarily, the existing reviewer agents (correctness-reviewer, security-auditor, etc.) as additional executors for the diff/PR correctness surface. Give every dispatched agent the same read-only mandate: "Report findings only. Do not modify the target."
  • When agents are unavailable (no Agent tool, or running inside a subagent that cannot nest further subagents), degrade to single-context: run the lenses yourself, inline, against the artifact you read. Same lenses, same protocol — only the execution venue changes. This is the same soft-fallback philosophy as the delegation gates.

If this harness can run subagents, dispatch these agents in parallel; if it cannot, or you are a subagent, run each checklist inline from .adlc/agents/<name>.md. Agent names are bare on the symlink install and adlc:-prefixed on the plugin install (adlc:<name>): before dispatching, check which form the Agent tool lists and use that one, and do not wait for an error, because a name it does not list can silently run a generic agent without the checklist; if neither form is listed, say which agent is missing and run its checklist inline. When .adlc/agents/ is absent, say that /init (/adlc:init on the plugin install) vendors it, then read $ADLC_TOOLKIT_ROOT/agents/<name>.md (the toolkit root is the parent of this skill's base directory) where your file tool can reach it; never improvise a checklist. An inline run of a review or audit agent is read-only: report findings, apply no fixes, and run no test runner, build tool, package manager or interpreter.

Step 4: Mandatory self-refutation (BR-3)

This step is not optional and runs before anything is reported. For every candidate finding:

  1. Record an explicit attempt to refute it — argue the artifact is actually fine here, find the guard you missed, construct the input that makes the concern moot.
  2. If the refutation kills the finding, drop it silently. Do not report killed findings and do not list them as "considered". A false positive costs trust as fast as a miss — Ethos #7 cuts both ways.
  3. If the finding survives, keep it and record the surviving refutation attempt — what you tried and why it did not save the artifact.

Step 5: Report (BR-4)

Emit the in-conversation report:

  • Findings — each in the Finding schema: severity (critical / major / minor), confidence (high / medium / low), break_scenario (required — the concrete sequence in which the artifact fails; no scenario, no finding), refutation_attempt (required — the surviving attempt to kill it).
  • Verdict — exactly one of found problems or could not find a problem. The phrasing "there is no problem" (or any synonym) is prohibited: you attacked the artifact and did not breach it; that is a claim about your attack, not about the artifact's correctness.
  • Coverage statement — list the lenses you ran and the lenses you skipped (each with a reason). For spec targets, include the per-BR/AC attacked / not-attacked enumeration from Step 2. No silent caps.

Step 6: Optional report file (BR-5)

/adversary is strictly read-only with respect to the target — it never edits the artifact under attack.

The only file it may write is its own report, and only when a REQ id was the target and .adlc/ exists in the invoking project: write the report to .adlc/specs/<id>-*/adversary-report.md. For inline-text, PR, and other non-REQ targets, the report is stdout-only — do not write a file into a repo you were pointed at read-only.

Quality checklist

Before finishing, self-check:

  • [ ] The target artifact is unchanged — its content and mtime are exactly as found (read-only proof). The only write, if any, is the optional report file for a REQ target.
  • [ ] Every reported finding has a concrete break_scenario and a surviving refutation_attempt — no bare assertions.
  • [ ] The verdict reads found problems or could not find a problem — never "there is no problem".
  • [ ] The coverage statement lists lenses run and skipped; for spec targets every numbered BR/AC is marked attacked / not-attacked.
  • [ ] Externally-derived ids and paths were sanitized (strict regex, no .. segments) before any read.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/adversarial-artifact-review-mwirmdyw' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/adversarial-artifact-review-mwirmdyw/download' --output '.skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md.part' && mv '.skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md.part' '.skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites

/adversary has no hard .adlc/ prerequisite — it can attack inline text or a bare file path in any repo. Two soft dependencies degrade gracefully:

  • gh CLI is needed only for PR-number targets. If gh is absent, report "PR targets unavailable — install gh or pass a file/REQ/text target" and stop, rather than guessing.
  • A report file is written only for REQ-id targets and only when .adlc/ exists in the invoking project (Step 6). Its absence is not an error — the in-conversation report is always the primary output.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md' && test -s '.skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/adversary' && cp -R '.skill-downloads/adversarial-artifact-review-mwirmdyw' '.claude/skills/adversary'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/adversarial-artifact-review-mwirmdyw'

openskills read 'adversarial-artifact-review-mwirmdyw'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/adversarial-artifact-review-mwirmdyw/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills