jackspace/claudeskillz/codex
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install jackspace/claudeskillz/codexSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Codex Execution Skill
Prerequisites
- Codex CLI installed and configured (
~/.codex/config.toml) - Verify availability:
codex --versionon first use per session
Workflow Checklist
For every Codex task, follow this sequence:
- ☐ Detect HPC/Slurm environment:
- Check if running on HPC cluster (look for
/home/woody/,/home/hpc/, Slurm env vars) - If HPC detected: Always use `--yolo` flag to bypass Landlock sandbox restrictions
- ☐ Ask user for execution parameters via
AskUserQuestion(single prompt):
- Model:
gpt-5,gpt-5-codex, or default - Reasoning effort:
minimal,low,medium,high
- ☐ Determine sandbox mode based on task:
read-only: Code review, analysis, documentationworkspace-write: Code modifications, file creationdanger-full-access: System operations, network access- HPC override: Always add
--yoloflag (bypasses Landlock restrictions)
- ☐ Build command with required flags:
``bash codex exec [OPTIONS] "PROMPT" `` Essential flags:
-m <MODEL>(if overriding default)-c model_reasoning_effort="<LEVEL>"-s <SANDBOX_MODE>(skip on HPC)--skip-git-repo-check(if outside git repo)-C <DIRECTORY>(if changing workspace)--full-auto(for non-interactive execution, cannot be used with --yolo)
HPC command pattern (with --yolo to bypass Landlock): ``bash 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 ``
Note: --yolo is an alias for --dangerously-bypass-approvals-and-sandbox and is REQUIRED on HPC clusters to avoid Landlock sandbox errors. Do not use --full-auto with --yolo as they are incompatible.
- ☐ Execute with stderr suppression:
- Append
2>/dev/nullto hide thinking tokens - Remove only if user requests verbose output or debugging
- ☐ Validate execution:
- Check exit code (0 = success)
- Summarize output for user
- Report errors with actionable solutions
- If Landlock/sandbox errors on HPC: verify
--yoloflag was used, retry if missing
- ☐ Inform about resume capability:
- "Resume this session anytime:
codex resume"
Command Patterns
🔥 HPC QUICK TIP: On HPC clusters (e.g.,/home/woody/,/home/hpc/), ALWAYS add `--yolo` flag to avoid Landlock sandbox errors. Example:codex exec --yolo -m gpt-5 ...
Read-Only Analysis
Stdin Input (bypasses sandbox file restrictions)
Note: Stdin with - flag may not be supported in all Codex CLI versions.
HPC/Slurm Environment (YOLO Mode - Bypass Landlock)
When running on HPC clusters with Landlock security restrictions, use the --yolo flag:
Alternative: Manual Code Injection (if --yolo is unavailable):
Or for large files, use heredoc:
Note: --yolo is short for --dangerously-bypass-approvals-and-sandbox and is safe on HPC login nodes where you have limited permissions anyway. Do not combine --yolo with --full-auto as they are incompatible.
Code Modification
Resume Session
Cross-Directory Execution
Using Profiles
CLI Reference
Core Flags
| Flag | Values | When to Use | |
|---|---|---|---|
-m, --model | gpt-5, gpt-5-codex | Override default model | |
-c, --config | key=value | Runtime config override (repeatable) | |
-s, --sandbox | read-only, workspace-write, danger-full-access | Set execution permissions | |
--yolo | flag | REQUIRED on HPC - Bypasses all sandbox restrictions (alias for --dangerously-bypass-approvals-and-sandbox). Cannot be used with --full-auto | |
-C, --cd | path | Change workspace directory | |
--skip-git-repo-check | flag | Allow execution outside git repos | |
--full-auto | flag | Non-interactive mode (workspace-write + approvals on failure). Cannot be used with --yolo | |
-p, --profile | string | Load configuration profile from config.toml | |
--json | flag | JSON event output (CI/CD pipelines) | |
-o, --output-last-message | path | Write final message to file | |
-i, --image | path[,path...] | Attach images (repeatable or comma-separated) | |
--oss | flag | Use local open-source model (requires Ollama) |
Configuration Options
Model Reasoning Effort (-c model_reasoning_effort="<LEVEL>"):
minimal: Quick tasks, simple querieslow: Standard operations, routine refactoringmedium: Complex analysis, architectural decisions (default)high: Critical code, security audits, complex algorithms
Model Verbosity (-c model_verbosity="<LEVEL>"):
low: Minimal outputmedium: Balanced detail (default)high: Verbose explanations
Approval Prompts (-c approvals="<WHEN>"):
on-request: Before any tool useon-failure: Only on errors (default for--full-auto)untrusted: Minimal promptsnever: No interruptions (use with caution)
Configuration Management
Config File Location
~/.codex/config.toml
Runtime Overrides
Using Profiles
Define in config.toml:
Use with:
Resume Behavior
Automatic inheritance:
- Model selection
- Reasoning effort
- Sandbox mode
- Configuration overrides
Resume syntax:
Flag injection (between exec and resume):
Error Handling
Validation Loop
- Execute command
- Check exit code (non-zero = failure)
- Report error with context
- Ask user for direction via
AskUserQuestion - Retry with adjustments or escalate
Permission Requests
Before using high-impact flags, request user approval via AskUserQuestion:
--full-auto: Automated execution-s danger-full-access: System-wide access--yolo/--dangerously-bypass-approvals-and-sandbox:- HPC clusters: No approval needed (required for operation)
- Personal machines: Request approval (full system access)
Partial Success Handling
When output contains warnings:
- Summarize successful operations
- Detail failures with context
- Use
AskUserQuestionto determine next steps - Propose specific adjustments
Troubleshooting
File Access Blocked
Symptom: "shell is blocked by the sandbox" or permission errors
Root cause: Sandbox read-only mode restricts file system
Solutions (priority order):
- Stdin piping (recommended):
``bash cat target.py | codex exec -m gpt-5 -c model_reasoning_effort="medium" \ --skip-git-repo-check --full-auto - 2>/dev/null ``
- Explicit permissions:
``bash codex exec -m gpt-5 -s read-only \ -c 'sandbox_permissions=["disk-full-read-access"]' \ --skip-git-repo-check --full-auto "@file.py" 2>/dev/null ``
- Upgrade sandbox:
``bash codex exec -m gpt-5 -s workspace-write \ --skip-git-repo-check --full-auto "review @file.py" 2>/dev/null ``
Invalid Flag Errors
Symptom: "unexpected argument '--add-dir' found"
Cause: Flag does not exist in Codex CLI
Solution: Use -C <DIR> to change directory:
Exit Code Failures
Symptom: Non-zero exit without clear message
Diagnostic steps:
- Remove
2>/dev/nullto see full stderr - Verify installation:
codex --version - Check configuration:
cat ~/.codex/config.toml - Test minimal command:
codex exec -m gpt-5 "hello world" - Verify model access:
codex exec --model gpt-5 "test"
Model Unavailable
Symptom: "model not found" or authentication errors
Solutions:
- Check configured model:
grep model ~/.codex/config.toml - Verify API access: Ensure valid credentials
- Try alternative model:
-m gpt-5-codex - Use OSS fallback:
--oss(requires Ollama)
Session Resume Fails
Symptom: Cannot resume previous session
Diagnostic steps:
- List recent sessions:
codex history - Verify session ID format
- Try
--lastflag instead of specific ID - Check if session expired or was cleaned up
HPC/Slurm Sandbox Failures
Symptom: "Landlock sandbox error", "LandlockRestrict", or all file operations fail
Root Cause: HPC clusters use Landlock/seccomp kernel security modules that block Codex's default sandbox
✅ SOLUTION: Use the `--yolo` flag (priority order):
- YOLO Flag (PRIMARY SOLUTION - WORKS ON HPC):
``bash # 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 ``
Why this works: --yolo (alias for --dangerously-bypass-approvals-and-sandbox) disables the Codex sandbox entirely, allowing direct file access on HPC systems. Note: Do not use --full-auto with --yolo as they are incompatible.
- Manual Code Injection (fallback if --yolo unavailable):
``bash # 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/null ``
- Heredoc for Long Code:
```bash codex 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 ```
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/codex/SKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 6
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 14 May 2026, 5 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jackspace/claudeskillz/codex)