agentleFS
cogine-aicogine-ai/cogine-dev-skillset/skills/peer-review/SKILL.md

peer-review

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Independent second-opinion code review using Codex CLI. Use when: wanting an external AI reviewer's perspective, cross-validating before push, getting a second pair of eyes. Triggers on: '/peer-review', 'codex review', 'second opinion', 'peer review my changes'.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use research-lookup, research-grants and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yf8578Skill

    research-lookup

    Look up current research information using Perplexity's Sonar Pro Search or Sonar Reasoning Pro models through OpenRouter. Automatically selects the best model based on query complexity. Search academic papers, recent studies, technical documentation, and general research information with citations.

    Also in 6 projects that use this

  • yf8578Skill

    research-grants

    Write competitive research proposals for NSF, NIH, DOE, DARPA, and Taiwan NSTC. Agency-specific formatting, review criteria, budget preparation, broader impacts, significance statements, innovation narratives, and compliance with submission requirements.

    Also in 5 projects that use this

  • Hongyu-yuSkill

    torch-geometric

    Graph Neural Networks (PyG). Node/graph classification, link prediction, GCN, GAT, GraphSAGE, heterogeneous graphs, molecular property prediction, for geometric deep learning.

    Also in 4 projects that use this

  • tondevrelSkill

    biopython

    Comprehensive guide for Biopython - the premier Python library for computational biology and bioinformatics. Use for DNA/RNA/protein sequence analysis, file I/O (FASTA, FASTQ, GenBank, PDB), sequence alignment, BLAST searches, phylogenetic analysis, structure analysis, and NCBI database access.

    Also in 4 projects that use this

  • SoljournerSkill

    get-available-resources

    Enumerate installed packages, databases, and tools for engineering workflows

    Also in 4 projects that use this

  • +7 more from yf8578

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If not available, inform the user and stop.

    line 22
  2. Distinctive:

    No arguments: auto-detect - if on a feature branch, review against base.

    line 32
  3. Very specific:

    If --uncommitted, use --uncommitted

    line 45
  4. Very specific:

    If on a feature branch with commits ahead of base, use --base $BASE

    line 48
  5. Very specific:

    If uncommitted changes exist, use --uncommitted

    line 49
  6. Distinctive:

    No Codex CLI installed

    line 53
  7. Distinctive:

    No changes to review

    line 54
  8. Distinctive:

    Before invoking Codex, gather context to present alongside the review:

    line 58
  9. Very specific:

    If --model is specified, add -m <model>.

    line 111
  10. Distinctive:

    Read the Codex output and present it in a structured format:

    line 117
  11. Distinctive:

    After presenting findings, help the user triage them into:

    line 137
  12. Distinctive:

    Do not blindly trust Codex findings.

    line 143
  13. Distinctive:

    If both reviewers flag the same issue, treat it as highest priority.

    line 171

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Peer Review via Codex CLI

Independent code review using OpenAI Codex CLI as a second reviewer agent. Codex runs in a read-only sandbox - it cannot modify any files.

Why a Second Reviewer

Different model families (Claude vs GPT) have different blind spots. A peer review from a separate agent catches issues that self-review misses, similar to how a human teammate provides a fresh perspective.

Prerequisites

Codex CLI must be installed and authenticated:

  • codex --version should return a version
  • Codex handles its own auth via codex login or config

If not available, inform the user and stop.

Arguments

  • --base <branch>: Review changes against a specific base branch
  • --uncommitted: Review staged, unstaged, and untracked changes
  • --commit <sha>: Review a specific commit
  • --model <model>: Override Codex model (default: uses Codex config default)
  • --focus <area>: Custom focus area passed as review instructions (for example, security, performance, or error handling)

No arguments: auto-detect - if on a feature branch, review against base; otherwise review uncommitted changes.

Step 0: Preflight

# Verify Codex CLI is available
codex --version

# Detect review target
BASE=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || git rev-parse --verify main 2>/dev/null && echo main || echo master)

Determine review mode:

  1. If --uncommitted, use --uncommitted
  2. If --commit <sha>, use --commit <sha>
  3. If --base <branch>, use --base <branch>
  4. If on a feature branch with commits ahead of base, use --base $BASE
  5. If uncommitted changes exist, use --uncommitted
  6. Otherwise, abort because there is nothing to review

Abort conditions:

  • No Codex CLI installed
  • No changes to review

Step 1: Gather Context

Before invoking Codex, gather context to present alongside the review:

git diff origin/$BASE...HEAD --stat
git log origin/$BASE...HEAD --oneline

Report to the user:

  • review mode (branch, uncommitted, or commit)
  • scope (files changed, lines changed)
  • Codex model being used

Step 2: Run Codex Review

Build and execute the Codex review command. Always use codex exec review with -o output capture.

# Base branch review
codex exec review \
  --base "$BASE" \
  --ephemeral \
  -o /tmp/peer-review-output.md \
  "$CUSTOM_INSTRUCTIONS"

# Uncommitted changes
codex exec review \
  --uncommitted \
  --ephemeral \
  -o /tmp/peer-review-output.md \
  "$CUSTOM_INSTRUCTIONS"

# Specific commit
codex exec review \
  --commit "$SHA" \
  --ephemeral \
  -o /tmp/peer-review-output.md \
  "$CUSTOM_INSTRUCTIONS"

Base review instructions:

Review this code as a strict but fair peer reviewer. Focus on:
1. Logic bugs and correctness issues
2. Security vulnerabilities (injection, auth bypass, data exposure)
3. Error handling gaps (swallowed errors, missing edge cases)
4. Performance concerns (N+1 queries, unnecessary computation, memory leaks)
5. API contract and type safety issues

For each finding, specify: severity (CRITICAL/WARNING/INFO), file:line, problem description, and suggested fix.
Be concise. Do not praise code - only report issues and improvements.

If --model is specified, add -m <model>.

Set a 120-second timeout. If Codex hangs, kill it and report partial output.

Step 3: Present Findings

Read the Codex output and present it in a structured format:

## Peer Review (Codex CLI)

Reviewer: Codex CLI v{version} / {model}
Mode: {branch|uncommitted|commit}
Scope: {N} files, {M} lines changed

### Findings

{Codex output, organized by severity}

### Cross-Reference Notes

{Optional notes comparing Codex findings with Claude's own /review}

Step 4: Triage Assistance

After presenting findings, help the user triage them into:

  1. Agree - findings that align with your own assessment
  2. Disagree - findings you believe are incorrect, with evidence
  3. Investigate - findings that need more context

Do not blindly trust Codex findings. Verify technical correctness before recommending action.

Step 5: Summary

## Peer Review Summary

Reviewer: Codex CLI {version} / {model}
Scope: {description}

CRITICAL: {N} findings
WARNING:  {N} findings
INFO:     {N} findings

Triage:
- Agree:       {N}
- Disagree:    {N}
- Investigate: {N}

Next steps: {recommended follow-up}

Combining with /review

For maximum coverage, run both:

  1. /review - Claude's self-review
  2. /peer-review - Codex's independent review

If both reviewers flag the same issue, treat it as highest priority.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.