Skip to content
Back to skills

168 Fn 2 E09629bf

ASecurity

Add Codex CLI as alternative review backend for cross-model code reviews. Enables Windows/Linux users (who can't use RepoPrompt) to get multi-model review quality gates.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 31, 2026
ai-agentsgobashbackend

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 168-fn-2_e09629bf --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 168 Fn 2 E09629bf?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 168 Fn 2 E09629bf
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-168-fn-2-e09629bf/badge)](https://www.skillsdirectory.com/skills/tools-only-168-fn-2-e09629bf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Codex Review Backend

## Overview

Add Codex CLI as alternative review backend for cross-model code reviews. Enables Windows/Linux users (who can't use RepoPrompt) to get multi-model review quality gates.

## Scope

- New `flowctl codex` command group (check, impl-review, plan-review)
- Context hints via inline implementation (repo-scout pattern, not subagent)
- Update skills to branch on backend (impl-review, plan-review)
- Update Ralph templates (config.env, prompt_plan.md, prompt_work.md)
- Update ralph-guard.py hooks for codex patterns
- Add smoke tests and e2e test variant

## Approach

### Key Design Decisions

1. **Use `codex exec` for all reviews** - `codex review --base` doesn't accept custom prompts (Issue #7825)
2. **Context hints inline in flowctl** - can't spawn subagents from codex, use grep-based approach
3. **Session continuity via `codex exec resume`** - store session_id in receipt, resume on re-review
4. **Config priority**: env var > .flow/config.json > config.env default

### Session Continuity (Re-review Loop)

RP maintains chat context automatically (same window). Codex needs explicit session tracking:

1. **First review**: `codex exec --json ...` → parse `thread_id` from output
2. **Store in receipt**: `{"session_id": "019baa19-...", ...}`
3. **Re-review**: Read receipt → `codex exec resume <session_id> "prompt"`

This gives RP-like context - reviewer sees previous feedback + changes.

**Never use `--last`** - conflicts with parallel codex usage or multiple projects.

### Command Structure

```bash
flowctl codex check                           # Verify codex installed + auth
flowctl codex impl-review <task> --base <br>  # Impl review via codex exec
flowctl codex plan-review <epic>              # Plan review via codex exec
```

### Prompt Structure

```
<context_hints>
Consider these related files:
- path/to/file.ts:42 - reason
</context_hints>

<review_instructions>
[Carmack prompt]
Output <verdict>SHIP</verdict> or <verdict>NEEDS_WORK</verdict>
</review_instructions>
```

## Quick Commands

```bash
# Run smoke tests
cd /tmp && /Users/gordon/work/gmickel-claude-marketplace/plugins/flow-next/scripts/smoke_test.sh
cd /tmp && /Users/gordon/work/gmickel-claude-marketplace/plugins/flow-next/scripts/ralph_smoke_test.sh

# Test codex check (if codex installed)
FLOWCTL="plugins/flow-next/scripts/flowctl"
$FLOWCTL codex check --json
```

## Acceptance

- [ ] `flowctl codex check` returns availability + version
- [ ] `flowctl codex impl-review` sends review to codex, extracts verdict, writes receipt
- [ ] `flowctl codex plan-review` sends plan review, extracts verdict, writes receipt
- [ ] Session continuity works (re-review uses `codex exec resume`)
- [ ] Skills branch correctly based on backend config
- [ ] Ralph works with `PLAN_REVIEW=codex WORK_REVIEW=codex`
- [ ] ralph-guard.py validates codex calls (blocks direct codex without wrapper, blocks --last)
- [ ] Smoke tests pass with codex backend
- [ ] Graceful fallback when codex unavailable
- [ ] Docs updated: READMEs, ralph-e2e-notes.md, ralph-getting-started.md
- [ ] RepoPrompt still recommended as primary, Codex as cross-platform alternative

## Risks

1. **Codex auth**: Non-interactive auth check limited to `codex --version`
2. **Different model behavior**: GPT may interpret Carmack prompt differently than Claude
3. **Session expiry**: Codex sessions may expire - need fallback to new session with context summary

## References

- Spec: plans/codex-review-backend.md
- Existing RP implementation: flowctl.py:2474-2726
- repo-scout pattern: agents/repo-scout.md
- Ralph hooks: scripts/hooks/ralph-guard.py

Files in this skill

  • README.md918 B
  • skill.md3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.