codex-cli
БесплатноБез исполняемых скриптовНе проверенUse OpenAI Codex CLI for coding tasks. Triggers: codex, code review, fix CI, refactor code, implement feature, coding agent, gpt-5-codex. Enables Clawdbot to…
от sundial-org★ 676 звёзд на GitHubОб этом скилле
OpenAI Codex CLI Skill
Use OpenAI Codex CLI (codex) for coding tasks including code review, refactoring, bug fixes, CI repairs, and feature implementation. Codex CLI runs locally on your machine with full filesystem access.
When to Use
- User asks for code changes, refactoring, or implementation
- CI/build failures need fixing
- Code review before commit/push
- Large codebase exploration or explanation
- Tasks requiring file editing + command execution
- When GPT-5-Codex model strengths are needed (code generation, tool use)
Installation & Auth
Codex CLI requires ChatGPT Plus/Pro/Business/Enterprise subscription.
# Install
npm i -g @openai/codex
# Authenticate (opens browser for OAuth)
codex login
# Or use API key
printenv OPENAI_API_KEY | codex login --with-api-key
# Verify auth
codex login status
Core Commands
Interactive Mode (TUI)
codex # Launch interactive terminal UI
codex "explain this codebase" # Start with a prompt
codex --cd ~/projects/myapp # Set working directory
Non-Interactive (Scripting)
codex exec "fix the CI failure" # Run and exit
codex exec --full-auto "add input validation" # Auto-approve workspace writes
codex exec --json "list all API endpoints" # JSON output for parsing
codex exec -i screenshot.png "match this design" # With image input
Session Management
codex resume # Pick from recent sessions
codex resume --last # Continue most recent
codex resume <SESSION_ID> # Resume specific session
Slash Commands (In TUI)
| Command | Purpose |
|---|---|
/model |
Switch model (gpt-5-codex, gpt-5) |
/approvals |
Set approval mode (Auto, Read Only, Full Access) |
/review |
Code review against branch, uncommitted changes, or specific commit |
/diff |
Show Git diff including untracked files |
/compact |
Summarize conversation to free context |
/init |
Generate AGENTS.md scaffold |
/status |
Show session config and token usage |
/undo |
Revert most recent turn |
/new |
Start fresh conversation |
/mcp |
List configured MCP tools |
/mention <path> |
Attach file to conversation |
Approval Modes
| Mode | Behavior |
|---|---|
| Auto (default) | Read/edit/run commands in workspace; asks for outside access |
| Read Only | Browse files only; requires approval for changes |
| Full Access | Full machine access including network (use sparingly) |
Key Flags
| Flag | Purpose |
|---|---|
--model, -m <model> |
Override model (gpt-5-codex, gpt-5) |
--cd, -C <path> |
Set working directory |
--add-dir <path> |
Add additional writable roots |
--image, -i <path> |
Attach image(s) to prompt |
--full-auto |
Workspace write + approve on failure |
--sandbox <mode> |
read-only, workspace-write, danger-full-access |
--json |
Output newline-delimited JSON |
--search |
Enable web search tool |
Clawdbot Integration Patterns
Pattern 1: Direct exec Tool
Call Codex from Clawdbot's exec tool for coding tasks:
# In Clawdbot session
exec codex exec --full-auto --cd ~/projects/medreport "fix the TypeScript errors in src/components"
Pattern 2: Subagent Delegation
Spawn a coding subagent that uses Codex:
// In agents.defaults or per-agent config
{
agents: {
list: [
{
id: "coder",
workspace: "~/clawd-coder",
model: "openai-codex/gpt-5.2", // Uses Codex auth
tools: {
allow: ["exec", "read", "write", "edit", "apply_patch", "process"]
}
}
]
}
}
Pattern 3: CLI Backend Fallback
Configure Codex as a text-only fallback:
{
agents: {
defaults: {
cliBackends: {
"codex-cli": {
command: "codex",
args: ["exec", "--full-auto"],
output: "text",
sessionArg: null // Codex manages its own sessions
}
}
}
}
}
Pattern 4: MCP Server Mode
Run Codex as an MCP server for other agents:
codex mcp-server # Exposes Codex tools via stdio MCP
Clawdbot Config: OpenAI Codex Provider
Use your ChatGPT Pro subscription via the openai-codex provider:
{
agents: {
defaults: {
model: { primary: "openai-codex/gpt-5.2" },
models: {
"openai-codex/gpt-5.2": { alias: "Codex" },
"anthropic/claude-opus-4-5": { alias: "Opus" }
}
}
}
}
Auth syncs automatically from ~/.codex/auth.json to Clawdbot's auth profiles.
Code Review Workflow
# Interactive review
codex
/review # Choose: branch, uncommitted, or specific commit
# Non-interactive
codex exec "review the changes in this PR against main branch"
Multi-Directory Projects
# Work across monorepo packages
codex --cd apps/frontend --add-dir ../backend --add-dir ../shared
# Or in TUI
codex --cd ~/projects/mya
Установить codex-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл codex-cli?
Use OpenAI Codex CLI for coding tasks. Triggers: codex, code review, fix CI, refactor code, implement feature, coding agent, gpt-5-codex. Enables Clawdbot to delegate coding work to Codex CLI as a subagent or direct tool.
Как установить скилл codex-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codex-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic