Installation Guide

Codex CLI Installation Guide

Comprehensive setup for Agent Skills in OpenAI's Codex CLI tool.

Updated 2026-01-264 min read
Full guide

Follow the sections in order, then adapt commands to your current environment.

Codex CLI Installation Guide

Codex CLI has native support for Agent Skills with built-in installation tools and sophisticated precedence management.

Installation Paths

Codex loads skills from multiple locations in order of precedence:

  1. Workspace (.codex/skills/)
  2. User (~/.codex/skills/)
  3. System (/etc/codex/skills/)
  4. Built-in (System default skills)

Installation Methods

Method 1: Manual Installation (Recommended)

For User Skills:

bash
# Create the user skills directory
mkdir -p ~/.codex/skills/my-skill

# Create the SKILL.md file
cat > ~/.codex/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Description that helps Codex select the skill
---

# My Skill

Skill instructions for the Codex agent to follow.

## Instructions
- Step-by-step guidance
- Domain conventions
EOF

For Workspace Skills:

bash
# Create the workspace skills directory
mkdir -p .codex/skills/my-skill

# Create the SKILL.md file
cat > .codex/skills/my-skill/SKILL.md << 'EOF'
---
name: project-skill
description: Specialized instructions for this repository
---
# Workspace Specific Skill
Detailed instructions for this specific workspace...
EOF

Method 2: Built-in Skill Installer (Recommended)

Codex includes a powerful CLI tool for managing skills:

bash
# List available skills in the marketplace
$skill-installer list

# Install a specific skill
$skill-installer install skill-name

# Install from a GitHub repository
$skill-installer install https://github.com/user/skill-repo

Method 3: Using Universal Installer

bash
# Install OpenSkills for universal access
npx openskills install user/repo --target ~/.codex/skills/

Skill Discovery & Activation

Activation Modes

  • Explicit: Use slash commands or prefix with $ (e.g., $my-skill)
  • Implicit: Codex automatically uses skills based on task relevance

Progressive Loading

Codex uses an efficient loading mechanism:

  1. Metadata: Indexed for fast discovery
  2. Instructions: Loaded only when skill is activated
  3. Resources: Scripts and assets loaded on demand
We value your privacy

We use cookies to analyze site usage and improve your experience.

Learn more about our cookies

Essential cookies are always active