codex
БесплатноБез исполняемых скриптовНе проверенExecutes OpenAI Codex CLI for code analysis, refactoring, and automated editing. Activates when users mention codex commands, code review requests, or…
Об этом скилле
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
--yoloflag to bypass Landlock sandbox restrictions
- Check if running on HPC cluster (look for
☐ Ask user for execution parameters via
AskUserQuestion(single prompt):- Model:
gpt-5.4or default - Reasoning effort:
none,low,medium,high,xhigh
- Model:
☐ 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:
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
--yoloto bypass Landlock):codex exec --yolo -m gpt-5.4 -c model_reasoning_effort="high" --skip-git-repo-check \ "Analyze this code: $(cat /path/to/file.py)" 2>/dev/nullNote:
--yolois an alias for--dangerously-bypass-approvals-and-sandboxand 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
- Append
☐ 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"
- "Resume this session anytime:
Command Patterns
🔥 HPC QUICK TIP: On HPC clusters (e.g.,
/home/woody/,/home/hpc/), ALWAYS add--yoloflag to avoid Landlock sandbox errors. Example:codex exec --yolo -m gpt-5.4 ...
Read-Only Analysis
codex exec -m gpt-5.4 -c model_reasoning_effort="medium" -s read-only \
--skip-git-repo-check --full-auto "review @file.py for security issues" 2>/dev/null
Stdin Input (bypasses sandbox file restrictions)
cat file.py | codex exec -m gpt-5.4 -c model_reasoning_effort="low" \
--skip-git-repo-check --full-auto - 2>/dev/null
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:
# Primary solution: --yolo flag bypasses Landlock sandbox
codex exec --yolo -m gpt-5.4 -c model_reasoning_effort="high" --skip-git-repo-check \
"Analyze this code: $(cat /path/to/file.py)" 2>/dev/null
Alternative: Manual Code Injection (if --yolo is unavailable):
# Capture code content and pass directly in prompt
codex exec -m gpt-5.4 -c model_reasoning_effort="high" --skip-git-repo-check --full-auto \
"Analyze this Python code: $(cat file.py)" 2>/dev/null
Or for large files, use heredoc:
codex exec --yolo -m gpt-5.4 -c model_reasoning_effort="xhigh" --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
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
codex exec -m gpt-5.4 -c model_reasoning_effort="xhigh" -s workspace-write \
--skip-git-repo-check --full-auto "refactor @module.py to async/await" 2>/dev/null
Resume Session
echo "fix the remaining issues" | codex exec --skip-git-repo-check resume --last 2>/dev/null
Cross-Directory Execution
codex exec -C /path/to/project -m gpt-5.4 -c model_reasoning_effort="medium" \
-s read-only --skip-git-repo-check --full-auto "analyze architecture" 2>/dev/null
Using Profiles
codex exec --profile production -c model_reasoning_effort="high" \
--full-auto "optimize performance in @app.py" 2>/dev/null
CLI Reference
Core Flags
| Flag | Values | When to Use |
|---|---|---|
-m, --model |
gpt-5.4 |
Specify model (gpt-5.4 is the current ve |
Установить codex в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл codex?
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.
Как установить скилл codex?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codex запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic