code-assistant-peers

作者 AnamKwon已验证

MCP server for mandatory peer review between coding assistants like Claude Code, Codex, Gemini, and other CLI agents.

3
Stars
2
Forks
TypeScript
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/AnamKwon/code-assistant-peers

快速入门

使用 code-assistant-peers 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

mcp-code-assistant-peers

Parallel peer review for CLI coding agents — fully live, no API keys required.

AI peer reviewers that never sleep — persistent tmux sessions, parallel reviews, context that sticks

Translations: 한국어 | 日本語 | 中文


What it does

When you edit code with Claude Code, Codex, or Gemini, this MCP gate routes the diff to multiple independent peer reviewers running in background tmux sessions. Each reviewer checks the change from a fresh context, findings are saved to SQLite, and the host assistant reads all results directly — no redundant synthesis pass, no extra token cost.

Your coding session
  │
  ▼
Host edits code  →  must_call_after_code_changes
                          │
              ┌───────────┼───────────┐
              ▼           ▼           ▼
        codex-live   gemini-live  claude-live    ← parallel, tmux
              │           │           │
              └───────────┴───────────┘
                          │
                    All findings delivered
                    directly to host
                          │
                          ▼
              Host reviews findings & improves code

Why live mode?

Live vs Headless

Live (*-live)Headless
BillingSubscription pool ✅API credit pool ❌
AuthOAuth login — no API key neededAPI key required
SessionPersistent tmux session, warmNew process every call
Review historyAccumulates — reviewer learns the repo 📈Wiped on every call
ParallelismAll reviewers run concurrently ✅Each process blocks the next
StartupInstant (session already running)Cold start every time
FallbackAuto-falls back to headless if unavailableN/A

Every reviewer defaults to live mode. You only need to log in once per CLI:

claude     # Claude Code login
codex      # Codex login
gemini     # Gemini CLI login — OAuth, no API key needed

No API keys. No credit pool charges. Reviews run on your subscription.


Review history (key advantage)

Live sessions keep conversation history by default. The reviewer builds up knowledge of your codebase across multiple reviews in the same session:

Review #1 → "This function lacks null checking" (learns the codebase)
Review #2 → "Good fix. The same pattern exists on line 42 too." (accumulated knowledge)
Review #3 → "Consistent with the null-check pattern you've been applying" (contextual)

Each session is scoped per (reviewer, repo) — reviewers for different repos are completely isolated.

To reset history between reviews (old behavior):

CODE_ASSISTANT_PEERS_REVIEWER_CLEAR=always

Quick start

# 1. Install
bun install

# 2. Auto-detect available CLIs and register MCP
bun cli.ts setup claude --peers=auto

# 3. Verify
bun cli.ts doctor

Inside Claude Code or Codex, make any code change — the review gate triggers automatically.


Default configuration

Everything is pre-configured for live mode:

SettingDefaultDescription
PEER_ASSISTANTScodex-live,gemini-live,claude-liveAll three as independent peer reviewers
HistoryKeep (never clear)Reviewers remember previous reviews
Host passesLive sessionSelf-review uses host's live session
CODE_ASSISTANT_PEERS_WORKFLOWreview_onlyPeer reviews and reports findings
CODE_ASSISTANT_PEERS_REVIEW_MODEnormalStandard review mode

Review modes

ModeDescriptionUse when
normalFind bugs, regressions, missing testsDefault
adversarialChallenge assumptions aggressivelySecurity-critical changes
gateBinary ALLOW / BLOCK decisionCI gates, pre-merge checks
collaborativeHost and peer compare perspectivesHigh-stakes architecture
CODE_ASSISTANT_PEERS_REVIEW_MODE=adversarial

Peer workflow modes

WorkflowDescription
review_onlyPeer reviews and reports findings (default)
peer_fixPeer proposes concrete fix patches alongside findings
CODE_ASSISTANT_PEERS_WORKFLOW=peer_fix

Architecture

Review flow

First review in a session
  │
  ▼  Worker creates tmux session → CLI boots (one-time)
  │
  ▼  Review job delivered to session
  │    ├── Reviewer writes .peer-review/<id>-output.md  (primary path)
  │    └── Reviewer also prints to terminal              (fallback)
  │
  ▼  Worker reads result → broker → MCP → host
  │
  ▼  Session stays alive with full history

Next review (same repo)
  │
  ▼  Session already warm — no cold start — instant delivery

Session isolation

Each live session is scoped to (reviewer_kind, repo_path):

peer-reviewer-claude-<repo>-<hash>
peer-reviewer-codex-<repo>-<hash>
peer-reviewer-gemini-<repo>-<hash>

Watch a live session:

tmux ls                                              # list all sessions
tmux attach -t peer-reviewer-gemini-myrepo-abc123   # watch gemini think

No aggregate pass

Peer results go directly to the host — no intermediate synthesis:

Before: peers → aggregate LLM call → host   (extra tokens, extra latency)
Now:    peers → host directly               (zero overhead)

The host reads each reviewer's findings and decides what to fix.


Setup

Auto-setup (recommended)

bun cli.ts setup claude --peers=auto

# With options
bun cli.ts setup claude --peers=auto --workflow=peer_fix --mode=adversarial

Manual peer selection

# All three live reviewers
bun cli.ts setup claude --peers=claude-live,codex-live,gemini-live

# Codex only
bun cli.ts setup claude --peers=codex-live

Environment variables

VariableDefaultDescription
HOST_ASSISTANTclaudeThe coding agent running the MCP server
PEER_ASSISTANTSautoComma-separated list of peer reviewer adapters
CODE_ASSISTANT_PEERS_WORKFLOWreview_onlyreview_only or peer_fix
CODE_ASSISTANT_PEERS_REVIEW_MODEnormalnormal, adversarial, gate, collaborative
CODE_ASSISTANT_PEERS_REVIEWER_CLEAR(keep history)always to reset before each review
CODE_ASSISTANT_PEERS_LIVE_HOST_REVIEWS(live)0 to force headless for host-side passes
CODE_ASSISTANT_PEERS_REVIEW_TIMEOUT_MS600000Per-review timeout (ms)
CODE_ASSISTANT_PEERS_REVIEWER_STARTUP_MS30000Session boot timeout (ms)
CODE_ASSISTANT_PEERS_TMUX_SESSIONpeer-reviewerTmux session name prefix
CODE_ASSISTANT_PEERS_REVIEWER_CWDcwdRepo directory for reviewer sessions
CODE_ASSISTANT_PEERS_DIFF_BUDGET4000Max diff characters in review prompt

Security

Each live session restricts file writes to .peer-review/ only:

ReviewerWrite boundaryMechanism
claude-live.peer-review/<hash>/ only--allowedTools Write(promptDir:*) + --disallowedTools Edit,Write for project files
gemini-live.peer-review/ onlyAdmin policy: ALLOW .peer-review/ (priority 500), DENY elsewhere (priority 100), DENY shell (priority 600)
codex-liveWorkspace (advisory)-c instructions behavioral constraint + --sandbox workspace-write

Shell execution (run_shell_command) is hard-denied for gemini-live, preventing prompt-injection via sed -i, shell scripts, etc.


Custom adapters

Register any CLI that accepts prompts through stdin or argv:

{
  "my-llm": {
    "id": "my-llm",
    "command": ["my-llm-cli", "--model", "best", "-"],
    "prompt_transport": "stdin",
    "description": "My custom LLM CLI"
  }
}
CODE_ASSISTANT_PEERS_ASSISTANTS='{"my-llm": {...}}' bun server.ts
PEER_ASSISTANTS=my-llm bun server.ts

MCP tools

ToolWhen to callDescription
begin_peer_taskBefore editingCaptures baseline for the review
must_call_after_code_changesAfter every editStarts async review, returns immediately
wait_for_peer_reviewAfter must_call_after_code_changesPolls until complete
get_peer_review_statusAnytimeCheck current status
get_open_findingsAnytimeList unresolved findings
code_assistant_peers_setupSetup verificationCheck CLI availability

Typical flow

1. begin_peer_task                  ← before editing
2. [make code changes]
3. must_call_after_code_changes     ← required after editing
4. wait_for_peer_review             ← repeat until reviewed / partial_failed
5. [read all peer findings, fix issues]
6. must_call_after_code_changes     ← if more edits were made

Troubleshooting

Session not starting

tmux ls | grep peer-reviewer               # list sessions
tail -f /tmp/code-assistant-peers-backend.log   # worker logs

Gemini login required

gemini   # Run once and complete OAuth login

Next review starts automatically. No API key needed — Gemini subscription covers it.

Claude billing: API vs subscription

The reviewer session must NOT have ANTHROPIC_API_KEY set. If it is set, Claude Code bills the API key regardless of interactive mode.

# In the reviewer environment, ensure this is unset:
unset ANTHROPIC_API_KEY

# Verify: launch claude and check it shows "Claude Team" or "Pro", not API key mode
claude

Reset review history for a repo

tmux kill-session -t peer-reviewer-claude-myrepo-abc123
# Next review creates a fresh session

Disable live mode (force headless)

CODE_ASSISTANT_PEERS_LIVE_HOST_REVIEWS=0   # host-side passes use headless
CODE_ASSISTANT_PEERS_REVIEWER_CLEAR=always  # clear history between reviews
PEER_ASSISTANTS=codex,gemini               # use headless adapters directly

Requirements

  • Bun v1.1+
  • tmux (for live sessions)
  • At least one of: Claude Code CLI, OpenAI Codex CLI, Google Gemini CLI
  • Logged in to each CLI you want to use as a reviewer

常见问题

What is code-assistant-peers?

code-assistant-peers is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by AnamKwon. MCP server for mandatory peer review between coding assistants like Claude Code, Codex, Gemini, and other CLI agents. It has 3 GitHub stars.

Is code-assistant-peers safe to use?

Yes. code-assistant-peers passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install code-assistant-peers?

Clone the repository with "git clone https://github.com/AnamKwon/code-assistant-peers" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is code-assistant-peers written in?

code-assistant-peers is primarily written in TypeScript. It is open-source under AnamKwon on GitHub, so you can review or fork the full source.

Are there alternatives to code-assistant-peers?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh code-assistant-peers against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情