$npx -y skills add ncklrs/startup-os-skills --skill codex-reviewHand off code review to OpenAI Codex CLI. Use when asked to "review code with codex",
| 1 | # Codex Code Review |
| 2 | |
| 3 | Hand off code review tasks to OpenAI's Codex CLI for an independent AI perspective on code changes. |
| 4 | |
| 5 | ## How This Skill Works |
| 6 | |
| 7 | When invoked, this skill launches the Codex CLI's `review` command in the terminal to analyze code changes. Codex provides a fresh perspective using OpenAI's models, which can catch different issues than Claude might. |
| 8 | |
| 9 | ## When to Use This Skill |
| 10 | |
| 11 | - Getting a **second opinion** on code changes before committing |
| 12 | - Reviewing **uncommitted work** (staged, unstaged, or untracked files) |
| 13 | - Reviewing a **pull request** against a base branch |
| 14 | - Analyzing a **specific commit** for potential issues |
| 15 | - Cross-validating Claude's own code suggestions |
| 16 | |
| 17 | ## Review Modes |
| 18 | |
| 19 | ### 1. Uncommitted Changes (Default) |
| 20 | Review all local changes not yet committed: |
| 21 | |
| 22 | ```bash |
| 23 | codex review --uncommitted |
| 24 | ``` |
| 25 | |
| 26 | ### 2. PR Review (Against Base Branch) |
| 27 | Review changes between current branch and a base branch: |
| 28 | |
| 29 | ```bash |
| 30 | codex review --base main |
| 31 | ``` |
| 32 | |
| 33 | ### 3. Specific Commit |
| 34 | Review changes introduced by a single commit: |
| 35 | |
| 36 | ```bash |
| 37 | codex review --commit <SHA> |
| 38 | ``` |
| 39 | |
| 40 | ### 4. Custom Instructions |
| 41 | Add specific review focus areas: |
| 42 | |
| 43 | ```bash |
| 44 | codex review --uncommitted "Focus on security vulnerabilities and error handling" |
| 45 | ``` |
| 46 | |
| 47 | ## Execution Instructions |
| 48 | |
| 49 | **IMPORTANT**: When this skill is invoked, Claude MUST execute the appropriate `codex review` command using the Bash tool. Do not just describe what to do — actually run the command. |
| 50 | |
| 51 | ### Argument Handling |
| 52 | |
| 53 | | User Says | Command to Run | |
| 54 | |-----------|----------------| |
| 55 | | `/codex-review` (no args) | `codex review --uncommitted` | |
| 56 | | `/codex-review uncommitted` | `codex review --uncommitted` | |
| 57 | | `/codex-review PR` or `/codex-review main` | `codex review --base main` | |
| 58 | | `/codex-review PR #123` | First `gh pr checkout 123`, then `codex review --base main` | |
| 59 | | `/codex-review <branch>` | `codex review --base <branch>` | |
| 60 | | `/codex-review <sha>` | `codex review --commit <sha>` | |
| 61 | |
| 62 | ### Execution Steps |
| 63 | |
| 64 | 1. **Determine review mode** from arguments (default: uncommitted) |
| 65 | 2. **Run the codex review command** using Bash tool |
| 66 | 3. **Present the results** to the user with any notable findings highlighted |
| 67 | 4. **Offer follow-up actions** (apply suggestions, create issues, etc.) |
| 68 | |
| 69 | ## Command Reference |
| 70 | |
| 71 | ```bash |
| 72 | # Full options |
| 73 | codex review [OPTIONS] [PROMPT] |
| 74 | |
| 75 | Options: |
| 76 | --uncommitted Review staged, unstaged, and untracked changes |
| 77 | --base <BRANCH> Review changes against the given base branch |
| 78 | --commit <SHA> Review the changes introduced by a commit |
| 79 | --title <TITLE> Optional commit title to display in review summary |
| 80 | -c, --config <k=v> Override config (e.g., -c model="o3") |
| 81 | -h, --help Print help |
| 82 | ``` |
| 83 | |
| 84 | ## Example Workflows |
| 85 | |
| 86 | ### Quick Local Review |
| 87 | ```bash |
| 88 | # Review everything you've changed locally |
| 89 | codex review --uncommitted |
| 90 | ``` |
| 91 | |
| 92 | ### Pre-PR Review |
| 93 | ```bash |
| 94 | # Review your feature branch against main before opening PR |
| 95 | codex review --base main "Check for breaking changes and missing tests" |
| 96 | ``` |
| 97 | |
| 98 | ### Focused Security Review |
| 99 | ```bash |
| 100 | # Security-focused review of uncommitted changes |
| 101 | codex review --uncommitted "Focus on: SQL injection, XSS, auth bypass, secrets exposure" |
| 102 | ``` |
| 103 | |
| 104 | ## Integration Notes |
| 105 | |
| 106 | - Codex CLI must be installed and authenticated (`codex login`) |
| 107 | - Reviews run non-interactively and output results to terminal |
| 108 | - Use `codex apply` after review to apply any suggested diffs |
| 109 | - Combine with Claude's own review for comprehensive coverage |