Build Your Own Agent Skills: Model-Debate, Content-Matter-Expert and a Peer-Review Panel
Five small skills that get you a real second opinion before a decision ships: a different model family that argues back, a source-backed expert that checks whether your claims hold, and a panel of referees that finds what a reviewer would find before a reviewer does. Full code for the four that need code -- no framework, no service to stand up.
Four small skills you can drop into your own coding-agent setup to get a genuine second opinion on a decision -- before it ships, while you're still cheap to change. They're small: a Markdown instruction file the agent reads, plus (for three of them) a ~150-line Python bridge to a second model. No framework, no service to stand up, no new vendor. This piece explains what each one does, gives the full code, and shows how to adapt it for your own name, models, and credentials.
The four skills:
- model-debate (to another model inside Cursor) -- your agent and a different model family, opened as a fresh Cursor session with
cursor-agent --modeland run read-only, argue a decision as peers or as opponents, then your agent writes up where they landed. Everything stays on your team's Cursor account: no personal key, no AWS credentials. For most teams this is the default and the one you'll run most often, since the second model lives on the same account you already use -- the other two backends are there for when you specifically want an OpenAI or Bedrock model in the ring. - model-debate (to an OpenAI model) -- the same loop, but the opponent is an OpenAI model reached with a personal API key.
- model-debate (to an AWS Bedrock model) -- the same loop again, with the opposing model on Bedrock (Nova, gpt-oss, Llama, Claude), so the critique comes from a different model family and nothing bills to a personal key.
- content-matter-expert (CME) -- your agent becomes a source-backed expert on a topic using parallel research plus a mandatory adversarial verify step, then judges whether your claims, methods, and framing would survive an expert reader.
The debate skills give you a cross-model second opinion (a different vendor's model attacks your reasoning). CME gives you a cross-domain second opinion (a rigorous, source-checked expert read). They compose: debate the shape of a decision, then CME the substance behind it.
Why a second model at all
The value is independence. When you ask the same model that helped you build something to also judge it, it tends to agree with itself. Routing the critique through a different model family removes that thumb from the scale. In practice this catches: design calls that look clean and break quietly later, claims that sound authoritative but are unsupported, and blind spots both you and your primary model share. You still make the decision -- the skill moves the argument earlier and gives you a critic that does not share your priors.
How an agent skill works (30-second primer)
A skill is a folder with a SKILL.md file. The file has YAML frontmatter and a Markdown body:
---
name: my-skill
description: >
One or two sentences telling the agent WHEN to use this skill --
the trigger phrases and situations. This is what the agent matches on.
version: "1.0.0"
---
# my-skill
The body is the procedure the agent follows when the skill fires:
numbered steps, commands to run, output format, common mistakes.
The agent reads the description to decide when to invoke the skill, then follows the body as a runbook. Anything the body tells it to run (a shell command, a script) is just a normal tool call. That is the whole mechanism -- a skill is a well-written procedure plus any helper scripts it calls.
Install location depends on your agent CLI:
- Claude Code:
~/.claude/skills/<skill-name>/ - Cursor / other agent CLIs: use that tool's skills directory; the
SKILL.md+ script pattern is the same.
Put the folder there, restart the agent session, and the skill is available.
Skills 1–3: model-debate
All three debate skills share one design: your agent writes its own turns directly in the conversation, and a tiny Python "bridge" script calls the other model for the opposing turns. The bridge is deliberately dumb -- it takes a request (subcommand arguments for the Cursor bridge, a JSON payload on stdin for the OpenAI and Bedrock ones) and prints the reply text. Everything smart lives in the SKILL.md procedure.
The loop, in brief
- Setup check. Run the bridge's
modelsubcommand once to confirm which opposing model is in play and that credentials resolve. - Pull in the material. Read the actual thing being debated (a plan, a draft, code) before arguing about it.
- Pick a mode. Peer critique, adversarial pro/con, "only attack my work," a third red-team skeptic, two cross-examiners, or rigorous-scientist (citations required). Ask every time -- do not default.
- Run rounds, capped at 5. Each round: your agent writes a critical turn, then calls the bridge for the opposing turn, passing the whole running transcript so the other model has full context. Show each turn labeled as it happens.
- Stop at convergence. When two consecutive rounds surface no new substantive point, stop and say so.
- Synthesize. Points of agreement, unresolved disagreements with the strongest case for each, and a concrete recommendation. Take a position.
- Save the transcript to a dated Markdown file.
The key discipline: your agent must never write the opposing model's turn itself. That defeats the independence the whole skill exists for. Route opposing turns through the bridge.
Skill 1: model-debate inside Cursor (cursor_debate.py)
This is the default and the one most teams will run most often: it needs no personal key and no cloud credentials, because the opposing model is just a second model on the Cursor account your team already has. The bridge wraps the cursor-agent CLI: it opens a fresh chat, pins it to a model you choose with --model, and drives it turn by turn in read-only ask mode. That last part matters -- the opponent argues, it never edits your files or runs commands.
Its interface differs slightly from the two HTTP bridges below (Skills 2 and 3). Instead of a JSON-on-stdin contract, it exposes three subcommands: models lists what the account can run so you can pick the opponent, start opens a fresh throwaway debate chat and prints its id, and ask <chat-id> <model> sends one turn (message on stdin) and prints the reply. Resume the same chat id on the same model every turn and the opposing thread keeps its full context. The one rule that carries over unchanged: pick a model from a different family than your driving agent, or the debate is a model grading its own kind.
#!/usr/bin/env python3
# Last updated: 2026-07-17
#
# cursor_debate.py -- bridge to a SECOND Cursor model for the model-debate
# skill. Opens a fresh cursor-agent chat pinned to a chosen model (a different
# family from the driving agent) and drives it turn by turn, read-only, so the
# opposing critique comes from a genuinely different model inside the same
# Cursor stack -- no personal API key, no cloud creds, all on the team account.
#
# Subcommands:
# models Passthrough `cursor-agent --list-models` so the caller
# can show the menu and pick the opposing model.
# start Create a fresh empty chat; print JSON {"chat_id": ...}.
# Use one chat per debate; resume the same id every turn.
# ask <chat-id> [model]
# Read the message on stdin, send it to <chat-id> on the
# chosen model in READ-ONLY ask mode, print the reply text.
# Model resolves from the arg, else $CURSOR_DEBATE_MODEL,
# else DEFAULT_MODEL.
#
# The opposing session runs with --mode ask (read-only Q&A): it argues, it does
# not edit files or run commands -- a debate opponent critiques, it does not act.
import json
import os
import subprocess
import sys
# A capable non-house-model default, so cross-family independence holds when the
# driving agent is (say) Claude. Run `models` and pick explicitly per debate;
# this is only the fallback. Override with $CURSOR_DEBATE_MODEL.
DEFAULT_MODEL = "gpt-5.2"
# Where the read-only opposing session is rooted. Any workspace works; it only
# needs one to satisfy --trust. Defaults to the current directory.
WORKSPACE = os.environ.get("CURSOR_DEBATE_WORKSPACE", "").strip() or os.getcwd()
TIMEOUT = 600 # read-only turns are quick, but big transcripts can run a while
def _run(cmd, **kw):
try:
return subprocess.run(cmd, capture_output=True, text=True,
timeout=TIMEOUT, **kw)
except FileNotFoundError:
sys.exit("cursor-agent not found on PATH.")
except subprocess.TimeoutExpired:
sys.exit(f"cursor-agent did not answer within {TIMEOUT}s.")
def models():
r = _run(["cursor-agent", "--list-models"])
if r.returncode != 0:
sys.exit(f"cursor-agent --list-models exited {r.returncode}:\n"
f"{r.stderr.strip() or r.stdout.strip()}")
sys.stdout.write(r.stdout)
def start():
r = _run(["cursor-agent", "create-chat"], cwd=WORKSPACE)
if r.returncode != 0:
sys.exit(f"cursor-agent create-chat exited {r.returncode}:\n"
f"{r.stderr.strip() or r.stdout.strip()}")
chat_id = r.stdout.strip().splitlines()[-1].strip() if r.stdout.strip() else ""
if not chat_id:
sys.exit("create-chat returned no chat id:\n" + r.stdout)
print(json.dumps({"chat_id": chat_id, "workspace": WORKSPACE}))
def _resolve_model(arg):
return (arg or "").strip() or os.environ.get(
"CURSOR_DEBATE_MODEL", "").strip() or DEFAULT_MODEL
def ask(chat_id, model_arg):
message = sys.stdin.read().strip()
if not message:
sys.exit("No message on stdin.")
model = _resolve_model(model_arg)
cmd = [
"cursor-agent", "--resume", chat_id, "-p",
"--output-format", "json", "--model", model,
"--mode", "ask", "--trust", message,
]
r = _run(cmd, cwd=WORKSPACE)
if r.returncode != 0:
sys.exit(f"cursor-agent exited {r.returncode} (model {model}):\n"
f"{r.stderr.strip() or r.stdout.strip()}")
try:
out = json.loads(r.stdout.strip().splitlines()[-1])
except (ValueError, IndexError):
sys.exit("Unparseable cursor-agent output:\n" + r.stdout[:2000])
if out.get("is_error"):
sys.exit("cursor-agent reported an error:\n" + json.dumps(out)[:2000])
text = out.get("result")
if not text:
sys.exit("No result field in cursor-agent output:\n"
+ json.dumps(out)[:2000])
print(text)
def main():
args = sys.argv[1:]
cmd = args[0] if args else ""
if cmd == "models":
models()
elif cmd == "start":
start()
elif cmd == "ask" and len(args) >= 2:
ask(args[1], args[2] if len(args) > 2 else "")
else:
sys.exit("Usage: cursor_debate.py models | start | "
"ask <chat-id> [model] < message.txt")
if __name__ == "__main__":
main()
Setup: nothing beyond a working cursor-agent CLI signed into the account. Confirm with python3 cursor_debate.py models to see the menu, then python3 cursor_debate.py start to open a debate chat. The read-only ask mode is what keeps the opponent from touching the workspace, so leave it in place.
The request contract (identical for the OpenAI and Bedrock bridges)
The OpenAI and Bedrock scripts read the same JSON on stdin, so their SKILL.md request-building code is identical and only the backend differs. (The Cursor bridge in Skill 1 above is the exception -- it wraps a CLI rather than an HTTP API, so it takes subcommands with the message on stdin.)
{
"system": "You are a sharp, candid critic debating another agent. <MODE INSTRUCTIONS>. Be concrete and cite specifics. Concede points that are genuinely right; press hard on what is weak. Do not be sycophantic.",
"messages": [
{"role": "user", "content": "<material + task framing + your latest turn and the prior transcript>"}
]
}
The opposing model's own past turns are assistant; everything else (the material, the framing, your turns) is user. Call it like this:
python3 <path-to-bridge>.py ask < request.json
Skill 2: model-debate to OpenAI (gpt_brad.py)
Reads the key from $OPENAI_API_KEY, falling back to an on-disk secrets file so it works even in a shell that did not inherit the env var. Auto-picks the newest flagship gpt-* model unless you pin one with $GPT_BRAD_MODEL. No third-party packages -- standard library only.
#!/usr/bin/env python3
# gpt_brad.py -- minimal bridge to the OpenAI Responses API (/v1/responses).
# Reads the key from $OPENAI_API_KEY. No third-party packages required.
#
# Subcommands:
# model Print the model id that will be used (override or auto-detected).
# ask Read a JSON request on stdin, print the assistant's reply text.
# stdin JSON: {"system": "...", "messages": [{"role","content"}, ...],
# "model": "optional-override"}
#
# Model selection order:
# 1. $GPT_BRAD_MODEL if set
# 2. newest flagship gpt-* returned by the /models endpoint
# 3. FALLBACK_MODEL below
import json
import os
import re
import sys
import urllib.error
import urllib.request
API_BASE = "https://api.openai.com/v1"
FALLBACK_MODEL = "gpt-5"
TIMEOUT = 180
SECRETS = os.path.expanduser("~/.config/secrets/api-keys.env")
# Substrings that mark a model we never want to pick automatically.
_EXCLUDE = (
"audio", "realtime", "search", "image", "tts", "transcribe",
"moderation", "embedding", "instruct", "vision-preview", "codex",
)
def _key():
k = os.environ.get("OPENAI_API_KEY", "").strip()
if k:
return k
# Fall back to the on-disk secrets file, so the bridge works even in a
# shell where the env var wasn't inherited.
try:
with open(SECRETS) as f:
for line in f:
m = re.search(r'OPENAI_API_KEY\s*=\s*["\']?([^"\'\n]+)', line)
if m:
return m.group(1).strip()
except OSError:
pass
sys.exit(f"OPENAI_API_KEY not in env and not found in {SECRETS}.")
def _request(method, path, payload=None):
url = API_BASE + path
data = json.dumps(payload).encode() if payload is not None else None
req = urllib.request.Request(url, data=data, method=method)
req.add_header("Authorization", "Bearer " + _key())
req.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(req, timeout=TIMEOUT) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
body = e.read().decode(errors="replace")
sys.exit(f"OpenAI API error {e.code}: {body}")
except urllib.error.URLError as e:
sys.exit(f"Could not reach OpenAI: {e.reason}")
def _rank(model_id):
"""Higher is better. Newest flagship gpt-* wins; mini/nano demoted."""
nums = re.findall(r"\d+(?:\.\d+)?", model_id)
version = max((float(n) for n in nums), default=0.0)
size = 0
if "nano" in model_id:
size = -2
elif "mini" in model_id:
size = -1
# A bare "-latest" alias is desirable when present.
alias = 0.5 if model_id.endswith("latest") else 0.0
return (version, size, alias)
def detect_model():
override = os.environ.get("GPT_BRAD_MODEL", "").strip()
if override:
return override
data = _request("GET", "/models").get("data", [])
candidates = [
m["id"] for m in data
if m.get("id", "").startswith("gpt-")
and not any(x in m["id"] for x in _EXCLUDE)
]
if not candidates:
return FALLBACK_MODEL
return max(candidates, key=_rank)
def _extract_text(out):
"""Pull the assistant text out of a /v1/responses payload."""
chunks = []
for item in out.get("output", []):
if item.get("type") == "message":
for c in item.get("content", []):
if c.get("type") == "output_text":
chunks.append(c.get("text", ""))
return "".join(chunks).strip()
def ask():
try:
req = json.load(sys.stdin)
except json.JSONDecodeError as e:
sys.exit(f"Bad JSON on stdin: {e}")
model = (req.get("model") or "").strip() or detect_model()
messages = list(req.get("messages") or [])
if not messages:
sys.exit("No messages provided.")
# Responses API: system prompt goes in `instructions`, the turns in `input`.
payload = {"model": model, "input": messages}
system = req.get("system")
if system:
payload["instructions"] = system
out = _request("POST", "/responses", payload)
text = _extract_text(out)
if not text:
sys.exit("No text in response:\n" + json.dumps(out, indent=2))
print(text)
def main():
cmd = sys.argv[1] if len(sys.argv) > 1 else ""
if cmd == "model":
print(detect_model())
elif cmd == "ask":
ask()
else:
sys.exit("Usage: gpt_brad.py {model|ask}")
if __name__ == "__main__":
main()
Setup: put your key in $OPENAI_API_KEY or in ~/.config/secrets/api-keys.env as OPENAI_API_KEY=sk-.... Confirm with python3 gpt_brad.py model.
Skill 3: model-debate to AWS Bedrock (bedrock_brad.py)
Mirrors the OpenAI bridge's CLI exactly -- same model and ask subcommands, same stdin contract -- so the skill's request-building code does not change; only the backend does. The opposing model runs on Bedrock via the Converse API, reached through the default AWS credential chain (env vars or SSO on a sandbox AWS account), so nothing bills to a personal key -- the usage lands on the AWS account behind those credentials. Requires boto3.
I wrote up the Bedrock-specific gotchas -- cross-region inference profiles, expiring SSO sessions, reasoning models eating the token budget, and the IAM-and-model-access checks -- separately in Put Your AI's Sparring Partner on Bedrock; this section is just the bridge and how it slots into the debate loop. (That deep-dive ships an earlier, simpler version of this bridge; the one below adds the short-key model map and the reasoning-token headroom.) Note the two things to point at your own environment: the BEDROCK_IDS map (short keys to Bedrock model ids) and the region in the header comment. Adjust both for your team's Bedrock access.
#!/usr/bin/env python3
# bedrock_brad.py -- minimal bridge to AWS Bedrock via the Converse API.
# Mirrors gpt_brad.py's CLI so the debate skill's request-building code is
# unchanged: only the backend differs. The adversary model runs on Bedrock,
# reached through the default AWS credential chain (env vars / SSO on the
# sandbox account), so it costs nothing on a personal key.
#
# Subcommands:
# model Print the Bedrock model id that will be invoked (override or default).
# ask Read a JSON request on stdin, print the assistant's reply text.
# stdin JSON: {"system": "...", "messages": [{"role","content"}, ...],
# "model": "optional-override"}
#
# Model selection order (mirrors gpt_brad.py's override-first pattern):
# 1. the "model" field on the stdin request if present
# 2. else $BEDROCK_BRAD_MODEL if set
# 3. else the default: gpt-oss-120b -> openai.gpt-oss-120b-1:0
#
# Region: $BEDROCK_BRAD_REGION if set, else us-east-1 (adjust to your account).
# This bridge is text-only.
import json
import os
import sys
try:
import boto3
from botocore.exceptions import (
BotoCoreError,
ClientError,
NoCredentialsError,
)
except ImportError:
sys.exit(
"boto3 is not importable. Install it with: pip install --user boto3"
)
DEFAULT_MODEL_KEY = "gpt-oss-120b"
DEFAULT_REGION = "us-east-1"
# Short key -> the id to actually send to Converse. Models with no in-region
# on-demand endpoint carry their "us." cross-region inference profile.
# Replace these with the model ids your account can invoke.
BEDROCK_IDS = {
"gpt-oss-120b": "openai.gpt-oss-120b-1:0",
"gpt-oss-20b": "openai.gpt-oss-20b-1:0",
"nova-lite": "amazon.nova-lite-v1:0",
"nova-micro": "amazon.nova-micro-v1:0",
"nova-2-lite": "us.amazon.nova-2-lite-v1:0",
"llama3-3-70b": "us.meta.llama3-3-70b-instruct-v1:0",
"claude-haiku-4-5": "us.anthropic.claude-haiku-4-5-20251001-v1:0",
}
# Auth/credential failure signatures that mean "re-auth the sandbox SSO session."
_AUTH_CODES = {
"ExpiredTokenException",
"ExpiredToken",
"UnrecognizedClientException",
"InvalidSignatureException",
"AccessDeniedException",
"UnauthorizedException",
}
_AUTH_HINTS = ("token", "credential", "sso", "expired", "security token")
_REAUTH_MSG = (
"Bedrock call failed -- sandbox SSO creds look expired or unset; "
"re-auth and retry."
)
def resolve_model(requested):
"""Resolve a requested model (short key, raw id, or blank) to a Bedrock id."""
name = (requested or "").strip()
if not name:
name = os.environ.get("BEDROCK_BRAD_MODEL", "").strip()
if not name:
name = DEFAULT_MODEL_KEY
if name in BEDROCK_IDS:
return BEDROCK_IDS[name]
# A raw Bedrock id (contains a "." provider prefix or a ":" version suffix)
# passes through untouched. Anything else is an unknown short key -- fail
# loudly rather than silently routing to the wrong model.
if "." in name or ":" in name:
return name
sys.exit(
f'bedrock_brad: unknown model "{name}". '
f"Known keys: {', '.join(BEDROCK_IDS)} (or pass a raw Bedrock id)."
)
def _max_tokens(model_id):
# gpt-oss reasoning bills against output tokens, so give it headroom to
# avoid truncating the answer behind chain-of-thought.
override = os.environ.get("BEDROCK_BRAD_MAX_TOKENS", "").strip()
if override.isdigit():
return int(override)
return 8000 if "gpt-oss" in model_id else 4000
def _region():
return os.environ.get("BEDROCK_BRAD_REGION", "").strip() or DEFAULT_REGION
def _extract_text(response):
"""Concatenate the {"text": ...} blocks from a Converse response, dropping
any reasoningContent blocks so the caller never sees chain-of-thought."""
try:
blocks = response["output"]["message"]["content"]
except (KeyError, TypeError):
return ""
chunks = [b["text"] for b in blocks if isinstance(b, dict) and "text" in b]
return "".join(chunks).strip()
def _fail_auth_or_raise(err):
"""Print the re-auth message for credential failures; re-raise otherwise."""
if isinstance(err, NoCredentialsError):
sys.exit(_REAUTH_MSG)
if isinstance(err, ClientError):
code = err.response.get("Error", {}).get("Code", "")
if code in _AUTH_CODES:
sys.exit(_REAUTH_MSG)
msg = str(err).lower()
if any(h in msg for h in _AUTH_HINTS):
sys.exit(_REAUTH_MSG)
sys.exit(f"Bedrock call failed: {err}")
def ask():
try:
req = json.load(sys.stdin)
except json.JSONDecodeError as e:
sys.exit(f"Bad JSON on stdin: {e}")
model_id = resolve_model(req.get("model"))
messages = list(req.get("messages") or [])
if not messages:
sys.exit("No messages provided.")
conv_messages = [
{"role": m["role"], "content": [{"text": m["content"]}]}
for m in messages
]
kwargs = {
"modelId": model_id,
"messages": conv_messages,
"inferenceConfig": {"maxTokens": _max_tokens(model_id)},
}
system = req.get("system")
if system:
kwargs["system"] = [{"text": system}]
try:
client = boto3.client("bedrock-runtime", region_name=_region())
response = client.converse(**kwargs)
except (ClientError, NoCredentialsError, BotoCoreError) as e:
_fail_auth_or_raise(e)
text = _extract_text(response)
if not text:
sys.exit("No text in response:\n" + json.dumps(response, indent=2, default=str))
print(text)
def main():
cmd = sys.argv[1] if len(sys.argv) > 1 else ""
if cmd == "model":
print(resolve_model(None))
elif cmd == "ask":
ask()
else:
sys.exit("Usage: bedrock_brad.py {model|ask}")
if __name__ == "__main__":
main()
Setup: pip install --user boto3, load your Bedrock credentials (env vars or SSO), then python3 bedrock_brad.py model. Because the model subcommand needs no credentials, a clean print does not prove creds are live -- the first ask is where they are exercised. If an ask fails on credentials, re-authenticate; never fake an opposing turn.
The six debate modes
Ask which one every time -- they serve different needs:
- Both critique, agent synthesizes -- peers, no fixed sides. Best for "make this better."
- Adversarial pro/con -- one argues for, one against. Best for a yes/no decision.
- Opposing model attacks my work only -- you defend, it only attacks. Best for "tear apart my plan."
- Red-team on consensus -- a third independent skeptic attacks hardest at the points the two debaters agree on, treating agreement as a shared blind spot until proven otherwise.
- Two cross-examiners -- one dismantles each side's position. Four voices, roughly 2x cost, for high-stakes work.
- Rigorous scientists -- both sides argue as PhD-level experts who cite real sources and calibrate every claim. Lives or dies on citation honesty: no fabricated sources, mark each claim as established / contested / inference / speculative, verify load-bearing citations with web search rather than memory.
For modes 4 and 5, the extra voices are independent calls through the bridge with a clean skeptic persona -- no memory of the debate, no loyalty to either side. Add a "surviving objections" section to the synthesis for any adversary hit that was never answered.
Skill 4: content-matter-expert (CME)
CME is different in kind. There is no external bridge -- it runs entirely on your own agent's model plus its research subagents and web tools. Its job is to make the agent a source-backed expert on a topic fast enough to be useful and rigorous enough to survive an expert reader, then judge whether your content is true, current, and defensible. Where a style pass fixes how writing sounds, CME fixes whether the substance holds.
The pipeline
- Frame. Identify what is being judged (draft, code, plan, paper), the subfield(s), the stakes, and the risk level. Build a 3–6 part field map -- one sub-angle per distinct body of literature the work touches. One research agent per real literature; merge angles that would cite the same sources, split any angle spanning unrelated ones.
- Source strategy. Before dispatching, define the source ladder for this topic so agents do not cite junk as consensus: best sources for the field, acceptable support, weak sources, and "treat as claim, not evidence." State the recency rule and known pitfalls.
- Deep dive -- parallel research agents. Dispatch one subagent per sub-angle in a single message so they run concurrently. Each returns a structured mini-brief: claims with sources and confidence, live debates, methods and metrics, landmines outsiders miss, recency watch, and what it could not reach. Crucially, researchers do NOT see your draft -- that keeps the expertise independent of what the draft happens to claim.
- Synthesize. Merge the mini-briefs into one knowledge base: what the field holds and with what confidence, where it disagrees, the strongest counter-positions, the validity standards, and the landmines. Reconcile conflicts explicitly rather than averaging them.
- Verify -- adversarial, mandatory, before any critique. Dispatch a fresh skeptic subagent to attack the synthesized brief: spot-check load-bearing claims against their sources, flag anything unsupported, overstated, misattributed, or stale, and mark each claim KEEP / WEAKEN / CUT. Apply verdicts mechanically -- CUT claims are deleted, WEAKEN claims stay with confidence downgraded and the caveat attached, KEEP claims pass. Downstream output may cite only KEEP or WEAKEN claims. Skipping this step is how you get confident, wrong critiques.
- Produce the output. Pick the shape from the mode -- a fast compressed read, a topic-only expert brief, a ranked draft critique, or an implementation-advice plan. Every finding carries its verifier confidence.
The disciplines that make it work
- Source-backed or explicitly uncertain. Never invent a source, statistic, mechanism, or consensus. Unsupported claims are marked as gaps, not smoothed over.
- Expertise means knowing the fights. A real expert read names the live debates, standard objections, failure modes, and what specialists think outsiders get wrong -- not "engage the literature more," but the specific work, result, or debate, with the source.
- The verify step is not optional. One hallucinated "field consensus" poisons every finding built on it.
- Stay on substance. Voice and phrasing are a different job; CME judges whether the content is true and defensible.
verdict applied to the claim cited downstream?
KEEP passes as written yes
WEAKEN confidence downgraded, caveat attached yes
CUT deleted from the brief no
Domain presets (optional accelerator)
If your team works recurring subject areas, a domain-presets.md beside the SKILL.md can pre-load the source standards, required checks, and default stance for each field, so the agent frames the research correctly on the first pass. A preset sharpens step 2 and the field map -- it never replaces the mandatory verify step. Example shape for one field:
## AI, LLMs, frontier models, agents
Risk: rapidly changing / technical / benchmark-sensitive.
Source standards: official docs, model/system cards, eval papers, benchmark
repos, arXiv preprints with caution, API changelogs, safety papers.
Required checks: benchmark contamination, eval design, latency/cost, tool-use
reliability, prompt sensitivity, hallucination rate, licensing, human-in-loop.
Default stance: skeptical engineer, not hype columnist.
Skill 5: peer-review-panel
The debate skills test a decision. CME tests whether the substance holds. The panel tests a document the way a venue will: an abstract, a manuscript, a preregistration, a grant. It seats several simulated referees, gets independent structured reports, lets them argue once, and synthesizes. It is internal red-team material. Its only job is to find what a real reviewer would find, before the real reviewer does.
What an unscaffolded panel does
Before writing it I measured what an unscaffolded agent does when you ask it to "run a panel." It writes all the reviewer voices itself, in one pass. The output is fluent. It quotes the document accurately. And the baseline returned accept from four of four reviewers, a mean of 6.0 out of 10, and not one statement of what would change any reviewer's mind, on a document with defects I already knew about. Four voices from one model are one opinion typed four ways. (That baseline used a 10-point scale; the rubric has since moved to anchored 1-to-5 scores, which is why the numbers below do not match it.)
The rule that follows: peers are dispatched, never voiced. The agent sends each seat to another model and parses what comes back; it does not draft "what Reviewer 3 would say." A seat that fails is reported as failed rather than filled in, since a report the agent wrote itself would pass off its own opinion as corroboration.
The pipeline
- Intake. Three questions, asked rather than guessed: how many peers (two to six, default four), which field or venue, and what depth (a quick screen, or full referee reports with a rebuttal round). The venue picks a block of criteria and desk-reject triggers from the rubric, and it drives which archetypes get seated.
- Seat the panel. Each seat is an archetype built from a dossier of published reviewing behavior in the field (the statistician who computes power before reading the discussion, the skeptic who asks what is random here and what chance model that induces), and every persona is labeled a simulation in the output. Composition rules are mandatory: no two peers share both model and prompt; at least one peer runs on a different vendor; a panel of four or more seats at least one skeptic and one statistician; and two peers from the same model family are never given the same archetype, because on this machine two GPT-family seats returned near-identical answers to the same prompt.
- Phase 1, independent reports. First extract a numbered claim list from the document. Every objection must name a claim ID; that is what stops reviewers from critiquing the topic instead of the document. Then dispatch all peers in a single message so none can see another's output. Each gets the document, its own archetype checklist, the venue block, the claim list and the report schema, and nothing else: not the peer count, not the other archetypes, not any prior finding. Each report returns major and minor issues, line-anchored objections, an anchored score from 1 to 5 with a confidence, a verdict consistent with that score, and a verdict mover: what would change the reviewer's mind. A validation gate checks every report before it enters the panel; an unanchored objection is dropped, not weighed.
- Phase 2, one moderated rebuttal. Each peer sees only the other peers' major issues, never their full reports, scores or verdicts. Each may sharpen, concede or hold, with a reason. Fresh agents are re-dispatched with their own filed reports rather than messaged, because a follow-up message to a finished seat proved unreliable.
- Phase 3, meta-review. A fresh agent that has seen none of the deliberation writes the synthesis: the consensus verdict and its basis, a ranked must-fix list, the disagreements left standing and why, and a panel-health block that reports convergence, degraded or failed seats, and dropped objections. The governing score is the minimum, not the mean. If every peer accepts, or every score lands within half a point, that is reported as a convergence finding, not as confidence.
Closed citations
An invented reference is a bad objection of a particular kind: it sounds authoritative. So reviewers may name only works that appear in the document under review or in the skill's own reference files. A missing-literature objection may describe the kind of work and the gap it would fill, naming no paper, author or year. A citation outside that set is dropped and the seat is flagged. It is not looked up and not repaired; a repaired citation would be the agent's own opinion with a reviewer's name on it.
What it caught most recently: run against a conference abstract and the finished talk, with the question "does the delivery match the promise," three seats independently found that the fifth outcome the abstract promised, a question about what an AI review process has retracted, was in neither the slides nor the handout. The fix was one box on the take-home card. I had read that abstract a dozen times and had not noticed.
What I have not measured. The baseline is one document. I have not run the panel against documents with planted, labeled defects, so I cannot give a recall figure, a false-positive rate on a sound paper, or an effect size for the archetypes against plain seats. The rebuttal round exists to surface concessions; whether it changes which defects survive is unmeasured. And two peers from different vendors still share training text and preference tuning, so a second vendor lowers correlated error without removing it. Two more limits are built in by choice. The claim list is extracted by the agent, so a claim it misses cannot be objected to, and the line-anchor gate drops critiques that are not line-local, a wrong estimand or a missing comparison among them; I have no counts for either. And the minimum-score rule hands the verdict to the harshest seat on purpose, which is a policy I would defend, not a finding. Those are the experiments I would want before calling this more than a disciplined red-team.
The folder holds the runbook plus six reference files. The rubric is canonical: report schema, the 1-to-5 anchors, per-archetype checklists, per-venue blocks, the validation gate and the synthesis contract. The others are research explaining why: the archetype dossiers, venue norms, bridge mechanics, the anti-patterns behind the gate, and the measured baseline that started it.
Adapting these for your team
- Rename the persona. The "-brad" naming is arbitrary. I call the model I work with "Brad" and talk to him like a person -- it keeps the back-and-forth natural, and giving the opposing voice a name makes the debate read like an actual argument between two colleagues rather than a prompt and a paste. Call yours whatever you like; only the
namein the frontmatter and the folder need to stay consistent. - Point at your own models. Cursor: run
modelsto see the menu and pass the pick as theaskargument, or set$CURSOR_DEBATE_MODEL. OpenAI: pin with$GPT_BRAD_MODELor let it auto-detect. Bedrock: editBEDROCK_IDSand set$BEDROCK_BRAD_REGIONfor your account. - Choose a credentials source. The Cursor bridge rides the CLI's existing sign-in, so there is nothing extra to hold; the OpenAI bridge reads an env var or a secrets file; the Bedrock bridge uses the default AWS credential chain. Never hard-code a key in a script.
- Keep the transcript. All three debate skills save the full exchange plus synthesis to a dated Markdown file, and the panel writes its review next to the document it reviewed, so a decision has a paper trail you can point at later.
Guardrails worth keeping
- Independence is the whole point. Do not let your primary model write the opposing turn or grade its own family. Cross-family (a different vendor) beats same-family.
- No fabricated evidence. In rigorous-scientist debate mode and throughout CME, an invented citation fails the exercise. Verify load-bearing claims against real sources.
- Fail loudly, never fake. If credentials are down, re-authenticate or stop -- an invented opposing turn defeats the reason the skill exists.
- You decide. These skills surface a critique quickly and cheaply at the moment you are designing. They do not replace your judgment; they make sure it is tested before it ships.
Files to copy
Each skill is a folder you drop into your agent's skills directory:
model-debate-cursor/
SKILL.md # the procedure (the loop, the six modes, synthesis)
cursor_debate.py # the Cursor CLI bridge (above)
model-debate-openai/
SKILL.md # same procedure, OpenAI backend
gpt_brad.py # the OpenAI bridge (above)
model-debate-bedrock/
SKILL.md # same procedure, Bedrock backend
bedrock_brad.py # the Bedrock bridge (above)
content-matter-expert/
SKILL.md # the research + verify + critique pipeline
domain-presets.md # optional per-field accelerators
peer-review-panel/
SKILL.md # intake, seating, three phases, synthesis
references/
review-rubric.md # canonical: schema, anchors, checklists, gate
reviewer-archetypes.md # persona voice and characteristic objections
venue-norms.md # venue criteria and desk-reject triggers
panel-mechanics.md # bridge invocations, independence protocol
anti-patterns.md # the tests behind the validation gate
red-baseline-findings.md # what the unscaffolded baseline did
The full SKILL.md runbooks are longer than this piece can carry, but the bridge code and the procedure summaries here are enough to build from. All five folders, as I run them, are downloadable from the skills page.