Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

peer-review-loop同行评审循环

Agent Skill

peer-review-loop 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

798

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:peer-review-loop(同行评审循环)
来源仓库:https://github.com/juliusbrussee/cavekit
仓库路径:skills/peer-review-loop
安装命令:
npx skills add https://github.com/juliusbrussee/cavekit --skill peer-review-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/juliusbrussee/cavekit --skill peer-review-loop

简介

peer-review-loop 实现多轮评审意见整合与迭代修改追踪机制。

  • 适用于复杂需求变更或高风险代码重构场景。
  • 可记录每次修改原因与评审人反馈,形成可追溯的决策链条。
  • 建议在私有分支完成多轮评审后再合并主干,减少主分支污染风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Peer Review Loop — Cavekit + Ralph Loop + Codex Peer reviewer

Run a Cavekit cavekit through a Ralph Loop where Claude builds and Codex adversarially reviews. This is the most rigorous automated quality process available: every few iterations, a completely different model (different training data, different biases, different blind spots) challenges your implementation.


Why This Works

FactorSingle-Model LoopPeer Review Loop
Blind spotsSame model, same blind spots every iterationTwo models catch different classes of issues
Cavekit driftBuilder may silently deviate from cavekitPeer reviewer checks cavekit compliance explicitly
Quality floorConverges to "good enough for one model"Converges to "survives cross-examination"
Dead endsMay retry failed approachesPeer reviewer flags repeated patterns

Architecture

┌─────────────────────────────────────────────────────┐
│                   Ralph Loop                         │
│  (Stop hook feeds same prompt each iteration)        │
│                                                      │
│  ┌──────────┐    ┌──────────────┐    ┌────────────┐ │
│  │  Claude   │───▶│ Build from   │───▶│  Commit    │ │
│  │  (Build)  │    │ cavekit +  │    │  changes   │ │
│  └──────────┘    └──────────────┘    └──────┬─────┘ │
│       ▲                                      │       │
│       │                                      ▼       │
│  ┌──────────┐    ┌──────────────┐    ┌────────────┐ │
│  │  Fix      │◀──│ Parse        │◀──│  Codex CLI │ │
│  │  findings │    │ findings     │    │  (Review)  │ │
│  └──────────┘    └──────────────┘    └────────────┘ │
│                                                      │
│  Completion: all cavekit requirements met +         │
│              no CRITICAL/HIGH findings               │
└─────────────────────────────────────────────────────┘

Review Invocation: Codex CLI (primary) vs MCP (legacy)

The peer review loop supports two invocation paths:

  1. Codex CLI delegation (primary) — Uses scripts/codex-review.sh which calls codex directly in --approval-mode full-auto with a structured review prompt. Faster, no MCP server overhead, findings are parsed and appended to context/impl/impl-review-findings.md automatically.
  2. MCP server (legacy fallback) — Configures Codex as an MCP server in .mcp.json. Claude calls the MCP tool on review iterations. Used only when Codex CLI delegation is unavailable (e.g., older Codex versions).

The build script (setup-build.sh) auto-detects which path to use: if codex-review.sh is present and codex CLI is available, it uses CLI delegation. Otherwise it falls back to MCP configuration.


Quick Start

# Basic: implement a cavekit with peer review
/ck:peer-review-loop context/kits/cavekit-auth.md

# With options
/ck:peer-review-loop context/kits/cavekit-api.md --max-iterations 20 --codex-model gpt-5.4-mini

# Review-only mode (review existing code, don't build new)
/ck:peer-review-loop context/kits/cavekit-api.md --review-only

# Review every iteration instead of every 2nd
/ck:peer-review-loop context/kits/cavekit-auth.md --review-interval 1

What the Command Does

  1. Validates the cavekit file exists and Codex CLI is installed
  2. Configures Codex as an MCP server in .mcp.json (if not already configured)
  3. Builds a Ralph Loop prompt that embeds:

- The cavekit path and related plan/impl files - Instructions to alternate between build and review iterations - The peer review prompt template for Codex - Completion criteria tied to cavekit acceptance criteria

  1. Starts the Ralph Loop via the stop hook mechanism

Codex Review Invocation

Primary: Codex CLI via codex-review.sh

When codex CLI is available, the loop delegates review to scripts/codex-review.sh which exposes the bp_codex_review function. This runs Codex in full-auto mode with a structured adversarial review prompt, parses findings into a standardized table, and appends them to context/impl/impl-review-findings.md.

# What the build loop runs on review iterations:
source scripts/codex-review.sh
bp_codex_review --base main

The CLI path is faster (no MCP server startup), produces structured findings with severity levels (P0-P3), and handles fallback gracefully if Codex is unavailable.

Legacy fallback: Codex MCP Server

When Codex CLI delegation is not available, the command configures Codex as an MCP server automatically:

{
  "mcpServers": {
    "codex-reviewer": {
      "command": "codex",
      "args": ["mcp-server", "-c", "model=\"gpt-5.4\""]
    }
  }
}

Claude calls this MCP server on review iterations to get peer review feedback. The MCP server exposes Codex as a tool that accepts prompts and returns responses — Claude sends the cavekit + code diff, Codex returns findings.

Changing the Codex Model

Use --codex-model to specify which OpenAI model Codex should use:

/ck:peer-review-loop cavekit.md --codex-model gpt-5.4-mini    # faster, cheaper
/ck:peer-review-loop cavekit.md --codex-model gpt-5.4          # default, most capable

Iteration Pattern

Iteration 1: BUILD  — Read cavekit, implement first requirement
Iteration 2: REVIEW — Call Codex CLI (or MCP fallback), get findings, fix CRITICAL/HIGH
Iteration 3: BUILD  — Continue implementing, address remaining findings
Iteration 4: REVIEW — Call Codex CLI (or MCP fallback) again, new findings on new code
...
Iteration N: BUILD  — All requirements met, all findings fixed
             → outputs <promise>SPEC COMPLETE</promise>

The review interval is configurable. Default is every 2nd iteration. Use --review-interval 1 for maximum rigor (review every iteration).


Peer Review Findings File

Review findings are tracked in context/peer-review-findings.md:

# Peer Review Findings

## Latest Review: Iteration 4 — 2026-03-14T10:30:00Z
### Reviewer: Codex (gpt-5.4)

| # | Severity | File | Issue | Status |
|---|----------|------|-------|--------|
| 1 | CRITICAL | src/auth.ts:L42 | Missing input validation on token | FIXED |
| 2 | HIGH | src/auth.ts:L67 | Race condition in session refresh | FIXED |
| 3 | MEDIUM | src/auth.ts:L15 | Unused import | NEW |
| 4 | LOW | src/auth.ts:L3 | Comment typo | WONTFIX |

## History
### Iteration 2
| # | Severity | File | Issue | Status |
|---|----------|------|-------|--------|
| 1 | CRITICAL | src/auth.ts:L20 | SQL injection in login query | FIXED |

Completion Criteria

The loop exits when the completion promise is output. The prompt instructs Claude to ONLY output it when ALL of these are true:

  • All cavekit requirements (R-numbers) have been implemented
  • All acceptance criteria pass
  • No CRITICAL or HIGH peer review findings remain unfixed
  • Build passes
  • Tests pass
  • At least one review iteration completed with no new CRITICAL/HIGH findings

Modes

Build + Review (default)

Alternates between implementing cavekit requirements and calling Codex for review. Use for greenfield implementation from a cavekit.

Review Only (--review-only)

Skips building. Each iteration calls Codex to review existing code against the cavekit, then fixes issues found. Use when code already exists and you want peer review QA.


Prerequisites

  1. Codex CLI installed: npm install -g @openai/codex
  2. OpenAI API key configured: Codex needs authentication (via codex login or env var)
  3. Cavekit context directory: Cavekit file must exist at the given path
  4. Ralph Loop plugin: The ralph-loop plugin must be installed (provides the stop hook)

Convergence Signals

The peer review loop has converged when:

  • Codex's findings drop to zero or only LOW/MEDIUM severity
  • Code diffs between iterations are minimal
  • All cavekit requirements confirmed as met by both Claude and Codex

If the loop hits max iterations without converging:

  • Check context/peer-review-findings.md for persistent issues
  • Consider whether the cavekit needs clarification
  • Run /ck:revise to trace issues back to kits

Cross-References

  • peer-review — The underlying peer review patterns and prompt templates
  • convergence-monitoring — How to detect convergence vs ceiling
  • validation-first — Validation gates that run on every build iteration
  • impl-tracking — How implementation progress is tracked across iterations
  • Ralph Loop — The underlying Ralph Loop mechanism

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.27%
按下载量换算26

Claude

27.75%
按下载量换算20

Cursor

16.75%
按下载量换算12

Gemini CLI

9.26%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills