Loading...
Loading...
Executes OpenAI Codex CLI for code analysis, refactoring, and automated editing. Activates when users mention codex commands, code review requests, or automated code transformations requiring advanced reasoning models.
npx skill4agent add jackspace/claudeskillz codex~/.codex/config.tomlcodex --version/home/woody//home/hpc/--yoloAskUserQuestiongpt-5gpt-5-codexminimallowmediumhighread-onlyworkspace-writedanger-full-access--yolocodex exec [OPTIONS] "PROMPT"-m <MODEL>-c model_reasoning_effort="<LEVEL>"-s <SANDBOX_MODE>--skip-git-repo-check-C <DIRECTORY>--full-auto--yolocodex exec --yolo -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check \
"Analyze this code: $(cat /path/to/file.py)" 2>/dev/null--yolo--dangerously-bypass-approvals-and-sandbox2>/dev/null--yolocodex resume🔥 HPC QUICK TIP: On HPC clusters (e.g.,,/home/woody/), ALWAYS add/home/hpc/flag to avoid Landlock sandbox errors. Example:--yolocodex exec --yolo -m gpt-5 ...
codex exec -m gpt-5 -c model_reasoning_effort="medium" -s read-only \
--skip-git-repo-check --full-auto "review @file.py for security issues" 2>/dev/nullcat file.py | codex exec -m gpt-5 -c model_reasoning_effort="low" \
--skip-git-repo-check --full-auto - 2>/dev/null---yolo# Primary solution: --yolo flag bypasses Landlock sandbox
codex exec --yolo -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check \
"Analyze this code: $(cat /path/to/file.py)" 2>/dev/null# Capture code content and pass directly in prompt
codex exec -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check --full-auto \
"Analyze this Python code: $(cat file.py)" 2>/dev/nullcodex exec --yolo -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check "$(cat <<'ENDCODE'
Analyze the following code comprehensively:
$(cat file.py)
Focus on: architecture, algorithms, multi-GPU optimization, potential bugs, code quality.
ENDCODE
)" 2>/dev/null--yolo--dangerously-bypass-approvals-and-sandboxcodex exec -m gpt-5 -c model_reasoning_effort="high" -s workspace-write \
--skip-git-repo-check --full-auto "refactor @module.py to async/await" 2>/dev/nullecho "fix the remaining issues" | codex exec --skip-git-repo-check resume --last 2>/dev/nullcodex exec -C /path/to/project -m gpt-5 -c model_reasoning_effort="medium" \
-s read-only --skip-git-repo-check --full-auto "analyze architecture" 2>/dev/nullcodex exec --profile production -c model_reasoning_effort="high" \
--full-auto "optimize performance in @app.py" 2>/dev/null| Flag | Values | When to Use |
|---|---|---|
| | Override default model |
| | Runtime config override (repeatable) |
| | Set execution permissions |
| flag | REQUIRED on HPC - Bypasses all sandbox restrictions (alias for |
| | Change workspace directory |
| flag | Allow execution outside git repos |
| flag | Non-interactive mode (workspace-write + approvals on failure). Cannot be used with --yolo |
| | Load configuration profile from config.toml |
| flag | JSON event output (CI/CD pipelines) |
| | Write final message to file |
| | Attach images (repeatable or comma-separated) |
| flag | Use local open-source model (requires Ollama) |
-c model_reasoning_effort="<LEVEL>"minimallowmediumhigh-c model_verbosity="<LEVEL>"lowmediumhigh-c approvals="<WHEN>"on-requeston-failure--full-autountrustednever~/.codex/config.toml# Override single setting
codex exec -c model="gpt-5" "task"
# Override multiple settings
codex exec -c model="gpt-5" -c model_reasoning_effort="high" "task"config.toml[profiles.research]
model = "gpt-5"
model_reasoning_effort = "high"
sandbox = "read-only"
[profiles.development]
model = "gpt-5-codex"
sandbox = "workspace-write"codex exec --profile research "analyze codebase"# Resume last session
codex exec resume --last
# Resume with new prompt
codex exec resume --last "continue with next steps"
# Resume via stdin
echo "new instructions" | codex exec resume --last 2>/dev/null
# Resume specific session
codex exec resume <SESSION_ID> "follow-up task"execresume# Change reasoning effort for resumed session
codex exec -c model_reasoning_effort="high" resume --lastAskUserQuestionAskUserQuestion--full-auto-s danger-full-access--yolo--dangerously-bypass-approvals-and-sandboxAskUserQuestionread-onlycat target.py | codex exec -m gpt-5 -c model_reasoning_effort="medium" \
--skip-git-repo-check --full-auto - 2>/dev/nullcodex exec -m gpt-5 -s read-only \
-c 'sandbox_permissions=["disk-full-read-access"]' \
--skip-git-repo-check --full-auto "@file.py" 2>/dev/nullcodex exec -m gpt-5 -s workspace-write \
--skip-git-repo-check --full-auto "review @file.py" 2>/dev/null-C <DIR>codex exec -C /target/dir -m gpt-5 --skip-git-repo-check \
--full-auto "task" 2>/dev/null2>/dev/nullcodex --versioncat ~/.codex/config.tomlcodex exec -m gpt-5 "hello world"codex exec --model gpt-5 "test"grep model ~/.codex/config.toml-m gpt-5-codex--osscodex history--last--yolo# Bypasses Landlock restrictions completely
codex exec --yolo -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check \
"Analyze this code: $(cat /full/path/to/file.py)" 2>/dev/null--yolo--dangerously-bypass-approvals-and-sandbox# Pass code directly in prompt via command substitution
codex exec -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check --full-auto \
"Analyze this code comprehensively: $(cat /full/path/to/file.py)" 2>/dev/nullcodex exec --yolo -m gpt-5 -c model_reasoning_effort="high" --skip-git-repo-check "$(cat <<'EOF'
Analyze the following Python code for architecture, bugs, and optimization opportunities:
$(cat /home/user/script.py)
Provide technical depth with actionable insights.
EOF
)" 2>/dev/null# SSH to login node first, then run codex there (not in Slurm job)
ssh login.cluster.edu
codex exec --yolo -m gpt-5 --skip-git-repo-check "analyze @file.py" 2>/dev/null# Build image with Codex installed, then run via Slurm
singularity exec codex.sif codex exec --yolo -m gpt-5 "task"--yolo--yolo$(cat file.py)2>/dev/nullreviewrefactorquicksecurity--yolo--yolo--yolo--yolo--full-auto-s workspace-writedanger-full-access--yoloworkspace-writecodex exec --json -o result.txt -m gpt-5 \
-c model_reasoning_effort="medium" \
--skip-git-repo-check --full-auto \
"run security audit on changed files" 2>/dev/nullfor file in *.py; do
cat "$file" | codex exec -m gpt-5 -c model_reasoning_effort="low" \
--skip-git-repo-check --full-auto "lint and format" - 2>/dev/null
done# Step 1: Analysis
codex exec -m gpt-5 -c model_reasoning_effort="high" -s read-only \
--full-auto "analyze @codebase for architectural issues" 2>/dev/null
# Step 2: Resume with changes
echo "implement suggested refactoring" | \
codex exec -s workspace-write resume --last 2>/dev/nullWebFetch https://developers.openai.com/codex/cli/referenceWebFetch https://developers.openai.com/codex/local-config#cli| Task Type | Recommended Model | Reasoning Effort |
|---|---|---|
| Quick syntax fixes | | minimal |
| Code review | | medium |
| Refactoring | | medium |
| Architecture analysis | | high |
| Security audit | | high |
| Algorithm optimization | | high |
| Documentation generation | | low |