- Home
- Skills
- Code Quality & Review
- xreview: Claude Code and Codex review each other's work
Works with the AI Agents you already use
xreview: Claude Code and Codex review each other's work
Before your agent calls substantial work done, another agent reviews it read-only from the real git diff: Codex checks Claude Code, Claude Code checks Codex. Needs the Codex or Claude Code CLI installed and logged in.
Free
xreview: Claude Code and Codex review each other's work
Example session with this skill installed
Add a hit_rate() helper for the cache dashboard, then have Codex review it before you tell me it's done.
- Read your context and instructions
- Compiled the xreview
Summary
The agent runs xreview before it reports the work as done. Codex reads the change in its own read-only session, opens the helper the new code depends on, and finds a blocker that the diff alone does not show. The output below is real: it comes from the change that xreview's built-in self-test (doctor --live) plants, with only local folder paths removed.
# Codex review 20261021-084040-a568
- Verdict: **changes_requested**
- Reviewed: uncommitted changes (staged, unstaged and untracked) against HEAD (branch main)
- Model: gpt-6-astra, effort medium, sandbox read-only
- Review copy: 2 files; git-ignored, private and credential files left out
hit_rate() returns the inverse of the intended cache hit fraction.
## Findings
1. [BLOCKER] Account for safe_div's reversed arguments (`metrics.py:6`)
Impact: For ordinary nonzero cache counts, the dashboard reports an incorrect hit rate, often exceeding 100%.
helpers.py explicitly implements safe_div(numerator, denominator) as denominator / numerator. Consequently, hit_rate(25, 100) returns 4.0 instead of 0.25.
Fix: Call safe_div(total, hits) to compute hits / total and return 0.0 when total is zero.
## Not verified by the reviewer
- Tests and code execution were not performed, as requested.
XREVIEW 20261021-084040-a568: changes_requested (1 blocker, 0 major, 0 minor, 0 nit)
| Field | Value |
|---|---|
| Reviewer | Codex (author: Claude Code) |
| Verdict | changes_requested (exit code 2) |
| Time | 14 seconds |
| Files the reviewer could open | 2, in a private review copy |
Next steps
- The skill tells the agent to check each finding against the code, fix the real ones and re-run the tests.
- It then runs
xreview.py start --followup, so Codex first checks whether its previous findings are fixed. - Finally it reports the verdict, what it fixed, anything it disputes and why, and where
review.mdis.
Connects securely to your tools. The creator never sees your data.
About this skill
xreview gets your coding agent a second opinion from another model before it tells you that substantial work is done. Codex reviews Claude Code's work, and Claude Code reviews Codex's. From any other agent that can run shell commands, you choose either one as the reviewer.
Requirements
- The reviewer's command-line tool, installed and logged in on the machine where your agent runs. That is the Codex CLI (
codex login) for Codex reviews and the Claude Code CLI (claude auth login) for Claude Code reviews. xreview cannot review anything without one of them, and reviews use that account's quota. - Python 3.8 or newer and git. The project must be a git repository.
What it does
- Tells your agent when to ask for a review: new features or algorithms, multi-file or tricky changes, refactors, non-obvious bug fixes, and changes to data loading, splits, training, evaluation, metrics or job scripts. Questions, docs and small edits get no review.
- Builds the review from git itself: staged, unstaged and untracked changes, code first. Your agent's own notes go to the reviewer marked as unverified claims.
- Keeps the reviewer read-only and away from your data. It works in a private copy of the repository that holds only what git would commit. Git-ignored data and outputs, files that look like credentials, and paths you mark private in
.xreview.jsonnever reach it. Whatever the reviewer does read is sent to its provider (OpenAI or Anthropic) under your account. - Returns a structured verdict: findings with severity, impact and suggested fixes, plus what the reviewer could not check. A crash, timeout or malformed answer is never treated as an approval.
- Checks research and ML code too: data leakage, train/validation/test separation, checkpoint and hyperparameter selection, metric correctness and baseline fairness.
- Supports follow-ups and partial reviews: a follow-up round checks the previous findings first, and
--pathsreviews one part of a larger change.
Install
Put the xreview folder where your agent loads skills, for example ~/.claude/skills/xreview/ for Claude Code or ~/.agents/skills/xreview/ for Codex. Then run python3 <skill-folder>/scripts/xreview.py doctor --live once to check the CLIs, logins and sandbox.
Claude Code users: add this line to ~/.claude/CLAUDE.md, so that Claude reviews its own finished work:
xreview is installed. When you finish a substantial or risky code change (new logic, multi-file edits, refactors, non-obvious bug fixes, or data, training, evaluation, metrics or job-script code), invoke the xreview skill before telling the user the work is done. Skip it for questions, docs, formatting and small obvious edits, and when the user says not to.
Updates and source
This listing is a snapshot of version 0.5.0 and does not update itself. For automatic updates in Claude Code and Codex, plus the built-in reminder for Claude Code, install the plugin from GitHub: https://github.com/Armin-Saadat/xreview (MIT license).
The reviewer reads code but never runs it or your tests; your agent passes its test results in its notes. It needs the Codex CLI or the Claude Code CLI installed and logged in, and each review uses that account's quota. Git-ignored files (data, outputs) are not visible to the reviewer unless the project allows them in a committed .xreview.json. On hosts where Codex's sandbox cannot start (some HPC and container login nodes), Codex reviews need "tools": "repo" in ~/.config/xreview/config.json and read files without a shell. This listing does not update itself; the GitHub plugin does.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 21 days ago
- Free with an Agensi account
Requires
Permissions
Allowed Hosts
File Scopes
Shell: the agent runs scripts/xreview.py, which runs git and then the reviewer CLI (codex or claude). Read files: it reads the repository's changes and copies the files git would commit into a private review copy. Write files: only under ~/.local/share/xreview (review jobs and the temporary copy, deleted after each review); it never edits the repository. Network: xreview itself opens no connections, but the reviewer CLI sends the review to its provider (OpenAI for Codex, Anthropic for Claude Code) under your account. Environment variables: optional XREVIEW_HOME and XREVIEW_CONFIG, and the agent's own variables to tell Claude Code and Codex apart. The reviewer runs read-only: Codex's shell can read only the review copy, and Claude Code gets only Read, Grep and Glob there.