Token导航 LogoToken导航

Agent Skill · 研究检索

codex-cli(Codex CLI 搜索)

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

codex-cli 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 48,496。

总安装 685周安装 28GitHub Stars 9下载 220核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/adaptationio/skrillz --skill codex-cli

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

codex-cli 用于集成 OpenAI Codex CLI,支持在 Claude Code 中与 Codex 协同工作,提升开发效率。适用于与 OpenAI 模型(如 GPT-5.2、o3)协作进行代码生成、重构和 Git 相关任务。通过命令行调用 Codex 功能,支持自动化工作流、PR 审查和多模态任务处理。

需先安装 Codex CLI,配置权限并确认是否允许绕过沙箱或执行危险操作。建议在使用前验证模型版本、网络连接及本地环境兼容性。

来源仓库内路径:skills/codex-cli

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/adaptationio/skrillz --skill codex-cli;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

codex-cli 怎么安装?

在终端执行 npx skills add https://github.com/adaptationio/skrillz --skill codex-cli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codex-cli 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codex-cli 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

codex-cli 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

codex-cli 用的人多吗?

公开数据是累计安装 685 次,近一周安装 28 次,下载 220 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codex-cli 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
codex-cli

Codex CLI 搜索 · 本页

6859接触敏感数据MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

OpenAI Codex CLI Integration

Integrates OpenAI's Codex CLI into Claude Code, enabling seamless AI collaboration between Claude and Codex for enhanced development workflows.

Last Updated: December 2025 (GPT-5.2 Release)

When to Use

  • Working with OpenAI models (GPT-5.2, GPT-5.1-Codex-Max, o3, o4-mini)
  • Code generation and refactoring with latest models
  • Git-aware workflows and PR reviews
  • Full automation with permission bypass
  • Reasoning-first development (o3 models, GPT-5.2 with xhigh reasoning)
  • Multimodal tasks (code + images)
  • Sandboxed execution environments
  • Long-context tasks (400K tokens with GPT-5.2)

Quick Start

1. Install Codex CLI

# Check current installation
codex --version

# Install/Update globally via NPM
npm install -g @openai/codex

# Or use Homebrew (macOS/Linux)
brew install openai/tap/codex-cli

2. Setup Authentication

Option A: ChatGPT Plus/Pro (Recommended)
# Login with ChatGPT account
codex login
# Opens browser for OAuth authentication
# Includes GPT-5-Codex access with subscription
Option B: API Key
# Set OpenAI API key
export OPENAI_API_KEY="your-api-key-here"

# Or create config file
mkdir -p ~/.codex
echo 'api_key = "your-api-key-here"' > ~/.codex/config.toml

3. Basic Usage

# Direct execution (like gemini -p)
codex exec "Analyze this codebase and suggest improvements"

# Full automation (BYPASS ALL APPROVALS)
codex exec --dangerously-bypass-approvals-and-sandbox "Refactor authentication module"

# Safe automation (sandboxed)
codex exec --full-auto "Generate tests for all functions"

# Interactive mode
codex "Let's work on improving this code"

# With specific model (December 2025)
codex exec -m gpt-5.2 "Complex task with latest model"
codex exec -m gpt-5.1-codex-max "Best for agentic coding (default)"
codex exec -m o3 "Deep reasoning task"
codex exec -m o4-mini "Quick code generation"

Full Automation Mode - MAXIMUM POWER

--dangerously-bypass-approvals-and-sandbox - Complete automation, zero friction:

✅ When to Use Bypass Mode

# Trusted, repeatable workflows
codex exec --dangerously-bypass-approvals-and-sandbox "Add JSDoc comments to all ./src functions"

# Automated testing workflows
codex exec --dangerously-bypass-approvals-and-sandbox "Run tests and auto-fix all failures"

# Bulk operations
codex exec --dangerously-bypass-approvals-and-sandbox "Convert all .js files to TypeScript"

# CI/CD pipelines (externally sandboxed)
codex exec --dangerously-bypass-approvals-and-sandbox "Deploy to staging environment"

⚠️ Safer Automation Options

# --full-auto: Sandboxed with workspace write access
codex exec --full-auto "Refactor module safely"

# Custom approval + sandbox
codex exec -a never -s workspace-write "Controlled automation"

# On-failure approval (runs until error)
codex exec -a on-failure "Try operations, escalate on error"

Approval Policies

# -a never: Full automation (no approvals)
codex exec -a never "Complete workflow automation"

# -a on-request: Model decides when to ask
codex exec -a on-request "Intelligent approval requests"

# -a on-failure: Only ask if command fails
codex exec -a on-failure "Run until failure, then ask"

# -a untrusted: Only run trusted commands (default)
codex exec -a untrusted "Safe, limited automation"

Sandbox Modes

# -s read-only: Cannot modify files
codex exec -s read-only "Analysis only, no changes"

# -s workspace-write: Can modify workspace
codex exec -s workspace-write "Safe file modifications"

# -s danger-full-access: Full system access
codex exec -s danger-full-access "Complete control (use carefully)"

Available Models (December 2025)

GPT-5.2 Series (NEW - December 11, 2025)

# GPT-5.2 Thinking - Latest frontier model
# 400K context, 128K output, knowledge cutoff Aug 31, 2025
# Pricing: $1.75/1M input, $14/1M output (90% cached discount)
codex exec -m gpt-5.2 "Complex multi-step task with deep reasoning"

# GPT-5.2 Instant - Speed optimized for routine queries
codex exec -m gpt-5.2-chat-latest "Fast information seeking and writing"

# GPT-5.2 Pro - Maximum accuracy (Responses API only)
# Pricing: $21/1M input, $168/1M output
# Supports reasoning.effort: medium, high, xhigh
codex exec -m gpt-5.2-pro "Critical high-accuracy tasks"

GPT-5.1 Codex Series (Recommended for Coding)

# GPT-5.1-Codex-Max - DEFAULT for Codex CLI
# Best for agentic coding with native compaction support
codex exec -m gpt-5.1-codex-max "Complex development workflows"

# GPT-5.1-Codex - Optimized for long-running agentic tasks
codex exec -m gpt-5.1-codex "Extended coding sessions"

# GPT-5.1-Codex-Mini - Cost-efficient coding
codex exec -m gpt-5.1-codex-mini "Quick code tasks"

Legacy GPT-5 Series

# GPT-5 - General model (use GPT-5.2 for latest)
codex exec -m gpt-5 "General tasks"

# GPT-5-Codex - Previous coding model
codex exec -m gpt-5-codex "Code generation"

o-Series (Reasoning Models)

# o3 - Smartest reasoning model
codex exec -m o3 "Complex architectural decisions"

# o4-mini - Efficient reasoning
codex exec -m o4-mini "Quick reasoning tasks"

New GPT-5.2 Features

# Extended reasoning with xhigh effort (GPT-5.2 Pro/Thinking)
codex exec -m gpt-5.2-pro --reasoning-effort xhigh "Maximum accuracy task"

# Context compaction for long sessions
codex exec -m gpt-5.2 --compact "Long document analysis"

# Concise reasoning summaries
codex exec -m gpt-5.2 --concise-reasoning "Explain this code"

Claude + Codex Collaboration Patterns

Claude orchestrates, Codex executes - The Think-Act-Observe Loop:

Structured Workflows

#!/bin/bash
# Claude directs Codex for complete feature development

# THINK: Claude analyzes requirements
echo "Goal: Add user profile caching"

# ACT: Codex researches best practices (with web search)
codex exec --search --dangerously-bypass-approvals-and-sandbox \
  "Research Redis caching patterns and create implementation plan" \
  > plan.md

# OBSERVE: Claude reviews the plan
cat plan.md

# ACT: Codex implements (full automation)
codex exec --dangerously-bypass-approvals-and-sandbox --json \
  "Implement the caching system according to @plan.md" \
  > implementation.json

# OBSERVE: Claude verifies
jq '.changes[]' implementation.json

# ACT: Codex tests
codex exec --dangerously-bypass-approvals-and-sandbox \
  "Generate and run comprehensive tests"

# Loop continues...

JSON Output for AI Parsing

# Get structured output for Claude to parse
codex exec --json "List all exported functions in ./src" > functions.json

# Claude processes reliably
for func in $(jq -r '.functions[].name' functions.json); do
  echo "Processing: $func"
  codex exec --dangerously-bypass-approvals-and-sandbox \
    "Add input validation to $func function"
done

Sequential Task Decomposition

#!/bin/bash
# Claude breaks down complex goal into safe atomic steps

echo "=== Feature: Add OAuth2 Authentication ==="

# Step 1: Research (safe, read-only)
codex exec --search --full-auto "Research OAuth2 best practices 2025" > research.md

# Step 2: Plan (Claude reviews)
codex exec "Create detailed OAuth2 implementation plan based on @research.md"
read -p "Review plan. Continue? [y/N] " -r

# Step 3: Install dependencies
codex exec --dangerously-bypass-approvals-and-sandbox "Install OAuth2 packages"

# Step 4: Generate code
codex exec --dangerously-bypass-approvals-and-sandbox \
  "Generate OAuth2 auth module according to plan"

# Step 5: Tests
codex exec --dangerously-bypass-approvals-and-sandbox \
  "Generate comprehensive OAuth2 tests"

# Step 6: Verify
codex exec --dangerously-bypass-approvals-and-sandbox "Run all tests and fix failures"

Advanced Features

Web Search Integration

# Enable web search for research
codex exec --search --dangerously-bypass-approvals-and-sandbox \
  "Research latest React 19 features and create migration guide"

# Research-driven development
codex exec --search --full-auto \
  "Find best practices for microservices and implement API gateway"

Multimodal (Code + Images)

# Attach design screenshots
codex exec -i design.png --dangerously-bypass-approvals-and-sandbox \
  "Implement this UI design in React"

# Multiple images
codex exec -i mockup1.png -i mockup2.png --full-auto \
  "Compare these designs and implement the better approach"

Git-Aware Workflows

# Apply Codex changes as git patch
codex apply
# or
codex a

# Work on git branch
git checkout -b feature/new-auth
codex exec --dangerously-bypass-approvals-and-sandbox \
  "Implement authentication with clean commits"

# Codex respects .gitignore and git history

Resume Sessions

# Resume last session
codex exec resume --last

# Pick from previous sessions
codex resume

Configuration Profiles

# Create profile in ~/.codex/config.toml
[profiles.auto-dev]
model = "gpt-5.1-codex"
ask_for_approval = "never"
sandbox = "workspace-write"
search = true

# Use profile
codex exec -p auto-dev "Develop new feature automatically"

MCP Server Integration

# Run as MCP server
codex mcp

# Manage MCP servers (experimental)
codex mcp list
codex mcp add <server-name>

Core Workflows

Automated Code Generation

#!/bin/bash
# Complete automation for code generation

generate_api() {
  local spec="$1"

  codex exec --dangerously-bypass-approvals-and-sandbox \
    --json \
    --search \
    "Read API specification @$spec and generate:
    1. Data models with validation
    2. API endpoints with OpenAPI docs
    3. Database migrations
    4. Comprehensive tests
    5. Error handling middleware
    6. Authentication middleware
    7. Rate limiting
    8. API documentation"
}

# Usage
generate_api "./specs/user-api.yaml"

Automated Refactoring

#!/bin/bash
# Safe, automated refactoring workflow

refactor_module() {
  local module="$1"

  # Backup first
  git stash push -m "pre-refactor-$(date +%s)"

  # Full automation with git safety
  codex exec --dangerously-bypass-approvals-and-sandbox \
    "Refactor $module:
    1. Analyze current code structure
    2. Identify improvements
    3. Apply modern patterns
    4. Add comprehensive tests
    5. Run all tests
    6. Fix any test failures
    7. Update documentation
    8. Create clean git commits"

  if [ $? -eq 0 ]; then
    echo "Refactoring complete!"
  else
    git stash pop
    echo "Refactoring failed, restored backup"
  fi
}

# Usage
refactor_module "./src/auth"

Test Generation & Fixing

#!/bin/bash
# Automated test generation and fixing

automate_testing() {
  local target="$1"

  codex exec --dangerously-bypass-approvals-and-sandbox \
    "Complete testing workflow for $target:
    1. Analyze code coverage gaps
    2. Generate comprehensive unit tests
    3. Generate integration tests
    4. Generate end-to-end tests
    5. Run all tests
    6. Fix any failing tests
    7. Achieve 100% coverage
    8. Generate test report"
}

# Usage
automate_testing "./src"

CI/CD Integration

# GitHub Actions with Codex
name: Codex Automation
on: [push, pull_request]

jobs:
  codex-review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '20'

      - name: Install Codex CLI
        run: npm install -g @openai/codex

      - name: Run Codex Analysis
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        run: |
          codex exec --dangerously-bypass-approvals-and-sandbox \
            --json \
            "Analyze code changes, run tests, fix issues, generate report" \
            > codex-report.json

      - name: Upload Report
        uses: actions/upload-artifact@v3
        with:
          name: codex-analysis
          path: codex-report.json

Configuration

Config File (~/.codex/config.toml)

# Default model (December 2025)
model = "gpt-5.1-codex-max"  # Best for agentic coding

# Approval policy
ask_for_approval = "on-request"  # or "never", "on-failure", "untrusted"

# Sandbox mode
sandbox = "workspace-write"  # or "read-only", "danger-full-access"

# Enable web search
search = true

# Additional writable directories
add_dirs = ["./docs", "./tests"]

# Feature flags
[features]
web_search = true
multimodal = true
mcp = true

# Profiles for different workflows
[profiles.safe]
ask_for_approval = "untrusted"
sandbox = "read-only"

[profiles.auto]
ask_for_approval = "never"
sandbox = "workspace-write"
search = true

[profiles.danger]
ask_for_approval = "never"
sandbox = "danger-full-access"
search = true

# NEW: GPT-5.2 optimized profiles
[profiles.gpt52]
model = "gpt-5.2"
ask_for_approval = "never"
sandbox = "workspace-write"
search = true

[profiles.gpt52-pro]
model = "gpt-5.2-pro"
reasoning_effort = "xhigh"
ask_for_approval = "on-request"
sandbox = "workspace-write"

[profiles.long-context]
model = "gpt-5.2"
ask_for_approval = "never"
sandbox = "workspace-write"
compact = true  # Enable context compaction

Environment Variables

# Authentication
export OPENAI_API_KEY="your-key"

# Default model (December 2025)
export CODEX_MODEL="gpt-5.1-codex-max"  # For agentic coding
# export CODEX_MODEL="gpt-5.2"          # For general tasks with 400K context
# export CODEX_MODEL="gpt-5.2-pro"      # For maximum accuracy

# Default config path
export CODEX_CONFIG_PATH="~/.codex/config.toml"

# GPT-5.2 specific options
export CODEX_REASONING_EFFORT="high"  # medium, high, xhigh

Best Practices

Security with Bypass Mode

When using --dangerously-bypass-approvals-and-sandbox:

  1. Use in Controlled Environments

- CI/CD with external sandboxing - Docker containers - Disposable development environments

  1. Always Have Backups git stash push -m "pre-codex-$(date +%s)" codex exec --dangerously-bypass-approvals-and-sandbox "task"
  2. Use Git for Safety

- Work on feature branches - Review diffs before pushing - Use codex apply to review changes

  1. Limit Scope codex exec --dangerously-bypass-approvals-and-sandbox \ -C./specific/directory \ "Only affect this directory"

Model Selection Strategy (December 2025)

# Quick tasks: o4-mini or gpt-5.1-codex-mini
codex exec -m o4-mini "Format code with Prettier"
codex exec -m gpt-5.1-codex-mini "Quick code fixes"

# Standard development: gpt-5.1-codex-max (DEFAULT)
codex exec -m gpt-5.1-codex-max "Implement user authentication"

# Long-context tasks: gpt-5.2 (400K context)
codex exec -m gpt-5.2 "Analyze entire codebase"

# Complex reasoning: o3 or gpt-5.2-pro with xhigh
codex exec -m o3 "Design scalable microservices architecture"
codex exec -m gpt-5.2-pro --reasoning-effort xhigh "Critical architecture decisions"

# Speed-optimized: gpt-5.2-chat-latest (Instant)
codex exec -m gpt-5.2-chat-latest "Quick information retrieval"

# Maximum accuracy: gpt-5.2-pro
codex exec -m gpt-5.2-pro "High-stakes production code"

Performance Optimization

# Use JSON for faster parsing
codex exec --json "task" | jq .

# Skip git checks if not needed
codex exec --skip-git-repo-check "task"

# Specify working directory
codex exec -C ./project "task"

# Use profiles to avoid repetitive flags
codex exec -p auto-dev "task"

Troubleshooting

Common Issues

Authentication Failed

codex logout
codex login

Model Not Available

# Check available models (December 2025)
codex exec -m gpt-5.2 "test" || echo "GPT-5.2 not available"

# Fall back to stable coding model
codex exec -m gpt-5.1-codex-max "task"

# Or use previous generation
codex exec -m gpt-5.1-codex "task"

Sandbox Errors

# Try different sandbox mode
codex exec -s danger-full-access "task"

# Or bypass entirely (if safe)
codex exec --dangerously-bypass-approvals-and-sandbox "task"

Related Skills

  • codex-auth: Authentication and API key management
  • codex-chat: Interactive REPL workflows
  • codex-tools: Tool execution and file operations
  • codex-review: Code review and git workflows
  • codex-git: Git-aware development patterns

Updates

# Update Codex CLI
npm update -g @openai/codex

# Check version
codex --version

# Check for new models
codex exec "What models are available?"

Created for Claude Code - Full automation for AI-to-AI collaboration

平台分布

github-copilot

28.24%
按下载量换算62

Claude Code

21.67%
按下载量换算48

mcpjam

19.55%
按下载量换算43

moltbot

12.38%
按下载量换算27

windsurf

7.89%
按下载量换算17

zencoder

3.24%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills