Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

codex

БесплатноБез исполняемых скриптовНе проверен

Executes OpenAI Codex CLI for code analysis, refactoring, and automated editing. Activates when users mention codex commands, code review requests, or…

sypsyp97от sypsyp97★ 38 звёзд на GitHub17 установок в других каталогах

Об этом скилле

Codex Execution Skill

Prerequisites

  • Codex CLI installed and configured (~/.codex/config.toml)
  • Verify availability: codex --version on first use per session

Workflow Checklist

For every Codex task, follow this sequence:

  1. ☐ 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
  2. ☐ Ask user for execution parameters via AskUserQuestion (single prompt):

    • Model: gpt-5.4 or default
    • Reasoning effort: none, low, medium, high, xhigh
  3. ☐ Determine sandbox mode based on task:

    • read-only: Code review, analysis, documentation
    • workspace-write: Code modifications, file creation
    • danger-full-access: System operations, network access
    • HPC override: Always add --yolo flag (bypasses Landlock restrictions)
  4. ☐ 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 --yolo to 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/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.

  5. ☐ Execute with stderr suppression:

    • Append 2>/dev/null to hide thinking tokens
    • Remove only if user requests verbose output or debugging
  6. ☐ Validate execution:

    • Check exit code (0 = success)
    • Summarize output for user
    • Report errors with actionable solutions
    • If Landlock/sandbox errors on HPC: verify --yolo flag was used, retry if missing
  7. ☐ 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.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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить codex с