Loading...
Loading...
Use OpenAI Codex from inside Claude Code for code reviews, adversarial reviews, and delegating tasks to Codex as a subagent.
npx skill4agent add aradotso/codex-skills codex-plugin-claude-codeSkill by ara.so — Codex Skills collection.
codex-plugin-cc/codex:review/codex:adversarial-review/codex:rescue/codex:status/codex:result/codex:cancel/codex:setup/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins/codex:setupnpm install -g @openai/codex!codex login/codex:review/codex:adversarial-review/codex:rescue/codex:status/codex:result/codex:cancel/codex:setupcodex:codex-rescue/agents/codex:review --background
/codex:status
/codex:result/codex:review--base <ref>main--wait--background# Review uncommitted changes
/codex:review
# Review current branch vs main
/codex:review --base main
# Run in background
/codex:review --background/codex:status/codex:result/codex:adversarial-review/codex:review--base--wait--background# General adversarial review
/codex:adversarial-review
# Challenge caching and retry design
/codex:adversarial-review --base main challenge whether this was the right caching and retry design
# Focus on race conditions
/codex:adversarial-review --background look for race conditions and question the chosen approach/codex:rescuecodex:codex-rescue--background--wait--resume--fresh--model <model>gpt-5.4-minispark--effort <level>lowmediumhigh# Investigate test failure
/codex:rescue investigate why the tests started failing
# Fix with smallest safe patch
/codex:rescue fix the failing test with the smallest safe patch
# Resume latest rescue
/codex:rescue --resume apply the top fix from the last run
# Use specific model and effort
/codex:rescue --model gpt-5.4-mini --effort medium investigate the flaky integration test
# Quick fix with spark
/codex:rescue --model spark fix the issue quickly
# Background investigation
/codex:rescue --background investigate the regressionAsk Codex to redesign the database connection to be more resilient.--model--effortsparkgpt-5.3-codex-spark/codex:status# Show all jobs
/codex:status
# Show specific job
/codex:status task-abc123/codex:result# Show latest result
/codex:result
# Show specific result
/codex:result task-abc123codex resume <session-id>/codex:cancel# Cancel latest job
/codex:cancel
# Cancel specific job
/codex:cancel task-abc123/codex:setup# Check setup
/codex:setup
# Enable review gate (advanced)
/codex:setup --enable-review-gate
# Disable review gate
/codex:setup --disable-review-gateStop~/.codex/config.toml.codex/config.toml.codex/config.tomlmodel = "gpt-5.4-mini"
model_reasoning_effort = "high"openai_base_url = "https://your-custom-endpoint.example.com"OPENAI_API_KEYexport OPENAI_API_KEY=your-api-key-here
codex login/codex:review/codex:adversarial-review --base main challenge the retry and timeout strategy/codex:rescue --background investigate why the build is failing in CI/codex:status
/codex:result/codex:rescue --model spark fix the linter error quickly/codex:rescue --resume apply the suggested fix from the last run/codex:adversarial-review --background
/codex:rescue --background investigate the flaky test/codex:status/codex:result/codex:cancel/codex:resultcodex resume abc123-session-idconst { execSync } = require('child_process');
function runCodexReview(baseBranch = null) {
let cmd = 'codex review';
if (baseBranch) {
cmd += ` --base ${baseBranch}`;
}
try {
const output = execSync(cmd, { encoding: 'utf-8' });
console.log(output);
} catch (error) {
console.error('Codex review failed:', error.message);
}
}
runCodexReview('main');const { execSync } = require('child_process');
function getCodexStatus(taskId = null) {
let cmd = 'codex status';
if (taskId) {
cmd += ` ${taskId}`;
}
try {
const output = execSync(cmd, { encoding: 'utf-8' });
return JSON.parse(output); // Adjust based on actual Codex CLI output format
} catch (error) {
console.error('Failed to get Codex status:', error.message);
return null;
}
}
const status = getCodexStatus();
console.log(status);const { execSync } = require('child_process');
function delegateToCodex(task, model = 'gpt-5.4-mini', effort = 'medium') {
// Ensure Codex uses the right config
process.env.CODEX_MODEL = model;
process.env.CODEX_REASONING_EFFORT = effort;
const cmd = `codex rescue "${task}"`;
try {
const output = execSync(cmd, { encoding: 'utf-8' });
console.log('Codex rescue output:', output);
} catch (error) {
console.error('Codex rescue failed:', error.message);
}
}
delegateToCodex('investigate the failing integration test');/codex:setupnpm install -g @openai/codex/codex:setup!codex login/codex:status/codex:cancel/codex:setup --disable-review-gateopenai_base_url.codex/config.tomlnvm install 18
nvm use 18# Claude review
/review
# Codex adversarial review
/codex:adversarial-review --base main challenge the error handling strategy.codex/config.tomlmodel = "gpt-5.4-mini"
model_reasoning_effort = "medium".codex/config-high.tomlmodel = "gpt-5.4"
model_reasoning_effort = "high"export CODEX_CONFIG=.codex/config-high.toml
/codex:rescue investigate the race condition thoroughly/codex:result/codex:result
# Copy session ID: abc123-xyz
# In terminal
codex resume abc123-xyz/codex:review/codex:adversarial-review/codex:rescue/codex:status/codex:result/codex:cancel~/.codex/config.toml.codex/config.tomlcodex login