⚠️ No native Hooks: Unlike Claude Code, Codex CLI has no built-in lifecycle hook system. Hook-like behavior (auto-lint, pre-commit gates, notifications) is available if you use Cursor (a third-party IDE by Anysphere, not OpenAI) which introduced its own hooks in v1.7. If you need deterministic enforcement natively, Claude Code is currently the stronger choice.
📦 Plugins now available: As of Codex CLI v0.110.0 (March 2026), Codex supports a plugin system that bundles skills, MCP servers, and app connectors — installable via /plugin install with local marketplace support.
Slash Commands are the shortcuts — quick triggers for frequent workflows.
Function Calling / MCP is the nervous system — connecting the model to external tools and real-world data.
Skills are the playbook — modular instructions the agent discovers and loads on demand.
Custom GPTs are the product layer — full personas with custom instructions, tools, and a storefront presence.
Plugins are the shipping container — bundling skills, MCP servers, and apps for easy distribution (added in v0.110.0).
Installation Methods
⚡ Slash Commands (Codex CLI)
# Built-in commands ship with Codex
/resume # reopen saved conversations
/fork # clone conversation into new thread
/compact # summarize to conserve tokens
/clear # start a fresh chat
# Custom commands via AGENTS.md or config
🔧 Function Calling / MCP
// Via API payload (function calling)
tools: [{
type: "function",
function: {
name: "get_weather",
description: "Get current weather for a location",
parameters: { ... }
}
}]
// Via MCP server config
mcp_servers: [{
type: "url",
url: "https://mcp.github.com/sse",
name: "github-mcp"
}]
🧠 Skills (Codex CLI / IDE)
# Skills live in .agents/skills/ (repo-scoped)
.agents/skills/my-skill/
├── SKILL.md # name, description, instructions
├── scripts/ # optional executables
└── resources/ # optional supporting files
# Install from community via skill-installer
$skill-installer install the linear skill from the .experimental folder
# Or install from a community registry
npx skills add linear
🤖 Custom GPTs (ChatGPT)
Go to chatgpt.com → Explore GPTs → Create
Use GPT Builder to define instructions, upload knowledge, add Actions
Publish to the GPT Store (public) or share via private link
Optionally add Custom Actions using an OpenAPI schema to call external APIs
📦 Plugins (Codex CLI v0.110.0+)
# Install from a marketplace
/plugin marketplace add owner/repository
/plugin install plugin-name@marketplace-name
# Codex auto-discovers installed plugins at session start
# Plugins can bundle skills, MCP servers, and app connectors
New in v0.110.0 (March 2026): Codex CLI now supports a plugin architecture that loads skills, MCP entries, and app connectors from config or a local marketplace. This brings Codex closer to Claude Code’s plugin model with /plugin install syntax.
Configuration Scoping — Where You Put Things Matters
Like Claude Code, Codex configuration is directory-scoped. The directory you launch Codex from determines which instructions, skills, and settings are active.
Example: If you add project conventions to ~/.codex/AGENTS.md (user level), those instructions apply to every repo you open. Put them in the project’s AGENTS.md instead, and they only activate when you launch Codex from that project.
Scope Hierarchy (highest precedence first)
Scope
Location
Applies to
Shared?
CLI flags
Command-line arguments
Current session only
No
Project
.codex/config.toml, AGENTS.md
All project collaborators
Yes (committed to git)
User
~/.codex/config.toml, ~/.codex/AGENTS.md
You, all your projects
No
System
System config directories
All users on machine
Yes
How Each Config Type Resolves
Config
Resolution rule
AGENTS.md
Checks ~/.codex/AGENTS.md first, then walks up from your working directory to the repo root, concatenating files. Closer files appear later in the prompt (higher precedence). Combined size capped at 32 KiB.
Skills
Scanned upward from $CWD/.agents/skills/ to repo root, then ~/.agents/skills/ (user level), then system level. All discovered skills are available; no merging by name.
config.toml
Closest .codex/config.toml wins over user-level. CLI flags override everything.
Trust gate: Project-level .codex/ configuration only loads in trusted projects. If you mark a project as untrusted, Codex ignores all project-level config and falls back to user/system defaults — a safety measure against malicious repo configs.
Practical Rule of Thumb
Project-specific conventions (stack, linting rules, test commands) → put in the repo’s AGENTS.md.
Personal preferences (model, style, global instructions) → put in ~/.codex/AGENTS.md or ~/.codex/config.toml.
Team-shared skills → commit to .agents/skills/ so everyone on the team gets them.
Personal skills → place in ~/.agents/skills/ so they follow you across repos.
Popular Examples by Category
⚡ Slash Commands (Codex CLI)
Command
What it does
/resume
Reopen a saved conversation
/fork
Clone conversation into a new thread
/compact
Summarize conversation to conserve tokens
/clear
Clear the terminal and start a fresh chat
/diff
Display Git changes including untracked files
/review
Request working tree analysis
🔧 Function Calling / MCP Tools
Tool
What it does
github
Read PRs, create issues, review code diffs
postgres
Query databases in plain English
slack
Send messages, search threads
zapier
Trigger 5,000+ app automations
stripe
Look up payments, customers, subscriptions
web_search
Live web search (built-in, opt-in)
🧠 Skills (Codex)
Skill
Auto-activates when…
linear
You mention tasks, issues, or project management
tdd
You ask Codex to write tests
code-review
You ask for a review of existing code
deploy
You mention deployment, release, or CI/CD
docx
You ask Codex to create or edit a Word document
🤖 Custom GPTs (ChatGPT)
GPT
What it does
DALL·E
Generate and edit images from text
Data Analyst
Upload CSVs; get charts and insights
Canva
Design graphics via natural language
Consensus
Search peer-reviewed research papers
Code Copilot
Specialized coding assistant with project context
Key Concepts Unique to OpenAI
AGENTS.md
The OpenAI equivalent of Claude's CLAUDE.md. A markdown file in your repo root that gives the agent persistent project context — tech stack, conventions, key commands, and guidelines. Codex reads it automatically at session start.
See real examples: View the AGENTS.md & CLAUDE.md from this repository side by side.
# Project Context
## Stack: Next.js 14, TypeScript, Supabase
## Run: npm run dev
## Test: npm test
## Conventions: functional components, no default exports
GPT Store
ChatGPT's marketplace for Custom GPTs — roughly comparable to a mix of Claude's plugin distribution and project-specific assistants. Users can discover, install, share, and in some cases monetize GPTs.
Session Forking (/fork)
Codex CLI lets you clone a conversation into a new thread with /fork (or codex fork from the shell). Useful for branching off an existing conversation to explore a different approach without losing the original.
Codex Cloud Sandboxes
Codex's cloud agent runs tasks in isolated, ephemeral sandboxes preloaded with your repository. This enables fully autonomous, asynchronous task delegation — you describe the task, Codex works independently, then returns a diff or PR. Claude's equivalent is background sub-agents.
Built-in Session Commands (Codex CLI)
Not part of the extension stack — native Codex CLI utilities
Command
What it does
/init
Generate an AGENTS.md scaffold for the current project
/resume
Reopen a saved conversation (interactive picker)
/fork
Clone conversation into a new thread
/compact
Summarize conversation to conserve tokens
/clear
Clear the terminal and start a fresh chat
/status
Display session configuration and token usage
codex resume
Resume a session by ID, or use --last for most recent
codex fork
Create a new thread from a previous session
Cross-Platform Note: Skills are a Shared Standard
Skills (SKILL.md format) are not OpenAI-proprietary — Anthropic introduced the format, and OpenAI Codex now supports the same folder-and-markdown skill pattern.
Platform
Skills location
Status
Claude Code
.claude/skills/
Originated standard (Oct 2025)
Codex CLI
.agents/skills/
Added in v0.94.0 (Feb 2026); personal skills added in v0.95.0