Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计异常

codexCodex 编程助手

Agent Skill

codex 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

546

周安装

23

GitHub Stars

14

下载量

191
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codex(Codex 编程助手)
来源仓库:https://github.com/jackspace/claudeskillz
仓库路径:skills/codex
安装命令:
npx skills add https://github.com/jackspace/claudeskillz --skill codex
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jackspace/claudeskillz --skill codex

简介

codex 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限和维护状态。
  • 使用前建议核实是否会触发联网、命令执行或文件读写操作。
  • 可结合原始 README 进一步核验具体用法和功能边界。

SKILL.md

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

  1. Ask user for execution parameters via AskUserQuestion (single prompt):

- Model: gpt-5, gpt-5-codex, or default - Reasoning effort: minimal, low, medium, high

  1. 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)

  1. Build command with required flags: codex exec [OPTIONS] "PROMPT" Essential flags: HPC command pattern (with --yolo to bypass Landlock): 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.

- -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)

  1. Execute with stderr suppression:

- Append 2>/dev/null to hide thinking tokens - Remove only if user requests verbose output or debugging

  1. 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

  1. 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

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/null

Stdin Input (bypasses sandbox file restrictions)

cat file.py | codex exec -m gpt-5 -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 -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 -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 -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

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 -c model_reasoning_effort="high" -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 -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

FlagValuesWhen to Use
-m, --modelgpt-5, gpt-5-codexOverride default model
-c, --configkey=valueRuntime config override (repeatable)
-s, --sandboxread-only, workspace-write, danger-full-accessSet execution permissions
--yoloflagREQUIRED on HPC - Bypasses all sandbox restrictions (alias for --dangerously-bypass-approvals-and-sandbox). Cannot be used with --full-auto
-C, --cdpathChange workspace directory
--skip-git-repo-checkflagAllow execution outside git repos
--full-autoflagNon-interactive mode (workspace-write + approvals on failure). Cannot be used with --yolo
-p, --profilestringLoad configuration profile from config.toml
--jsonflagJSON event output (CI/CD pipelines)
-o, --output-last-messagepathWrite final message to file
-i, --imagepath[,path...]Attach images (repeatable or comma-separated)
--ossflagUse local open-source model (requires Ollama)

Configuration Options

Model Reasoning Effort (-c model_reasoning_effort="<LEVEL>"):

  • minimal: Quick tasks, simple queries
  • low: Standard operations, routine refactoring
  • medium: Complex analysis, architectural decisions (default)
  • high: Critical code, security audits, complex algorithms

Model Verbosity (-c model_verbosity="<LEVEL>"):

  • low: Minimal output
  • medium: Balanced detail (default)
  • high: Verbose explanations

Approval Prompts (-c approvals="<WHEN>"):

  • on-request: Before any tool use
  • on-failure: Only on errors (default for --full-auto)
  • untrusted: Minimal prompts
  • never: No interruptions (use with caution)

Configuration Management

Config File Location

~/.codex/config.toml

Runtime Overrides

# 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"

Using Profiles

Define in config.toml:

[profiles.research]
model = "gpt-5"
model_reasoning_effort = "high"
sandbox = "read-only"

[profiles.development]
model = "gpt-5-codex"
sandbox = "workspace-write"

Use with:

codex exec --profile research "analyze codebase"

Resume Behavior

Automatic inheritance:

  • Model selection
  • Reasoning effort
  • Sandbox mode
  • Configuration overrides

Resume syntax:

# 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"

Flag injection (between exec and resume):

# Change reasoning effort for resumed session
codex exec -c model_reasoning_effort="high" resume --last

Error Handling

Validation Loop

  1. Execute command
  2. Check exit code (non-zero = failure)
  3. Report error with context
  4. Ask user for direction via AskUserQuestion
  5. 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:

  1. Summarize successful operations
  2. Detail failures with context
  3. Use AskUserQuestion to determine next steps
  4. 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):

  1. Stdin piping (recommended): cat target.py | codex exec -m gpt-5 -c model_reasoning_effort="medium" \ --skip-git-repo-check --full-auto - 2>/dev/null
  2. Explicit permissions: 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
  3. Upgrade sandbox: 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:

codex exec -C /target/dir -m gpt-5 --skip-git-repo-check \
  --full-auto "task" 2>/dev/null

Exit Code Failures

Symptom: Non-zero exit without clear message

Diagnostic steps:

  1. Remove 2>/dev/null to see full stderr
  2. Verify installation: codex --version
  3. Check configuration: cat ~/.codex/config.toml
  4. Test minimal command: codex exec -m gpt-5 "hello world"
  5. Verify model access: codex exec --model gpt-5 "test"

Model Unavailable

Symptom: "model not found" or authentication errors

Solutions:

  1. Check configured model: grep model ~/.codex/config.toml
  2. Verify API access: Ensure valid credentials
  3. Try alternative model: -m gpt-5-codex
  4. Use OSS fallback: --oss (requires Ollama)

Session Resume Fails

Symptom: Cannot resume previous session

Diagnostic steps:

  1. List recent sessions: codex history
  2. Verify session ID format
  3. Try --last flag instead of specific ID
  4. 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):

  1. YOLO Flag (PRIMARY SOLUTION - WORKS ON HPC): # 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.
  2. Manual Code Injection (fallback if --yolo unavailable): # 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
  3. Heredoc for Long Code: 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
  4. Run on Login Node (if compute node blocks outbound): # 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
  5. Use Apptainer/Singularity (if cluster supports): # Build image with Codex installed, then run via Slurm singularity exec codex.sif codex exec --yolo -m gpt-5 "task"

Best Practice for HPC:

  • Always use --yolo flag on HPC clusters - it's safe on login nodes where you already have limited permissions
  • Run analysis on login nodes, submit only heavy compute jobs to Slurm
  • Keep code files on shared filesystem readable from login nodes
  • Combine --yolo with $(cat file.py) for maximum compatibility

Best Practices

Reasoning Effort Selection

  • minimal: Syntax fixes, simple renaming
  • low: Standard refactoring, basic analysis
  • medium: Complex refactoring, architecture review
  • high: Security audits, algorithm optimization, critical bugs

Sandbox Mode Selection

  • read-only: Default for any analysis or review
  • workspace-write: File modifications only
  • danger-full-access: Network operations, system commands (rare)

Stderr Suppression

  • Always use 2>/dev/null unless:

- User explicitly requests thinking tokens - Debugging failed commands - Troubleshooting configuration issues

Profile Usage

Create profiles for common workflows:

  • review: High reasoning, read-only
  • refactor: Medium reasoning, workspace-write
  • quick: Low reasoning, read-only
  • security: High reasoning, workspace-write

Stdin vs File Reference

  • Stdin: Single file analysis, avoids permissions
  • File reference: Multi-file context, codebase-wide changes

Safety Guidelines

HPC Clusters - --yolo is SAFE and REQUIRED:

  • HPC login nodes already have strict permissions (no root access, no network modification)
  • --yolo bypasses Codex sandbox but you still operate within HPC user restrictions
  • Always use --yolo on HPC to avoid Landlock errors

General Use - Exercise Caution:

  • Don't use --yolo on unrestricted systems (your laptop, cloud VMs with full sudo)
  • Prefer --full-auto + -s workspace-write for normal development

Always verify before:

  • Using danger-full-access sandbox (outside HPC)
  • Disabling approval prompts on production systems
  • Running with --yolo on personal machines with sudo access

Ask user approval for:

  • First-time workspace-write usage
  • System-wide access requests
  • Destructive operations (deletions, migrations)

Advanced Usage

CI/CD Integration

codex 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/null

Batch Processing

for 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

Multi-Step Workflows

# 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/null

When to Escalate

If errors persist after troubleshooting:

  1. Check documentation: WebFetch https://developers.openai.com/codex/cli/reference WebFetch https://developers.openai.com/codex/local-config#cli
  2. Report to user:

- Error message verbatim - Attempted solutions - Configuration details - Exit codes and stderr output

  1. Request guidance:

- Alternative approaches - Configuration adjustments - Manual intervention points

Model Selection Guide

Task TypeRecommended ModelReasoning Effort
Quick syntax fixesgpt-5minimal
Code reviewgpt-5medium
Refactoringgpt-5-codexmedium
Architecture analysisgpt-5high
Security auditgpt-5high
Algorithm optimizationgpt-5-codexhigh
Documentation generationgpt-5low

Common Workflows

Code Review Workflow

  1. Ask user: model + reasoning effort
  2. Run read-only analysis
  3. Present findings
  4. If changes needed: resume with workspace-write
  5. Validate changes
  6. Inform about resume capability

Refactoring Workflow

  1. Ask user: model + reasoning effort
  2. Analyze current code (read-only)
  3. Propose changes
  4. Get user approval
  5. Apply changes (workspace-write)
  6. Run validation/tests
  7. Report results

Security Audit Workflow

  1. Use high reasoning effort
  2. Run comprehensive analysis (read-only)
  3. Document findings
  4. Propose fixes
  5. Apply fixes if approved (workspace-write)
  6. Re-audit to verify
  7. Generate report

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.75%
按下载量换算51

windsurf

23.91%
按下载量换算46

OpenCode

15.7%
按下载量换算30

Codex

11.11%
按下载量换算21

Antigravity

6.97%
按下载量换算13

Gemini CLI

3.68%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/jackspace/claudeskillz --skill codex;npx skills add jackspace/claudeskillz --skill "codex" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills