一键导入
codex
Use when "codex", "use gpt", "gpt-5", "openai codex", "let openai", "full-auto", "autonomous code generation"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when "codex", "use gpt", "gpt-5", "openai codex", "let openai", "full-auto", "autonomous code generation"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when evaluating agent performance, building test frameworks, measuring quality, or asking about "agent evaluation", "LLM-as-judge", "agent testing", "quality metrics", "evaluation rubrics", "agent benchmarks"
Use when compressing agent context, implementing conversation summarization, reducing token usage in long sessions, or asking about "context compression", "conversation history", "token optimization", "context limits", "summarization strategies"
Use when diagnosing agent failures, debugging lost-in-middle issues, understanding context poisoning, or asking about "context degradation", "lost in middle", "context poisoning", "attention patterns", "context clash", "agent performance drops"
Use when optimizing agent context, reducing token costs, implementing KV-cache optimization, or asking about "context optimization", "token reduction", "context limits", "observation masking", "context budgeting", "context partitioning"
Use when "CrewAI", "multi-agent systems", "agent orchestration", "AI crews", or asking about "autonomous agents", "agent collaboration", "role-based agents", "agent workflows", "AI team coordination"
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
| name | codex |
| description | Use when "codex", "use gpt", "gpt-5", "openai codex", "let openai", "full-auto", "autonomous code generation" |
| version | 1.0.0 |
Autonomous code execution using OpenAI Codex CLI.
# Check installation
codex --version
# Install if needed
npm i -g @openai/codex
# or
brew install codex
| Mode | Flag | Capabilities |
|---|---|---|
| Read-Only | -s read-only | Analyze code, no modifications (default) |
| Workspace-Write | -s workspace-write or --full-auto | Read/write files in workspace |
| Danger-Full-Access | -s danger-full-access | Network, system-level, all files |
Key concept: Use --full-auto for most programming tasks—it enables file editing.
| Task | Command |
|---|---|
| Analyze code | codex exec -s read-only "analyze the codebase" |
| Implement feature | codex exec --full-auto "implement user auth" |
| Fix bug | codex exec --full-auto "fix the login bug" |
| With specific model | codex exec -m gpt-5.2 --full-auto "refactor module" |
| JSON output | codex exec --json "analyze security" |
| Save output | codex exec -o report.txt "audit code" |
| Non-git directory | codex exec --skip-git-repo-check "analyze" |
| Resume session | codex exec resume --last "continue" |
| Model | Use Case |
|---|---|
gpt-5.2 | Latest capabilities |
gpt-5.2-codex | Code-specialized |
gpt-5.2-codex-max | Maximum quality |
Use -m MODEL to specify.
| Principle | Description |
|---|---|
| Autonomous | Complete tasks without seeking approval for each step |
| Focused | Do what's requested, nothing more |
| Minimal | Write only necessary code |
| Verified | Run tests after changes |
| Situation | Action |
|---|---|
| Destructive operations | Ask first (delete DB, force push) |
| Security decisions | Ask first (expose credentials, open ports) |
| Ambiguous requirements | Clarify before proceeding |
| Missing critical info | Request user-specific data |
For everything else, proceed autonomously.
✓ Task completed successfully
Changes made:
- [Files modified/created]
- [Key code changes]
Results:
- [Metrics: lines changed, files affected]
Verification:
- [Tests run, checks performed]
| Approach | Description |
|---|---|
| Auto-recover | Attempt fix if possible |
| Log clearly | Report all errors |
| Continue | If error is non-blocking |
| Stop | Only if continuation impossible |