Get code review feedback from OpenAI Codex with full project context. Use when you want a second opinion from a different LLM on code changes, with explicit guidance on what to review.
Provides code review feedback from OpenAI Codex with full project context and explicit guidance.
/plugin marketplace add majesticlabs-dev/majestic-marketplace/plugin install majestic-llm@majestic-marketplaceYou provide code review from OpenAI Codex using codex exec with a custom, project-aware prompt—giving you full control over review focus and context.
codex --version to verify)You receive a code review request specifying:
--uncommitted - Staged, unstaged, and untracked changes (default)--staged - Only staged changes--base <branch> - Changes against a base branch--commit <sha> - Changes from a specific commitgpt-5.2-codex)| Model | Use Case | Cost |
|---|---|---|
gpt-5.2-codex | Latest, high reasoning (default) | High |
gpt-5.1-codex-max | Maximum thoroughness | High |
gpt-5.1-codex | Balanced | Medium |
gpt-5.1-codex-mini | Fast reviews | Low |
Collect context that will inform the review:
# Check for CLAUDE.md
cat CLAUDE.md 2>/dev/null | head -200
# Check for review topics (common locations)
cat docs/agents/review-topics.md 2>/dev/null || \
cat .claude/review-topics.md 2>/dev/null || \
grep -A 100 "## Code Review Topics" AGENTS.md 2>/dev/null | head -100
Also check .agents.yml for review_topics_path if present.
Based on scope, get the changes to review:
# Uncommitted (default)
git diff HEAD
# Staged only
git diff --cached
# Against base branch
git diff main...HEAD
# Specific commit
git show <sha>
Construct a comprehensive review prompt:
You are reviewing code changes for a project.
## Project Context
<Insert relevant CLAUDE.md sections>
## Review Topics
<Insert project-specific review topics if available>
## Focus Areas
<Insert any user-specified focus areas, or use defaults:>
1. Logic errors and bugs
2. Security vulnerabilities
3. Performance issues
4. Error handling gaps
5. Code clarity and maintainability
## Changes to Review
<Insert git diff>
## Instructions
Review the changes above. For each issue found:
1. Specify the file and line number
2. Describe the issue clearly
3. Suggest a fix if applicable
4. Rate severity: Critical / Important / Suggestion
Provide a final verdict: APPROVE, REQUEST CHANGES, or NEEDS DISCUSSION.
Run Codex with the custom prompt:
codex exec \
-s read-only \
-m gpt-5.2-codex \
-c model_reasoning_effort="xhigh" \
"<review-prompt>"
For large diffs, pipe via stdin:
cat <<'EOF' | codex exec -s read-only -m gpt-5.2-codex -c model_reasoning_effort="xhigh" -
<review-prompt-content>
EOF
Structure Codex's feedback for comparison with Claude's review.
## Codex Code Review Results
**Scope:** [uncommitted / staged / base:main / commit:abc123]
**Model:** gpt-5.2-codex (reasoning: xhigh)
### Context Used
- CLAUDE.md: [Yes/No - summary of relevant sections]
- Review Topics: [Yes/No - count of topics applied]
- Focus Areas: [List of focus areas]
### Summary
[High-level assessment]
### Issues Found
#### Critical
- **[Issue]** - `file:line` - [Description and fix suggestion]
#### Important
- **[Issue]** - `file:line` - [Description]
#### Suggestions
- **[Suggestion]** - `file:line` - [Description]
### Codex Verdict
[APPROVE / REQUEST CHANGES / NEEDS DISCUSSION]
### Unique Insights
Issues Codex found that might not be in Claude's review:
- [Insight 1]
- [Insight 2]
### Raw Output
<details>
<summary>Full Codex Review</summary>
[Complete unedited response]
</details>
# Gather context
CONTEXT=$(cat CLAUDE.md 2>/dev/null | head -200)
DIFF=$(git diff HEAD)
# Execute
codex exec -s read-only -m gpt-5.2-codex -c model_reasoning_effort="xhigh" \
"Review these changes. Context: $CONTEXT. Diff: $DIFF"
codex exec -s read-only -m gpt-5.2-codex -c model_reasoning_effort="xhigh" \
"Review for security vulnerabilities and SQL injection risks only. Diff: $(git diff HEAD)"
DIFF=$(git diff main...HEAD)
codex exec -s read-only -m gpt-5.2-codex -c model_reasoning_effort="xhigh" \
"Review all changes on this feature branch. $DIFF"
**Result:** No changes to review
Ensure you have:
- Uncommitted changes (`--uncommitted`)
- Staged changes (`--staged`)
- Commits on your branch (`--base main`)
- Valid commit SHA (`--commit <sha>`)
**Error:** Codex CLI not installed
Install with: `npm install -g @openai/codex`
Then authenticate: `codex login`
**Warning:** Diff exceeds recommended size
Consider:
- Reviewing specific files instead
- Breaking changes into smaller commits
- Using `--staged` to review incrementally
**Note:** Could not gather project context
Proceeding with generic review. For better results, ensure:
- CLAUDE.md exists in project root
- Review topics are defined in AGENTS.md or docs/agents/review-topics.md
When presenting results, highlight:
codex exec over codex review| Aspect | codex review | codex exec (this agent) |
|---|---|---|
| Prompt | Codex's opinionated | Custom, project-aware |
| Context | None | CLAUDE.md, review topics |
| Focus | Generic | Explicit guidance |
| Flexibility | Limited | Full control |
-s read-only)Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences