Back to blog
Tutorial

How to Use Agent Skills with Codex CLI [Setup to Execution]

Skill Gallery TeamJanuary 24, 20263 min read

Agent Skills work not only with Claude Code but also with OpenAI Codex CLI.

This article explains how to install and use skills with Codex CLI. We'll also compare with Claude Code, helpful if you want to use both tools.

What is Codex CLI

Codex CLI is OpenAI's terminal-based AI coding agent. As of January 2026, it supports the GPT-5.2-Codex model with enhanced long-horizon task handling and security features.

Installation

npm install -g @openai/codex-cli

You'll need to configure your OpenAI API key on first launch.

Skill Placement

Skill placement in Codex CLI is similar to Claude Code.

Project-Specific

your-project/
└── .codex/
    └── skills/
        └── my-skill/
            └── SKILL.md

Global

~/.codex/
└── skills/
    └── my-skill/
        └── SKILL.md

Installing Skills

Using the Built-in Installer

Codex CLI has a built-in skill installer:

/skills

This command lets you search and install available skills.

Manual Installation

  1. Download SKILL.md from GitHub
  2. Copy to the placement location above
mkdir -p ~/.codex/skills/code-review
cp SKILL.md ~/.codex/skills/code-review/

Invoking Skills

Call with $skill-name

In Codex CLI, use the $ prefix to invoke skills:

$code-review

This is equivalent to /code-review in Claude Code.

Natural Language Invocation

Like Claude Code, natural language requests auto-apply relevant skills:

Review the code in this PR

Differences from Claude Code

ItemClaude CodeCodex CLI
Invocation/skill-name$skill-name
Config Directory.claude/.codex/
ModelClaude Opus 4.5GPT-5.2-Codex
Subagents-
Skill Installer/install-skill/skills (built-in)

Compatibility

The basic SKILL.md format is shared, so the same skill works in both tools. However, note:

  • scripts/ execution: May behave differently
  • Tool-specific features: Claude Code subagents won't work

Leveraging GPT-5.2-Codex

The January 2026 update brought GPT-5.2-Codex support to Codex CLI. Here's how to leverage this model's strengths with skills.

Large-Scale Refactoring

GPT-5.2-Codex has enhanced context compaction, excelling at large codebase work.

$refactor-codebase

Long refactoring tasks can run without losing context.

Security Reviews

Enhanced security features make it a good match for vulnerability detection skills.

$security-audit

Common Issues

Skill Not Recognized

  • Verify directory is .codex/skills/
  • Verify SKILL.md frontmatter is correct

$ Command Not Working

If skill name contains hyphens, you may need quotes:

$"code-review"

Tips for Using Both Tools

Share the Same Skill

Use symbolic links to share skills between both tools:

# Place skill for Claude Code
mkdir -p ~/.claude/skills/code-review
cp SKILL.md ~/.claude/skills/code-review/

# Symlink for Codex CLI
mkdir -p ~/.codex/skills
ln -s ~/.claude/skills/code-review ~/.codex/skills/code-review

When to Use Which

  • Claude Code: Highest SWE-bench accuracy. General coding tasks
  • Codex CLI: Long-horizon tasks, security analysis

Try both and choose based on the task.

Summary

Agent Skills work with Codex CLI too.

  • Invoke with $skill-name
  • Place in ~/.codex/skills/
  • Basic format shared with Claude Code

Browse the Skills list and try skills with Codex CLI.

codex-cliagent-skillsopenaisetuptutorial

Related posts