Peer review

From tobihagemann/turbo · View interactive version

Peer review is an AI agent skill from the GitHub repository tobihagemann/turbo. Run an independent peer review via Codex. Use when the user asks to \"peer review\", \"peer review my code\", \"peer review my plan\", \"get a second opinion\", or \"independent review\".

How to use this skill

Skill file

Peer Review

Independent peer review via codex. Translates a natural-language review request into a codex-specific prompt so invocations stay implementation-agnostic.

Step 1: Understand the Request

Identify from the invoking prompt or conversation context:

If no reviewable material is available, stop and state that material is required.

Step 2: Build the Codex Prompt

Assemble the prompt using codex's XML tag conventions (see /codex-exec Prompt Shaping):

```

### [P<N>] <title (imperative, ≤80 chars)>

File: <file path> (lines <start>-<end>) or Section: <location>

Reviewer: peer (<dimension>)

<one paragraph explaining the issue and its impact>

```

The (lines <start>-<end>) slot is optional; include it when reviewing code, omit for section references. Include the (<dimension>) parenthetical whenever the request identifies a dimension label (covers both single- and multi-dimension cases); omit only for undifferentiated reviews where no dimension was named. Default priority scale: P0 (fundamentally flawed or blocking), P1 (significant gap or urgent), P2 (moderate issue), P3 (minor improvement). End with an Overall Verdict block containing a 1–3 sentence assessment. If there are no issues, state that the material looks sound.

Instruct codex to bound its reads to the material under review, the sources needed to verify claims about it, and the criteria identified in Step 1. Exclude documents unrelated to those three. Instruct codex to search the repository with a tool that skips gitignored files, such as git grep --untracked, and to open or search a gitignored path only when this prompt, the material, or the criteria name it, or when a dependency's installed source is needed to verify a claim, never one holding local configuration or credentials.

When the material is code, state in the prompt that the repository is read-only, that the working directory is an empty scratch directory outside it, and that the temporary directory is writable. Name the repository and every path the prompt mentions by absolute path. Instruct codex to read the AGENTS.md files that govern the reviewed paths as project instructions, since a run started outside the repository loads none. Carry any execution limits identified in Step 1 into the prompt. Instruct codex to run any check that modifies files against a copy of the repository under the temporary directory, deleted afterward, in place of a git worktree, which the read-only repository refuses. Instruct it to name any check it could not run and to mark a verdict that rests on reading alone as such.

Include an explicit instruction that codex perform the review itself rather than delegating to another peer review skill or back to Claude. The prompt has already crossed the tool boundary; further forwarding would loop.

Step 3: Run `/codex-exec` Skill

Invoke /codex-exec via the Skill tool with the assembled prompt: in scratch-workspace mode when the material is code, in read-only mode otherwise.

Step 4: Shape the Response

Compare codex's output against the reviewed material and the dimensions and structure requested in Step 2, then classify it into one of three branches:

Do not synthesize peer findings locally to fill a gap. Peer review's value is independence; locally written findings labeled "peer" mislead the consumer.

Then use the TaskList tool and proceed to any remaining task.

When You Are a Subagent

If you are a subagent, follow the guardrails in references/subagent-wrapping.md. Otherwise codex events can drop after you emit final text, producing a false-empty return that silently bypasses Step 4's AskUserQuestion gate.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.