agent-2-agent CLAUDE.md

agent-2-agent CLAUDE.md is an instructions file for coding agents from CtriXin/agent-2-agent. It costs 659 tokens per session, scanned A, original, MIT.

Project instructions that give AI coding agents a quick overview of a2a, a Claude Code skill for cross-model adversarial code review. They describe the files, review roles, token handling, and development workflow.

In plain words
What is it for?
Use them when modifying a2a's review prompts, scripts, review perspectives, synchronization process, or support for Claude and Codex.
Why use it?
They help an agent understand the project before changing it, including which file controls the review process and how the different reviewers are kept independent.

Instructions file

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.

agentmods
npx agentmods add instructions/ctrixin/agent-2-agent/claude-md
Clone the repo
git clone --depth 1 https://github.com/CtriXin/agent-2-agent

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 agent-2-agent CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ctrixin/agent-2-agent/claude-md.svg)](https://agentmods.dev/instructions/ctrixin/agent-2-agent/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ctrixin/agent-2-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/ctrixin/agent-2-agent/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 659 This file is loaded in full into every session.
When invoked 659 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00659 $0.00659
Opus 5 $0.00329 $0.00329
Sonnet 5 $0.00132 $0.00132
Haiku 4.5 $0.00066 $0.00066

Measured 4d ago against content hash 9373735cb493, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-2-agent CLAUDE.md 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 4d 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.md · 34 lines

What it actually says

a2a — AI Agent 快速上下文

本文件供 AI agent 首次进入项目时快速理解全局,人类开发者请看 README.md。

这是什么

a2a 是一个 Claude Code skill(不是独立应用),实现跨模型对抗式 code review。核心逻辑全在 SKILL.md,脚本只做辅助。

文件职责

文件 作用 什么时候改
SKILL.md skill 定义 + 完整执行流程,Claude Code 加载的入口 改流程、改 prompt、改 review 逻辑
scripts/preflight.sh 环境预检 + token bridge 缓存,结果缓存 15min 改检测逻辑、加新 CLI 支持
scripts/a2a-health.sh 一键自检 + 自动修复 token bridge,人工排查用 改检测项、改修复逻辑
scripts/spinner.sh 终端动画,纯 UI 基本不用动
references/review-lenses.md 三大审查视角定义(Challenger/Architect/Subtractor) 调整审查标准
DEV.md 开发同步流程 + 版本号规则 流程变了才改

关键设计决策

  1. 双向跨模型 dispatch:Claude→Codex 走 codex exec;Codex→Claude 走 claude -p + token bridge(或从 Claude Code 内走 Agent tool sub-agent)。
  2. Token Bridge:OAuth token 存在 macOS Keychain,Codex sandbox 无法直接访问。preflight 自动提取 token 缓存到 ~/.cache/a2a/.claude-token(权限 600),Codex 通过 ANTHROPIC_API_KEY 环境变量传递。Step 1 每次自动检查补全,用户零操作。
  3. 从 Claude Code 内不直接调 claude -pCLAUDECODE=1 环境变量触发 nested session 保护。Claude 侧 review 走 Agent tool。
  4. Reviewer 互不可见:每个 reviewer 独立执行,看不到其他 reviewer 的输出,防止从众效应。
  5. Lean packet:reviewer 只收到自己视角需要的 diff 切片 + 精简 intent,不传完整 plan 或项目规范。
  6. Red-line 统一扫描:项目约束不传给 reviewer,由 Claude 在 Step 5 汇总时统一扫描一次。

修改注意事项

  • 改完必须同步更新 CHANGELOG.md + SKILL.md 里的 version
  • 同步到开源 repo 流程见 DEV.md
  • Cache 路径:~/.cache/a2a/(preflight.json + .claude-token),调试时用 preflight.sh --refresh 或直接跑 a2a-health.sh
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. 4d ago First seen · 34 lines · 659 tokens per session scan A 9373735cb493

Subscribe to this mod's changes

agent-2-agent CLAUDE.md is an instructions file published in the GitHub repository CtriXin/agent-2-agent (9 stars, last pushed 5mo ago), licensed MIT. It adds 659 tokens to every session, about $0.0033 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-31.