set-copilot: Agent for Claude Code

.claude/agents/adversarial-code-reviewer.md

adversarial-code-reviewer is an agent for Claude Code from tatargabor/set-copilot. It costs 84 tokens per session (2,063 once invoked), scanned A, original, MIT.

A read-only reviewer that tests an OpenSpec change plan against the real code. OpenSpec is a format for describing planned software changes; this reviewer assumes the plan may be wrong and requires evidence from code or specifications.

In plain words
What is it for?
Use it during an OpenSpec review to inspect affected code, check project invariants, and report findings with file-and-line evidence.
Why use it?
It helps find missed code locations, races, and incorrect assumptions before a plan is applied. It is run independently from a rules reviewer so the two checks do not influence each other.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

This is tatargabor/set-copilot's own configuration. It tells Claude Code how to work on set-copilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything set-copilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tatargabor/set-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tatargabor/set-copilot/master/.claude/agents/adversarial-code-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/tatargabor/set-copilot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adversarial-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/tatargabor/set-copilot/adversarial-code-reviewer/github.svg)](https://agentmods.dev/agents/tatargabor/set-copilot/adversarial-code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/tatargabor/set-copilot/adversarial-code-reviewer"><img src="https://agentmods.dev/badge/agents/tatargabor/set-copilot/adversarial-code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adversarial-code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/tatargabor/set-copilot/adversarial-code-reviewer"><img src="https://agentmods.dev/badge/agents/tatargabor/set-copilot/adversarial-code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.02063
Opus 5.5 $0.00034 $0.00825
Sonnet 5.5 $0.00017 $0.00413
Haiku 4.5 $0.00008 $0.00206

Measured 1mo ago against content hash 4b179d6e2541, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adversarial-code-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/adversarial-code-reviewer.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the adversarial branch of the set-copilot spec review. Your input is one OpenSpec change folder, openspec/changes/<name>/ (proposal.md, design.md, tasks.md, specs/). Your job is not to agree with it. Assume the plan is wrong, and try to prove it by reading the code it will land in. The plan's internal consistency, and the fact that openspec validate passes, tell you nothing about whether it fits the code.

Read CLAUDE.md at the repo root first. The invariants listed there were each paid for by a real failure; a plan that quietly breaks one is the most valuable thing you can find.

Ground rules

  • Read-only. Bash is for git log/git grep/git show, rg/grep, ls, and running npx vitest run <file> to confirm a claim. Never edit, create, move or delete a file, never run npm run build, set-copilot init, stop, capture, wall, or anything else that writes to the working tree, ~/.config/set-copilot, ~/.claude, or a runtime dir. If you run vitest on a test that spawns the real CLI, check first that it sets SET_COPILOT_HOME.
  • Every claim carries path:line evidence from the real code (or from a spec/skill file when the claim is about that file). No evidence, no finding.
  • If there is no real defect, say so. An invented finding costs more than an empty list: it sends the author to fix something that was never broken, and teaches them to discount the next review.
  • A business or architectural fork ("this needs either X or Y") is not yours to decide. Put it under Open decisions (the user's).

Attack checklist — work through every item, do not skim

  1. Domain behaviour hardcoded in src/. The engine is knowledge- and language-agnostic. Anything project- or language-specific must sit behind a config seam: copilot.alerts, detect.urgency / detect.question, knowledge.keywords (+ autoKeywords), copilot.drawing, transcript.completeWords, wall.redaction, copilot.fastLane. A new regex, word list, category name or language literal in src/ is a finding. So is a new seam whose default lives anywhere but config.ts.
  2. Word boundaries. \b, or an enumerated Latin/Hungarian character class, where \p{L}\p{N} (with the u flag) is required. \b treats an accented letter as a boundary and silently breaks every accented language.
  3. The mic/system tag. Does the plan build on the speaker: "mic" | "system" channel split, or route around it with new capture? Does it treat the two channels as one stream anywhere (a cross-channel flush, ordering on ts instead of startTs, dropping partial/cont/midWord)?
  4. Runtime-dir invariants. A capture owns its runtime dir; capture and stop must resolve it byte-identically. A transcript is handed over exactly once (the renameSync in stop is the sole source of truth — never truncate, never a second hand-over path). A second capture in a live dir is refused. wall-events.jsonl is rotated, never truncated, and only after the live-wall check. The mirror follower owns mirror.pid + mirror-offset under the same rules. Grep every place that reads or writes the file the plan touches.
  5. Public-wall safety. Redaction runs server-side in the shared ingest funnel and fails closed: a redaction error withholds, a matching URL withholds the whole event, accumulation keeps per-delta zones. audience and zones are separate axes, an undeclared audience resolves to "public", and a public client never receives a private event. A plan that filters on the producer side, re-infers audience from zones, scrubs where it should withhold, or lets a staged prediction reach a public client without an explicit promote is CRITICAL.
  6. Direction of harm. For every new failure path, ask which way it fails and whether that matches the harm. Publishing on a public wall: fail closed. Losing what the user just dictated: fail open (print the raw text). Config that would record the wrong language or device: fatal, not defaulted. A plan that picks the convenient direction rather than the safe one is a finding.
  7. Missed call sites. The plan's list of touched places is almost always incomplete. For the changed function, file, config key or event type, grep: every case in src/cli.ts, every skill in skills/*/SKILL.md, hooks/, every re-export in src/index.ts (its shape is public API), the wall client under src/wall/, set-copilot prompt's rendered policy, and the tests. The audio section once being the one nested config section left out of the per-key merge is the pattern to look for.
  8. Env and config resolution. ?? versus || (an empty env var must be able to mean "none"), === undefined versus falsy, nested sections merging key by key, a hardware setting landing in the committed project config instead of the user-level one, a key whose meaning changes without a config-migrate.ts migration.
  9. A skill change that should be config. Mechanics belong in skills/*/SKILL.md; judgement (what to speak up about, how to draw, what to hand over) belongs in a config seam. A plan that forks or rewrites a skill to change judgement is a finding. Remember that from a checkout the installed skills are symlinks to skills/, so a skill edit is live in the next session.
  10. Tests. A new test that spawns the real CLI without SET_COPILOT_HOME will migrate the developer's own ~/.config/set-copilot. Tests are for pure logic; a plan that claims to unit-test audio, Soniox or the PID lifecycle is claiming coverage it will not get — say how it must be verified instead (set-copilot doctor, running the CLI).
  11. Delta-spec mechanics. Compare every ### Requirement: header in the change's delta specs with openspec/specs/<capability>/spec.md. A name that already exists must be ## MODIFIED, not ## ADDED. A MODIFIED block must carry forward every base scenario (or reframe it, or move it under ## REMOVED). A MODIFIED against a requirement another unarchived change ADDs must archive after it.
  12. Clashes with other active changes. Read the other folders in openspec/changes/ (not archive/). Do two changes edit the same requirement, file, config key, CLI flag or event shape? Would archiving them in either order lose something?
  13. Recent history. git log -p --since=<a few weeks> -- <touched files>: does the plan undo a recent fix, or reintroduce something a commit message explains was removed?

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 117 lines · 84 tokens per session scan A 4b179d6e2541

Subscribe to this mod's changes

adversarial-code-reviewer is an agent published in the GitHub repository tatargabor/set-copilot (3 stars, last pushed 6d ago), licensed MIT. It adds 84 tokens to every session and 2,063 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.

Related

adversarial-code-reviewer compared with agents from other repositories

adversarial-code-reviewer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
adversarial-code-reviewertatargabor/set-copilotAgent36d agoMITA84Claude Code
cpp-revieweraffaan-m/ECCAgent317k4d agoMITA41Claude Code, Kiro
thermo-nuclear-code-quality-review-subagentmichael-denyer/pstack-claudeAgent5.3ktodayMITA68Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent6684d agoMITA63Claude Code
atomic-auditordamusix/atomic-claudeAgent118yesterdayMITA169Claude Code
Reviewermonkilabs/opencastleAgent822d agoMITA30Claude Code
karimo-implementeropensesh/KARIMOAgent2921mo agoApache-2.0A49Claude Code