aarontzeng/dev-lead/opencode-adversarial-review
Claude Code and agent skill by aarontzeng/dev-lead
- community
Checking that the SKILL.md file is still in the repository.
Run an adversarial (red-team) review through the OpenCode CLI's free model pool (muse-spark, Nemotron, stealth models) under a machine-enforced read-only permission config. Use when a HIGH-risk change needs a second cross-family reviewer without spending paid quota, or as the cheap extra pair of eyes beside a primary review.
Install
npx vskill@latest install aarontzeng/dev-lead/opencode-adversarial-reviewSKILL.md
The same SKILL.md was published earlier as aarontzeng/dev-lead/opencode-adversarial-review.
Adversarial review via opencode (free pool)
The value here is an additional model family at zero quota cost: muse-spark (Meta) and Nemotron are neither GPT, Gemini, nor Claude, so this is the cheapest way to satisfy the cross-family rule's second reviewer on HIGH-risk work. The trade-off is best-effort capacity — congestion is normal, so this leg is the additional opinion or the unhurried gate, never the time-critical one.
Before the first run of a session
Read [`references/opencode-runtime.md`](references/opencode-runtime.md) (same directory). It holds the family mechanics — the free-model catalogue and the stealth-model family-unknown caveat, the two silent permission traps (zero-commit project binding, last-match-wins ordering), congestion behavior, and the audit log lines. This file assumes them and covers only the review role.
Choosing the model for this leg — by LENS, not a fixed favourite
The owner ruled this on 2026-09-16 and it now lives in their roster (roster.json, located per `/dev-lead:config`; it was in their CLAUDE.md before the roster existed); what follows is the same rule with the numbers behind it, and this file is where those numbers belong. The division is now explicit in both directions — the roster names which leg, dev-lead holds prices, buckets and calibration rows. (The earlier attempt to write a single model in here as "the default" was mine, on a peer's recommendation, and was retracted in 0.6.8; the rule below is the owner's, not a plugin preference.)
| lens | model | why | |
|---|---|---|---|
| mechanical — consistency, is-it-still-true, convention, falsifiability | opencode-go/muse-spark-1.3-contributor; opencode/muse-spark-1.3-contributor-free only when the go plan is not available | owner, 2026-10-04: on the go plan this model has no rate limit and draws no quota, while the free twin is a rate-limited pool. Measured strong on fact-checking and line accuracy. (Before that statement this file priced the Go twin at ~$0.014 a leg; take the owner's word for your own plan, and measure if yours differs.) | |
| judgement — challenge, design rulings, sequences | opencode-go/glm-5.3 | an independent family, ~$0.20 a leg against the large ($12 / 5 h) bucket. No calibration row yet — treat as unproven until one exists | |
| top-tier judgement only | opencode-go/kimi-k3, opencode-go/qwen3.8-max | 1–2 legs per 5-hour window at most, and the buckets are shared across sessions, so probe immediately before dispatch |
Effort follows the lens, never the model. There is no per-variant price; reasoning tokens bill as output. So xhigh on a cheap model is nearly free and xhigh on a dear one can double the leg.
The terms question, and how it was settled. Both muse-spark-*-contributor variants, free and paid, put the prompt into a training set, and a review leg is handed the frozen tree: source, design documents, sometimes a spec. That is a disclosure decision, not a cost one, so it went to the owner rather than being settled here. Ruled 2026-09-16: accepted for review legs — with the exception carried per change. If a change carries material that must not reach a training set, say so and run the fourth leg on opencode-go/glm-5.3 instead. The judgement stays with whoever knows what is in the diff; the default no longer has to be guessed.
And the owner delegated the judgement itself to this layer (2026-09-16): dev-lead decides what may go to a contributor tier. So it needs criteria that can be CHECKED, not a feeling. Three rules:
1. Decide per REPOSITORY, once, and write it down — not per change. A repo's disclosure class is stable; a change's is not knowable at a glance, and a judgement re-made every round is one that decays exactly like a STOP rule that keeps firing on benign causes. Record the class beside the repo's other dispatch facts. Re-open it only when the repo gains a new kind of content, not when a change looks unusual.
2. The stop classes. A repo is NOT eligible for a contributor tier if its tracked tree carries any of: credential material of any kind; a customer's or third party's confidential material; personal data beyond work identifiers; or specifications for an unannounced product. Everything else — this account's own infrastructure code, its ADRs, its tooling — is eligible.
3. Screen the frozen target before the first dispatch, not from memory. The tree is what the leg receives, so look at it:
Measured on one of the owner's infrastructure repositories 2026-09-16: no credential material; 153 files and 6.7 MB handed to each leg; colleague work addresses and internal project codenames present. That is the residual the owner accepted — named, not assumed absent. Eligible.
The brief is a prompt too. The claims file and lens text are authored by the lead and go to the model with the tree, so they can disclose material the repo does not contain — an audit excerpt with real actor ids, a quoted mail, a customer's words from a ticket. Screen what you WRITE by the same rules; this is the half no check on the repository can see.
When any of this trips, the fourth leg runs on opencode-go/glm-5.3 and the report says why. A leg not run is always available too: three legs and a stated reason beat four legs and a disclosure nobody decided.
Establish an immutable review target
One frozen directory per reviewer, at the exact commit, that nothing else touches — no lead activity inside it. Not "whenever possible": a reviewer reads the WORKING TREE, not your commit. Measured — a round ran mutation testing in the same worktree mid-review and the reviewer opened a CRITICAL on a mutated, non-compiling file it was never meant to see.
Freeze it with the suite's tested helpers instead of hand-rolling the shell; every bug ever found in this step was in a hand-rolled copy. The suite-root resolver and both calls — freeze-target.sh to create it, verify-target.sh before AND after the run — are in dev-lead Phase 2, and the reasoning is in methodology.md §7. Everything below assumes $REVIEW_TARGET_DIR is that frozen directory and $REVIEW_HEAD is the SHA it was frozen at.
The read-only boundary is a config file, not a mode
If the target already has an `opencode.json`, save it first — writing ours over a project's real config and then deleting "ours" at teardown destroys the project's file:
(The frozen worktree above does NOT make this step optional: it is a checkout of the same repo, so a project that tracks its own opencode.json has one there too. The backup is what stops teardown deleting it.)
Then write this as opencode.json in the target (wildcard FIRST — last match wins; see runtime). freeze-target.sh … --opencode-lockdown writes exactly this file, read-only, at freeze time (and refuses a commit that tracks its own opencode.json); declare it to verify-target.sh as below:
external_directory: deny is what keeps a wrong path from ending the leg. Left at its default (ask), a read outside the target is auto-rejected headless and the leg stops with no verdict, however good the review was; with an explicit deny the model gets an error message back and keeps reviewing. A peer session measured it on 4 changes x 5 Google models: 3 of 20 legs died after ~20 s on a mis-typed path (the frozen path with its last components dropped), and the failing case ran 206 s to a verdict once the line was added. opencode debug agent build in the target lists the merged rule last, and opencode re-appends its own tool-output allow after it, so truncated tool output stays readable.
Call this what it is: a machine-enforced guardrail against a fallible delegate, not a security boundary against an adversarial one. File edits denied, shell denied except five git reads (git branch* is deliberately NOT on the list — git branch -d writes refs, and rev-parse --abbrev-ref HEAD answers the read-only question) — stronger than a behavioral plan mode, and stronger than opencode's own plan agent (whose edit-deny a shared config can override and whose bash is unrestricted — measured; see runtime). But command wildcards match command prefixes, not effects: git diff --output=<path> and git log --output=<path> write files while matching the allowed patterns. The threat model here is an honest model taking a lazy shortcut — which the denials catch — and the post-run bracket below is what catches everything else; a hostile-input review needs an OS-level read-only sandbox instead. Verify what actually governs before spending a run: opencode debug agent prints the merged rule array in evaluation order (runtime file). Use the default agent with this config. A denied call comes back to the model as a message, so an over-curious reviewer reports MACHINE-DENIED and keeps reviewing instead of dying.
The emitted leg-cmd.sh command begins with `check-opencode-lockdown.py` on the target and stops the run when opencode.json is not exactly the shape below: only $schema and permission, edit denied, bash and external_directory deny-by-default with at most the five read-only git rules (bash) or literal absolute paths (external_directory), no opencode.jsonc or .opencode in the target, no OPENCODE_CONFIG* / OPENCODE_DISABLE* in the environment, and the target is the root of a git checkout with a commit (otherwise opencode ignores the file). A managed config under /etc/opencode is not read (known limit). Without the file opencode runs as the build agent with edit and bash open (a peer session ran three legs that way before this check existed). leg-cmd.sh --help prints which of --target, --base, --prompt-file and --add-dir each adapter takes.
The config file itself appears as untracked in the target, and this leg cannot move it out — it must sit at the project root to bind. Declare it to the certification instead of excusing it:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/opencode-adversarial-review/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aarontzeng/dev-lead/opencode-adversarial-review)