AGENT SKILL
openai-codex-cli
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
02 资源文件 58
- 参考文档editing.md6.7 KB
- 许可证LICENSE.txt1.4 KB
- 参考文档pptxgenjs.md12.5 KB
- 脚本scripts/__init__.py—
- 脚本scripts/add_slide.py6.7 KB
- 脚本scripts/clean.py9.4 KB
- 脚本scripts/office/helpers/__init__.py—
- 脚本scripts/office/helpers/merge_runs.py5.4 KB
- 脚本scripts/office/helpers/simplify_redlines.py5.6 KB
- 脚本scripts/office/pack.py4.9 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd1.9 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd2.5 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd2.8 KB
- 脚本scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd1.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd73.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd6.8 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd50.1 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd624 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd148.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd8.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd14.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd81.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd7.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd6.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd1.2 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd880 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd2.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd3.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd7.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd22.8 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd1.3 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd236.6 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd25.5 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd24.7 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd535 B
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd5.6 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd3.9 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd167.4 KB
- 脚本scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd4.5 KB
- 脚本scripts/office/schemas/mce/mc.xsd3.1 KB
- 脚本scripts/office/schemas/microsoft/wml-2010.xsd25.9 KB
- 脚本scripts/office/schemas/microsoft/wml-2012.xsd3.7 KB
- 脚本scripts/office/schemas/microsoft/wml-2018.xsd901 B
- 脚本scripts/office/schemas/microsoft/wml-cex-2018.xsd1.7 KB
- 脚本scripts/office/schemas/microsoft/wml-cid-2016.xsd1002 B
- 脚本scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd600 B
- 脚本scripts/office/schemas/microsoft/wml-symex-2015.xsd745 B
- 脚本scripts/office/soffice.py5.2 KB
- 脚本scripts/office/unpack.py4.0 KB
- 脚本scripts/office/validate.py3.6 KB
- 脚本scripts/office/validators/__init__.py336 B
- 脚本scripts/office/validators/base.py31.9 KB
- 脚本scripts/office/validators/docx.py16.0 KB
- 脚本scripts/office/validators/pptx.py9.6 KB
- 脚本scripts/office/validators/redlining.py8.7 KB
- 脚本scripts/thumbnail.py8.6 KB
03 SKILL.md 正文
OpenAI 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