agent-2-agent: Instructions file for Claude Code

CLAUDE.md

agent-2-agent CLAUDE.md is an instructions file for Claude Code 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions subagents; mentions Claude Code; runs codex exec.

This is CtriXin/agent-2-agent's own configuration. It tells Claude Code how to work on agent-2-agent 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 agent-2-agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CtriXin/agent-2-agent. 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/CtriXin/agent-2-agent/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/CtriXin/agent-2-agent

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ctrixin/agent-2-agent/claude-md/github.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/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 agent-2-agent CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00659 $0.00659
Opus 5.5 $0.00264 $0.00264
Sonnet 5.5 $0.00132 $0.00132
Haiku 4.5 $0.00066 $0.00066

Measured 2mo ago against content hash 9373735cb493, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 -p:CLAUDECODE=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. 2mo 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 7mo ago), licensed MIT. It adds 659 tokens to every session, about $0.0026 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-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens