dual-agent-collaboration

dual-agent-collaboration is a skill for Codex from yunshu0909/yunshu_skillshub. It costs 128 tokens per session (4,050 once invoked), scanned A, original, MIT.

A workflow for having Codex complete coding work while Claude Code independently reviews the request, plan, implementation, and final result. The two models use separate roles, with the reviewer not editing the shared worktree.

In plain words
What is it for?
Use it for complex designs, cross-module changes, migrations, security work, major refactors, or release reviews where a second model should challenge and verify the work.
Why use it?
It reduces the risk of building the wrong thing or accepting faulty code by adding independent checks at important decision points.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Good fit Use it for complex designs, cross-module changes, migrations, security work, major refactors, or release reviews where a second model should challenge and verify the work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yunshu0909/yunshu_skillshub --skill dual-agent-collaboration
Clone the repo
git clone --depth 1 https://github.com/yunshu0909/yunshu_skillshub

Made for: Codex.

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 dual-agent-collaboration

README.md
[![agentmods](https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration/github.svg)](https://agentmods.dev/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration)
Your own site
<a href="https://agentmods.dev/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration"><img src="https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration/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 dual-agent-collaboration

Your own site · 80×15
<a href="https://agentmods.dev/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration"><img src="https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/dual-agent-collaboration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,050 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00128 $0.04050
Opus 5 $0.00064 $0.02025
Sonnet 5 $0.00026 $0.00810
Haiku 4.5 $0.00013 $0.00405

Measured 13d ago against content hash 8f1075668abf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

dual-agent-collaboration 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 13d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/install_skill.py, scripts/invoke_peer.py, scripts/test_install_skill.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

dual-agent-collaboration/SKILL.md · 318 lines

How it starts

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

Codex × Claude 双模型协作

把当前模型设为 primary,把另一个 CLI 模型设为 peer reviewer。Primary 对结果负责;peer 提供独立判断,不共同编辑同一工作树。

核心不变量:

先验证“做的是不是用户真正要的”,再验证“方案和代码是否正确”。两个模型对同一份错误合同达成一致,不算成功。

这里的“协作”默认指:primary 完成研究、实现与自测,peer 读取同一批原始证据做独立挑战和校核,primary 再按 finding 修正。Peer 不在共享工作树直接编码;这正是本 Skill 对既有“Codex 主做、Claude Code 独立校核”流程的通用化。若用户明确要双模型分工编码,必须使用独立 worktree,并把合并审查另列为任务,不能复用默认模式偷偷并行写。

0. 完整性与效率边界

“所有产品都能使用”指 Skill 可跨项目发现和运行,不表示每个琐碎任务都强制双模型。按比例触发:

  • 用户明确要求两个模型协作、交叉校核或“修到 ACK”:完整使用本 Skill。
  • 复杂方案、跨模块开发、迁移、安全、重要重构、发布前验收:主动使用本 Skill。
  • 低风险、边界明确、容易回退的小修:默认由单模型完成;除非用户点名,不为形式感增加四轮模型调用。

一旦触发本 Skill,就完整走 Intent、Plan、Implementation、Final 四个 gate,不以“提速”为由省略。高效率来自:

  • 自动识别 primary 并选择另一 CLI;
  • 统一 handoff、schema 与命令,不让每个项目重新发明提示词;
  • Intent/Plan 尽早阻止做错需求或走错方案;
  • Plan 续接 Intent、修复轮续接 Implementation,只在需要去锚定时冷启动;
  • 结构化 fail-closed,避免对半截输出反复人工判断;
  • 用 state file 自动判断下一 gate,减少人工记 session 和漏审。

默认 max reasoning 是完整协作的质量基线;只有用户明确优先成本/时延时才用环境变量下调,并在最终结果中披露。30 分钟是失败上限,不是预期耗时。

1. 选择角色

当前启动者 Peer 调用参数
Codex Claude Code 最新 Opus --peer claude
Claude Code Codex 当前高质量配置 --peer codex
无法确定 让脚本检测;检测冲突则显式指定 --peer auto

使用本 Skill 的 scripts/invoke_peer.py。脚本使用 argv + stdin 调 CLI,不使用 shell 拼接;peer 运行在只读模式,并设置递归保护。

先做命令构造预检:

python3 <skill-dir>/scripts/invoke_peer.py \
  --peer auto \
  --phase intent \
  --cwd <project-root> \
  --task-id <stable-project-task-id> \
  --add-dir <external-evidence-dir> \
  --prompt-file <handoff.md> \
  --dry-run

若 CLI 不存在、未认证、超时或未返回结构化结论,视为 BLOCKED,禁止假装已经双模型审查。

--dry-run 只证明参数已组装,不能证明 CLI 能启动、权限正确或输出可解析。任何 gate 的完成证据必须来自真实调用。

推荐用 --task-id,由 wrapper 按“项目路径 hash + task id”把 state 放入持久的用户状态目录:macOS 使用 ~/Library/Application Support/CodePal/dual-agent-workflows/,Linux 使用 $XDG_STATE_HOME/codepal/dual-agent-workflows/~/.local/state/...。同一任务所有 gate 复用稳定 task id;不同任务不得复用。这样不污染仓库,也不会因系统清理 /tmp 或重启而丢掉 gate。只有集成方已有自己的状态存储时才显式用 --state-file。State 只存 verdict、session ID 和报告 hash,不存 handoff 正文。

2. 准备完整 handoff

Read the full file on GitHub · 318 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago First seen · 318 lines · 128 tokens per session scan A 8f1075668abf

Subscribe to this mod's changes

dual-agent-collaboration is a skill published in the GitHub repository yunshu0909/yunshu_skillshub (757 stars, last pushed 1mo ago), licensed MIT. It adds 128 tokens to every session and 4,050 once invoked, about $0.0006 per session on Opus 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-08-30.