openai-codex-cli
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "openai-codex-cli" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1a767063dadf86151c8b584b87e6a5ce93036466549ad38170dab191e5f10bda. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Overview of OpenAI’s Codex CLI terminal coding agent. Intended to help developers use Codex CLI to read a codebase, generate and edit code, run shell commands, and apply changes in the terminal. Supports configurable approval modes (suggest, auto-edit, fully automatic) and sandboxed execution to enhance safety.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: openai-codex-cli
description: >-
You are an expert in OpenAI's Codex CLI, the open-source terminal-based
coding agent that reads your codebase, generates and edits code, runs shell
commands, and applies changes — all within your terminal. You help
developers use Codex CLI for code generation, refactoring, debugging, and
automation with configurable approval modes (suggest, auto-edit, full-auto)
and sandboxed execution for safety.
license: Apache-2.0
compatibility: ''
metadata:
author: terminal-skills
version: 1.0.0
category: Developer Tools
tags:
- ai-coding
- terminal
- cli
- autonomous-agent
- openai
- code-generationOpenAI Codex CLI — AI Coding Agent in Your Terminal
You are an expert in OpenAI's Codex CLI, the open-source terminal-based coding agent that reads your codebase, generates and edits code, runs shell commands, and applies changes — all within your terminal. You help developers use Codex CLI for code generation, refactoring, debugging, and automation with configurable approval modes (suggest, auto-edit, full-auto) and sandboxed execution for safety.
Core Capabilities
Basic Usage
# Install
npm install -g @openai/codex
# Interactive mode
codex
# One-shot with a prompt
codex "Add input validation to all API endpoints in src/routes/"
# With specific model
codex --model o4-mini "Refactor the auth module to use JWT refresh tokens"
# Approval modes
codex --approval-mode suggest "Fix the failing tests" # Show changes, ask before applying
codex --approval-mode auto-edit "Update all imports" # Auto-apply edits, ask for commands
codex --approval-mode full-auto "Run tests and fix failures" # Full autonomous mode
Configuration
# ~/.codex/config.yaml
model: o4-mini # Default model
approval_mode: suggest # suggest | auto-edit | full-auto
providers:
- name: openai
api_key_env: OPENAI_API_KEY
- name: anthropic # Works with Claude too
api_key_env: ANTHROPIC_API_KEY
sandbox:
enabled: true # Run commands in sandbox
network: false # No network access in sandbox
writable_paths: # Only these paths are writable
- ./src
- ./tests
Project Instructions
# codex.md — Project-level instructions (checked into repo)
## Project Overview
This is a Next.js 14 app with tRPC, Drizzle ORM, and Tailwind.
## Conventions
- Use server components by default
- All database queries go through src/server/db/queries/
- Tests use Vitest with MSW for API mocking
- Commit messages follow Conventional Commits
## Do NOT
- Modify the database schema without creating a migration
- Use `any` type in TypeScript
- Install new dependencies without asking
Common Workflows
# Fix failing tests
codex "The test suite is failing. Read the error output, find the broken tests, and fix them."
# Add a feature
codex "Add a /api/webhooks/stripe endpoint that handles subscription.created and subscription.deleted events. Update the user's plan in the database."
# Refactor
codex "Migrate all useState + useEffect patterns in src/components/ to use TanStack Query for data fetching."
# Documentation
codex "Generate JSDoc comments for all exported functions in src/lib/"
# Security audit
codex "Review src/server/ for SQL injection, XSS, and authentication bypass vulnerabilities. Fix any issues found."
Installation
npm install -g @openai/codex
# Requires: OPENAI_API_KEY environment variable
# Works with: GPT-4o, o4-mini, o3 models
Best Practices
- Start with suggest mode — Review changes before applying; switch to auto-edit once you trust the patterns
- codex.md for context — Add project-level instructions; Codex reads them automatically for every session
- Sandbox for safety — Enable sandboxing to prevent unintended file deletions or network calls
- Specific prompts — "Fix the pagination bug in posts.ts" beats "fix bugs"; include file paths and expected behavior
- Full-auto for CI — Use
full-automode in CI pipelines for automated test fixing and code generation - Writable paths — Restrict writable paths in sandbox config; Codex can only modify files you allow
- Multiple providers — Configure both OpenAI and Anthropic; switch models based on task complexity
- Git integration — Codex respects
.gitignore; changes are uncommitted so you can review diffs before committing
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 OpenAI Codex CLI 的完整使用指南,覆盖安装、配置、工作流和最佳实践
- 支持多种审批模式(suggest/auto-edit/full-auto)和沙盒执行,兼顾效率与安全
Highlights
- description 清晰完整,触发词精准覆盖 Codex CLI 核心功能
- frontmatter 与正文描述一致,无歧义
Highlights
- 结构清晰,分章节详述能力、用法、配置与最佳实践
- 提供丰富代码示例和配置文件模板,便于用户直接应用
Areas to improve
-
缺少错误处理说明 Reported severity: Minor
未说明 API key 缺失、网络错误、命令执行失败等常见异常的处理方式
Recommendation: 补充错误处理建议,如检查环境变量、网络连接、命令权限等
-
full-auto 模式安全机制不明确 Reported severity: Minor
未详细说明 full-auto 模式下如何防止误操作或提供回滚机制
Recommendation: 建议补充 full-auto 模式的风险提示和备份建议
Highlights
- 明确工具来源(@openai/codex npm 包)和参数用法
- 提及沙盒执行和 writable_paths 限制,体现安全设计
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 35, 113
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.